-
Notifications
You must be signed in to change notification settings - Fork 976
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
support more mysql system variables to keep mulitplexing enabled #1922
Conversation
Automated message: PR pending admin approval for build testing |
@ahaha-zhang : would it be possible to have some unit test for the code in this PR? |
@renecannao, I've added the unit test code for this PR. Thank you for your review :) |
… auto_increment token
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bug fix for #1943
support more mysql system variables to keep mulitplexing enabled Added variable mysql-keep_multiplexing_variables
OK, My pleasure:) |
(cherry picked from commit 58d77e4)
Port to 1.4.x of commit 58d77e4
Hi, Rene:
I recently �debug why some connections were not multiplexing. I find that there are too many types of query digests, such as "select @@session.xxxx/select @@xxxx as yyy/select @@A,@b,@c", kinds of connector init-SQL and creative developers:).
I notice that there are only 2 exceptions hardcoded "select @@version/tx_isolation" that don't disable multiplexing. The other way is to configure a query rule. However, I have to configure too many kinds of query digests. Being able to configure more variables and support more kinds of queries is definitely preferred.
A new global variable in proxysql, default "tx_isolation,version":
mysql> show variables like 'mysql-keep_multiplexing_variables';
+-----------------------------------+----------------------+
| Variable_name | Value |
+-----------------------------------+----------------------+
| mysql-keep_multiplexing_variables | tx_isolation,version |
+-----------------------------------+----------------------+
1 row in set (0.00 sec)
A new function
bool MySQL_Connection::IsKeepMultiplexEnabledVariables(char *query_digest_text)
Support more kinds of query_digest_text:
select @@Version,@@tx_isolation;
select @@Version as aaa,@@tx_isolation as bbb,......;