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

enforce_autocommit_on_reads #485

Closed
3 tasks
renecannao opened this issue Feb 26, 2016 · 0 comments
Closed
3 tasks

enforce_autocommit_on_reads #485

renecannao opened this issue Feb 26, 2016 · 0 comments

Comments

@renecannao
Copy link
Contributor

WHY

Since 3449ab0 ( #438 ) ProxySQL tracks the value of autocommit and enforces it in database connection.
This implementation had the drawback that if a client sends set autocommit=0 , and read/write split is implemented too, transactions are opened on slaves as pointed in #469 , and therefore the feature was reverted.
Now ProxySQL doesn't track anymore the value of autocommit, and this means that statements could be executed in autocommit mode when the client assumes that autocommit is OFF .
This is problematic for application and libraries that do not explicitly starts transactions. See:

WHAT

  • add a new variable mysql-enforce_autocommit_on_reads
  • if the variable is set to false (default) and a SELECT (not FOR UPDATE) is executed, the client value of autocommit is not enforced into the database connection
  • in all the other cases, the client value of autocommitenforced into the database connection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant