-
Notifications
You must be signed in to change notification settings - Fork 2k
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
vtgate: mysql_server_version returns inconsistent results #7498
Comments
Related discussion in this PR #7337 |
Noticed an error and corrected it. In last example above, corrected the "THIS IS FROM MYSQLD" and "THIS IS FROM mysql_server_version" comments. |
I do not see this issue on recent master
Setting it to
|
@bolt-leandro can you also provide information regarding which client is being problematic so that we can try using that client directly and see. Also, provide the issue you are seeing using that client because of this behaviour |
Seems we can't reproduce this error. Feel free to re-open if you are still having this issue |
Apologies, somehow I missed your updates. I did some tests with latest 10 stable version and seems problem is now solved. I'll answer questions for completeness:
Client having the original problem was IntelliJ IDEA.
Problem was due to client thinking this was 5.7 and asking for query_cache info (query_cache doesn't exist in 8.0)
|
FWIW, latest test seems fine. Thanks for fixing this! 🙇 One last nitpick, latest stable version is 10.0.0 - Git revision 48dccf5. No need to reopen ticket.
|
Overview of the Issue
Setting _mysql_server_version returns inconsistent and different values of reported MySQL version (default “5.7.9-Vitess”).
When trying this, some values/variables get changed while others do not. This confuses some clients which end up sending queries for 5.7 that are not supported in 8.0 (eg: query cache vars).
Reproduction Steps
Tested this on both v9.0 binaries (daa6085) and latest git compiled from source (10.0.0-SNAPSHOT a577cc4 branch 'master'). Each version gave different inconsistencies. Installed mysqld version is Percona 8.0.22-13 for Linux on x86_64.
To reproduce, use local example, and add option to vtgate start script:
Then start local example and connect to vtgate, check versions reported:
Observe discrepancy in values, eg:
Server version: 5.7.9-Vitess Percona Server (GPL), Release '13', Revision '6f7822f'
VS
| version | 8.0.22-13
Binary version
Test 1 - v9.0:
Test 2 - v10.0 git:
Operating system and Environment details
uname -sr
): Linux 4.15.0-130-genericuname -m
): x86_64Log Fragments
Test 1 - v9.0: says 5.7.9 even though both mysql_server_version or mysqld are 8.0.x:
Test 2 - v10.0 git :
Seems OK if vtgate's -mysql_server_version matches mysqld --version.
However, if vtgate's -mysql_server_version is different from mysqld --version, we get mixed results:
The text was updated successfully, but these errors were encountered: