server: support for client multi-statement option#19459
Conversation
|
Which released branches should this PR backported to? |
Maybe we can ask the DBA team? I think 3.1/4.0, but I do have some concern apps built directly for TiDB (and not MySQL) may be using the client libraries incorrectly. |
I think we need to cherry-pick it to 4.0 only. |
Sounds good to me |
|
/merge |
|
/run-all-tests |
|
@nullnotnil merge failed. |
|
/merge |
|
Your auto merge job has been accepted, waiting for:
|
|
/run-all-tests |
|
@nullnotnil merge failed. |
|
/run-all-tests |
|
It looks like these might be real failures: And: I'll take a look. |
|
/run-all-tests tidb-test=pr/1090 |
|
/merge |
|
/run-all-tests |
|
@nullnotnil merge failed. |
|
/run-unit-test |
|
/run-unit-test tidb-test=pr/1090 |
|
/merge |
|
/run-all-tests |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
|
cherry pick to release-4.0 in PR #20408 |
) (pingcap#20408)" This reverts commit 0b0c41b.
What problem does this PR solve?
Problem Summary:
The server previously did not correctly support the multi-statement client feature, which meant that multi-statement was always enabled. With this PR now it could be enabled or disabled (up to the client!)
What is changed and how it works?
What's Changed:
How it Works:
Related changes
Check List
Tests
The go-sql driver allows changing the multi-statement option as a connection parameter, and I have added this to the test suite. I have also manually tested against the MySQL C client, which many drivers are based on. It allows changing the options of an open connection, and TiDB correctly supports this RPC. Here is that example program:
Here is the output of the program (whether or not the tables exist is inconsequential):
Side effects
Some clients may incorrectly be depending on the current behavior! It may break for them.
Release note