-
Notifications
You must be signed in to change notification settings - Fork 978
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
"In Transaction" flag incorrectly set on responses after a query causes an error. #4181
Comments
Hi @tsteiner . Can you please share the ProxySQL configuration? I can't reproduce on a vanilla configuration. Here the output of tcpdump after running
In my test I do not see After reading unlcms/project-herbie#366 (comment) I think your issue is probably related to savepoint . Were you using For reference, there was a similar issue in the past: #3749 The underlying problem is that ProxySQL tracks savepoints , autocommit and If you can share the exact steps to reproduce it we can try to investigate it in more details. Furthermore, we have several automated integration testing with 3rd party software, but currently Drupal is not in that list. If Drupal has automated database testing we can add it to the list of software we run automated testing against ProxySQL. Thanks, |
I also initially suspected SAVEPOINT. It turns out that its sort of related as the Drupal installer is calling "RELEASE SAVEPOINT" and the ignoring the error that no SAVEPOINT exists. It seems to be the error from the MySQL server that is actually causing the incorrect flag to be set. After the installer ignores the error, it tries to call PDO::beginTransaction() which throws an exception because ProxySQL is telling it that a transaction exists. I was able to recreate the issue with just the following SQL:
Here's the config dump:
|
Would this have been resolved by #4306? We don't seem to be experiencing problem anymore, and the patch notes for 2.5.5 sound pretty relevant:
|
ProxySQL version: proxysql2-2.4.8-1.1.el7.x86_64
OS version: CentOS Linux release 7.9.2009 (Core)
While a client is connected to ProxySQL, if a client's query results in an error (eg: "BOGUS QUERY;"), responses to subsequent queries have the "In Transaction" flag set, even though they aren't set by the backend's responses. The following is a screenshot of Wireshark where I highlighted responses with the "In Transaction" flag. (0 is red, 1 is green)
ProxySQL is running locally on 127.0.0.1, with the backend server at 10.172.28.145. You can see that initially, both responses agree that "In Transaction" is unset after each of the first three "SELECT 1" queries. However, after the "BOGUS SQL" query causes an error, the responses to the last three "SELECT 1" queries disagree on whether the "In Transaction" flag is set.
The only message in proxysql.log is:
2023-04-14 15:49:25 MySQL_Session.cpp:4313:handler_minus1_LogErrorDuringQuery(): [WARNING] Error during query on (0,10.172.25.145,3306,1190307): 1064, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BOGUS SQL' at line 1
The text was updated successfully, but these errors were encountered: