[CONPY-206] mariadb connector loses server connection during RETURNING query Created: 2022-06-02 Updated: 2022-07-31 Resolved: 2022-07-31 |
|
| Status: | Closed |
| Project: | MariaDB Connector/Python |
| Component/s: | Generic |
| Affects Version/s: | 1.0.11 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Mike Bayer | Assignee: | Georg Richter |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Python 3.10.0 (default, Nov 5 2021, 17:23:47) [GCC 11.2.1 20210728 (Red Hat 11.2.1-1)] on linux Welcome to the MariaDB monitor. Commands end with ; or \g. |
||
| Issue Links: |
|
||||||||
| Description |
|
the following test runs an INSERT..RETURNING that retrieves a value from a related "sequence" table. on mariadb-connector, it crashes with mariadb.InterfaceError: Lost connection to MySQL server during query. The same tests succeeds with most other major MySQL drivers, mysqlclient, pymysql (this is for SQLAlchemy). The test case below runs first on mysqlclient as a demo and then on mariadb-connector where it crashes.
output:
|
| Comments |
| Comment by Mike Bayer [ 2022-06-02 ] | |||||||||||||||||||||||||||||||||||||||||||
|
seems to be any subquery, not just with a separate table , it needs to have parameters present
same result | |||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2022-06-03 ] | |||||||||||||||||||||||||||||||||||||||||||
|
Thanks zzzeek, put | |||||||||||||||||||||||||||||||||||||||||||
| Comment by Georg Richter [ 2022-06-03 ] | |||||||||||||||||||||||||||||||||||||||||||
|
Server crashes only with 1.0 branch, not with 1.1. The difference between these branches is, that 1.0 uses binary protocol, while 1.1 uses text protocol (since there are no parameters to substitute). | |||||||||||||||||||||||||||||||||||||||||||
| Comment by Mike Bayer [ 2022-06-03 ] | |||||||||||||||||||||||||||||||||||||||||||
|
ah I didnt realize the server is actually where the bug is, great thanks for looking into it. | |||||||||||||||||||||||||||||||||||||||||||
| Comment by Georg Richter [ 2022-07-31 ] | |||||||||||||||||||||||||||||||||||||||||||
|
Closed, since this issue affects Server (MDEV). |