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

unable_to_parse_set_statement(): [WARNING] Unable to parse unknown #4782

Open
Habeeb556 opened this issue Dec 24, 2024 · 1 comment
Open

Comments

@Habeeb556
Copy link

Issue Description

After upgrading from ProxySQL 2.1.0 to 2.7.1, query parsing has changed significantly. ProxySQL fails to parse certain SQL statements, such as dynamic SET SESSION sql_mode queries, and logs a warning instead of forwarding the query to MySQL. This impacts debugging compared to 2.1.0, where backend errors were logged transparently.

Log in 2.7.1:

MySQL_Session.cpp:8414:unable_to_parse_set_statement(): [WARNING] Unable to parse unknown SET query from client 127.0.0.1:51168. Setting lock_hostgroup. Please report a bug for future enhancements: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", "")

Log in 2.1.0:

MySQL_Session.cpp:4014:handler_minus1_LogErrorDuringQuery(): [WARNING] Error during query on (1,mysql-01,3306,36833): 1048, Column 'id' cannot be null

ProxySQL Version

  • Affected: 2.7.1
  • Previous: 2.1.0

Steps to Reproduce

  1. Configure ProxySQL 2.7.1 to connect to MySQL.
  2. Run the above query via ProxySQL.
  3. Observe the log warning instead of backend execution.

Expected Behavior

ProxySQL should forward valid SQL queries to MySQL or provide actionable error messages.


Impact

Query parsing limitations in 2.7.1 disrupt applications relying on dynamic SQL and make debugging more complex compared to 2.1.0.


Proposed Solution

  1. Allow complex SQL queries to pass to MySQL unaltered.
  2. Provide configuration options to relax query parsing.
  3. Update documentation to clarify parsing behavior.

Thank you for reviewing this report!

@Habeeb556 Habeeb556 changed the title :unable_to_parse_set_statement(): [WARNING] Unable to parse unknown unable_to_parse_set_statement(): [WARNING] Unable to parse unknown Dec 24, 2024
@Habeeb556
Copy link
Author

I think this is related to #3317. Could you help me with this @JavierJF?

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

1 participant