-
Notifications
You must be signed in to change notification settings - Fork 338
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
SELECT SLEEP(0) INTO @\uE001MySqlConnector\uE001Sleep sql not support #1502
Comments
I did that to avoid overwriting a user-defined variable. Is it the private-use area character U+E001 that's causing problems with Oceanbase? Does |
Looks like it's probably the PUA character that's causing problems with Oceanbase:
|
Hi bgrainger, Thanks a lot for your prompt response and quick test with OceanBase! Actually I tested following SQL in OceanBase MySQL, MySQL 5.7 and MySQL 8.0, all failed with 'Unknown database' error.
For the following test case, only the first sql with PUA character failed when running directly from mysql command line in OceanBase MySQL, MySQL 5.7 and MySQL 8.0. And the variable
Here are the test results: OceanBase
MySQL 5.7.32
MySQL 8.0.31
Thanks again, Alvin |
Hi bgrainger, Thanks to your test case, now I can know what the sql string before encoding is (by UTF-16BE) and verified on MySQL. After encoding (could not be run directly from MySQL command line):
Before encoding (could/should be run directly from MySQL command line):
Here are the test results: OceanBase
MySQL 5.7.32
MySQL 8.0.31
|
Hi bgrainger, Really appreciate your help on this issue. Is that possible to use one of the following two user friendly variables?
So that it is more readable and can be run directly from MySQL command line without having to decode the sql. It might also help other MySQL compatible databases to avoid the same issue (it is very considerate of you to take care of so many databases ). After all, it is a nice-to-have optimization, considering that it take some extra work and testing. OceanBase
Also verified on MySQL 5.7 and MySQL 5.8. |
Just FYI for anyone trying to test this: SELECT SLEEP(0) INTO @\uE001MySqlConnector\uE001Sleep;
|
Yes, it seems reasonable to use one of those to improve server compatibility with a very low risk of colliding with a real user-defined variable. |
I also want to ask a question, under what circumstances will this SQL statement be triggered. thank you |
It will be triggered after a query has been cancelled (due to CancellationToken or CommandTimeout elapsing). |
FYI OceanBase MySQL has supported following SQL in latest version:
|
Fixed in 2.4.0. |
How can this SQL statement be triggered?
I am using an Oceanbase database, which is compatible with MySQL; The same code triggered this SQL statement, but MySQL does not trigger it.
The text was updated successfully, but these errors were encountered: