Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
Description
The pure-Python client adds CLIENT_MULTI_STATEMENTS to its default handshake capabilities, while the C extension (libmariadb) does not. As a result the two backends behave differently for the same code: cursor.execute("SELECT 1; SELECT 2") succeeds on pure-Python but raises a syntax error on the C extension. The two implementations should differ only in performance, not behaviour.
fis is to remove MULTI_STATEMENTS from the pure-Python default capabilities so it is off by default in both backends (matching the C extension, libmariadb and PyMySQL). It remains available as an opt-in via the existing client_flag parameter: client_flag=CAPABILITY.MULTI_STATEMENTS ( the same mechanism PyMySQL uses).