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

parser, variable: fix #5478, make 'set transaction read only' works. #5483

Merged
merged 4 commits into from
Dec 25, 2017
Merged

parser, variable: fix #5478, make 'set transaction read only' works. #5483

merged 4 commits into from
Dec 25, 2017

Conversation

winkyao
Copy link
Contributor

@winkyao winkyao commented Dec 25, 2017

before this pr, use jdbc, in some case, we will get below error :

springboot JPA Connection is read-only. Queries leading to data modification are not allowed

@winkyao
Copy link
Contributor Author

winkyao commented Dec 25, 2017

@coocood @shenli @tiancaiamao PTAL

// issue #5478
_, err = tk.Exec("set session transaction read write;")
_, err = tk.Exec("set global transaction read write;")
r = tk.MustQuery(`select @@session.tx_read_only, @@global.tx_read_only, @@session.transaction_read_only, @@global.transaction_read_only;`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any difference between transaction_read_only and tx_read_only?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

transaction_read_only was added in MySQL 5.7.20 as an alias for tx_read_only, which is now deprecated and is removed in MySQL 8.0. Applications should be adjusted to use transaction_read_only in preference to tx_read_only.

@coocood
Copy link
Member

coocood commented Dec 25, 2017

LGTM

@winkyao winkyao added the status/LGT1 Indicates that a PR has LGTM 1. label Dec 25, 2017
@shenli
Copy link
Member

shenli commented Dec 25, 2017

LGTM

@shenli
Copy link
Member

shenli commented Dec 25, 2017

/run-all-tests

@winkyao
Copy link
Contributor Author

winkyao commented Dec 25, 2017

/run-integration-common-test -tidb-test=pr/435

@winkyao
Copy link
Contributor Author

winkyao commented Dec 25, 2017

/run-common-test -tidb-test=pr/435

@winkyao
Copy link
Contributor Author

winkyao commented Dec 25, 2017

/run-integration-common-test

@shenli
Copy link
Member

shenli commented Dec 25, 2017

/run-common-test
/run-integration-common-test

@winkyao
Copy link
Contributor Author

winkyao commented Dec 25, 2017

/run-integration-common-test -tidb-test=pr/436

@winkyao
Copy link
Contributor Author

winkyao commented Dec 25, 2017

/run-integration-common-test

@coocood coocood merged commit 100bc58 into pingcap:master Dec 25, 2017
@winkyao winkyao deleted the fix_tx_read_only branch December 25, 2017 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants