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

SET @@SESSION.sql_mode = ''; #1020

Closed
JonathanATyler opened this issue May 15, 2017 · 13 comments
Closed

SET @@SESSION.sql_mode = ''; #1020

JonathanATyler opened this issue May 15, 2017 · 13 comments
Assignees

Comments

@JonathanATyler
Copy link

JonathanATyler commented May 15, 2017

ProxySQL version 1.3.6-1 (from Percona repo)
Standard install using proxysql-admin.

I'm receiving a lot of these messages:

MySQL_Session.cpp:3419:handler___status_WAITING_CLIENT_DATA___STATE_SLEEP___MYSQL_COM_QUERY_qpo(): [ERROR] Unable to parse query. If correct, report it as a bug: SET @@SESSION.sql_mode = '';

They appear to be from a Joomla website I'm running that sets sql_mode='' on every connection, though they don't appear to be affecting the sites operation in any way.
I also received these messages with a previous setup I was testing using ProxySQL 1.4 (stable) and MySQL InnoDB Cluster.

Any ideas how I can stop these messages from filling up my logs?

@renecannao
Copy link
Contributor

It is indeed a parsing bug.
Thank you for reporting, it will be fixed in a future version.

@renecannao
Copy link
Contributor

Fixed in 1.3.7 and 1.4.1 (both yet not released)

@JonathanATyler
Copy link
Author

@renecannao,
Just wondering if you have an idea of when version 1.3.7 will be released, or if you can provide me with a patch for this?

Thanks for all your hard work!

@renecannao
Copy link
Contributor

Jonathan,
As no more bug fixes are scheduled for 1.3.7, I will release it within the next 24 hours.
Thanks

@renecannao
Copy link
Contributor

Jonathan,

1.3.7 is now released and ready to download at https://github.com/sysown/proxysql/releases/tag/v1.3.7
Thanks

@catyellow
Copy link

proxysql-1.4.1 (compiled)

2017-07-05 19:28:40 MySQL_Session.cpp:3372:handler___status_WAITING_CLIENT_DATA___STATE_SLEEP___MYSQL_COM_QUERY_qpo(): [ERROR] Unable to parse query. If correct, report it as a bug: SET SESSION sql_mode =
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(
@@sql_mode,
"STRICT_ALL_TABLES,", ""),
",STRICT_ALL_TABLES", ""),
"STRICT_ALL_TABLES", ""),
"STRICT_TRANS_TABLES,", ""),
",STRICT_TRANS_TABLES", ""),
"STRICT_TRANS_TABLES", "")

@renecannao
Copy link
Contributor

Hi @catyellow . I was aware of this, but didn't create an issue yet. Now I created one: #1083 . Thanks

@fborraccetti
Copy link

Same problem here,
2017-07-17 13:06:22 MySQL_Session.cpp:3426:handler___status_WAITING_CLIENT_DATA___STATE_SLEEP___MYSQL_COM_QUERY_qpo(): [ERROR] Unable to parse query. If correct, report it as a bug: SET SESSION sql_mode = REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE( @@sql_mode, "STRICT_ALL_TABLES,", ""), ",STRICT_ALL_TABLES", ""), "STRICT_ALL_TABLES", ""), "STRICT_TRANS_TABLES,", ""), ",STRICT_TRANS_TABLES", ""), "STRICT_TRANS_TABLES", "")
2,5GB of this in proxysql.log
Is there any possibility to stop logging this msg? ProxySQL version 1.3.8-1-g1a10b36, codename Truls

@birladeanuadrian
Copy link

I got the same bug version 1.4.7

@eliskovets
Copy link

And in v1.4.8 as well ...

mysql> select @@session.sql_mode;
+-------------------------------------------------------------------------------------------------------------------------------------------+
| @@session.sql_mode                                                                                                                        |
+-------------------------------------------------------------------------------------------------------------------------------------------+
| ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
+-------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> set session sql_mode='';
Query OK, 0 rows affected (0.00 sec)

mysql> select @@session.sql_mode;
+-------------------------------------------------------------------------------------------------------------------------------------------+
| @@session.sql_mode                                                                                                                        |
+-------------------------------------------------------------------------------------------------------------------------------------------+
| ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
+-------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql>

@renecannao
Copy link
Contributor

1.4.7 and 1.4.8 are not affected by this bug.
What you are facing is a configuration issue related to mysql-default_sql_mode .
This variable wasn't documented, and indeed wasn't intuitive.
Now it is documented.

@eliskovets
Copy link

Hi @renecannao
Thank you very much for your work and this clear explanation 👍

@kubicgruenfeld
Copy link

Hi @renecannao,
maybe there is a regression in 2.0RC2:

mysql> SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
Query OK, 0 rows affected (0.00 sec)

mysql> select @@session.sql_mode;
+-----------------------+
| @@session.sql_mode    |
+-----------------------+
| NO_AUTO_VALUE_ON_ZERO |
+-----------------------+
1 row in set (0.00 sec)

mysql> SET sql_mode = '';
Query OK, 0 rows affected (0.01 sec)

mysql> select @@session.sql_mode;
+-----------------------+
| @@session.sql_mode    |
+-----------------------+
| NO_AUTO_VALUE_ON_ZERO |
+-----------------------+
1 row in set (0.01 sec)

sql_mode is set to same values in proxysql and backends.

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

7 participants