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

Return error 1290 #2451

Merged
merged 1 commit into from
Dec 19, 2019
Merged

Return error 1290 #2451

merged 1 commit into from
Dec 19, 2019

Conversation

alpes214
Copy link
Contributor

Description:
Fix for issue #2226. Return error code 1290 to client when backend server started with --read-only
Testing:
Before fix when client inserts record to the table proxysql disconnects it and prints warning
Server:

2019-12-17 09:13:58 MySQL_Session.cpp:4272:handler(): [WARNING] Error during query on (0,127.0.0.1,3306): 1290, The MySQL server is running with the --super-read-only option so it cannot execute this statement

CLI:

mysql> insert into t (a) values ('1');
ERROR 2013 (HY000): Lost connection to MySQL server during query

After fix client is not disconnected. Proxysql returns error 1290 and error message to the client. Proxysql also prints same warning into the log.

mysql> insert into t (a) values ('1');
ERROR 1290 (HY000): The MySQL server is running with the --super-read-only option so it cannot execute this statement

@renecannao renecannao merged commit 8f459d1 into sysown:v2.0.9 Dec 19, 2019
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

Successfully merging this pull request may close these issues.

2 participants