-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Warning: (1300, "Invalid utf8mb4 character string" occurring with Python 3 on PyMySQL 0.8.0 but not 0.7.1 #644
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
Comments
since we are using pymysql.Binary(), it might be a better idea just to use the _binary prefix when passing to the DB. I have a feeling this is how things go with Postgresql /psycopg2 as well (e.g. special syntaxes are added around bound parameters). |
make it a connection-level option "prefix_binary" or something like that. |
because otherwise now everyone has to duplicate Django's "fix" which IMO this is a driver issue. the drivers handle database typing issues as much as they can. |
although this issue is going to be in mysqlclient, mysql-connector also, right? |
See https://github.com/PyMySQL/PyMySQL/blob/master/pymysql/connections.py#L562
Yes, and it's very difficult to add binary_prefix option to mysqlclient. |
it's too bad but it looks like all roads point to consuming projects have to do it, there are too many mysql drivers and none of them were ready for this stupid Oracle decision. see https://bitbucket.org/zzzeek/sqlalchemy/issues/4216/mysql-specific-binary-warnings-1300. |
OMG it's already there. Wow OK. I'll tell my user to use that for now, thanks! |
ref: https://bugs.mysql.com/bug.php?id=79317 Even mysqldump is got troubled by this warning. I agree that's a silly change. |
This seems to have appeared as of 0.8.0. reproduces against:
output produces a warning:
Per one of my users In MySQL this is issue: https://bugs.mysql.com/bug.php?id=79317
however, PyMySQL 0.7.1 doesn't have the problem. So can we do whatever 0.7.1 is doing here?
The text was updated successfully, but these errors were encountered: