long2ice / asyncmy

A fast asyncio MySQL/MariaDB driver with replication protocol support
https://github.com/long2ice/asyncmy
Apache License 2.0
264 stars 32 forks source link

Special characters like \udd38 cause the connection not to be disconnected #109

Open wmslei opened 1 week ago

wmslei commented 1 week ago

1、A JSON field in the table; 2、Some special characters like \udd38 in the json value;

Insert the row: 1、mysql-8.3 (docker container) File "asyncmy/connection.pyx", line 644, in read_packet File "asyncmy/protocol.pyx", line 190, in asyncmy.protocol.MysqlPacket.raise_for_error File "asyncmy/protocol.pyx", line 194, in asyncmy.protocol.MysqlPacket.raise_for_error File "asyncmy/errors.pyx", line 128, in asyncmy.errors.raise_mysql_exception File "asyncmy/errors.pyx", line 137, in asyncmy.errors.raise_mysql_exception sqlalchemy.exc.OperationalError: (asyncmy.errors.OperationalError) (3140, 'Invalid JSON text: "The surrogate pair in string is invalid." at position 22 in value for column \'script_task.user_input\'.')

2、mysql-8.0.35.R3 (aws) Insert success

Select the row (mysql-8.0.35.R3) The execution never returned, and the connection did not break