Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProxySQL is passing semicolon to database when doing SET NAMES #1065

Closed
bpatel-dt opened this issue Jun 20, 2017 · 2 comments
Closed

ProxySQL is passing semicolon to database when doing SET NAMES #1065

bpatel-dt opened this issue Jun 20, 2017 · 2 comments

Comments

@bpatel-dt
Copy link

We are running ProxySQL version 1.3.7-0-gadcc2c7, codename Truls and while doing tests, we noticed that we have a query for SET NAMES from php as..

$this->getDb('sql2')->query('SET NAMES utf8;');

ProxySQL is passing semicolon to DB and from DB we get error...
SQLSTATE[#4200]: <>: 1115 Unknown character set: 'utf8;'

Please note the semicolon in the character set name. The code works if we connect directly to the database, but breaks if we go through ProxySQL...

Shouldn't the semicolon be trimmed?

Thanks

@renecannao
Copy link
Contributor

Semicolon should be trimmed, that's right.

Meanwhile, you can simply remove the semicolon from the PHP code.

Thanks

@renecannao
Copy link
Contributor

Fixed in 1.4.1 and 1.3.8 (both not released yet).
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants