-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
The latest Docker preview image breaks MySQL that contains multiple stataments (such as set variable) #5925
Comments
I have found the cause, the version string returned from import _mysql
logger.info(_mysql.get_client_info()) The above code print client_flag = kwargs.get('client_flag', 0)
client_version = tuple([ numeric_part(n) for n in _mysql.get_client_info().split('.')[:2] ])
if client_version >= (4, 1):
client_flag |= CLIENT.MULTI_STATEMENTS
if client_version >= (5, 0):
client_flag |= CLIENT.MULTI_RESULTS
kwargs2['client_flag'] = client_flag So it does not enable def _connection(self):
params = dict(
# other param
client_flag=MULTI_STATEMENTS | MULTI_RESULTS,
)
# other code
connection = MySQLdb.connect(**params)
return connection But I wonder why it is different in the newest Docker image? I guess it has something to do with the dependency issues? |
Did you build the Docker image locally? |
No, I use the Docker image from official Docker hub.I tried the latest preview image, it does not work, but previous preview image works (published 6 months ago). |
My best guess is that something went wrong with the Docker build and it's using an old mysql client version. We're going to fix the build soon🤞, so maybe we can wait for a new image to test this again? |
Sure, please let me know when the new image is ready for testing. |
It may has something to do with It says When old GPL licensed libmysql was replaced by MariaDB Connector/C (10.2 and above) we changed the version number to the corresponding server version to prevent breakage of existing applications. In the new preview Docker image the client version is 10.3, and the old one is using 10.1. So it may be related to that. |
@arikfr |
@myonlylonely yes, we can. The plan is to upgrade all dependencies once we have CI properly running again. But you can create a PR to update the client ahead of this. Are there any limitations in terms of what MySQL version it can connect to with the new client? |
@arikfr What's the plan of action for that bit? |
@justinclift switch to GitHub Actions. |
Issue Summary
The latest Docker preview image breaks MySQL that contains multiple stataments. Reverting back to the previous preview image solves the problem.
Steps to Reproduce
Error running query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select * from test_table' at line 2
.Executing the first or the second statements alone works fine.
Reverting to the old Docker preview image also works fine.
Technical details:
The text was updated successfully, but these errors were encountered: