Skip to content

Commit

Permalink
Always set MULTI_RESULTS flag (#515)
Browse files Browse the repository at this point in the history
  • Loading branch information
methane authored Oct 19, 2021
1 parent 204fb12 commit 5c04abf
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions MySQLdb/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,19 +173,10 @@ class object, used to create cursors (keyword only)
self._binary_prefix = kwargs2.pop("binary_prefix", False)

client_flag = kwargs.get("client_flag", 0)

client_version = tuple(
[numeric_part(n) for n in _mysql.get_client_info().split(".")[:2]]
)

client_flag |= CLIENT.MULTI_RESULTS
multi_statements = kwargs2.pop("multi_statements", True)
if multi_statements:
if client_version >= (4, 1):
client_flag |= CLIENT.MULTI_STATEMENTS

if client_version >= (5, 0):
client_flag |= CLIENT.MULTI_RESULTS

client_flag |= CLIENT.MULTI_STATEMENTS
kwargs2["client_flag"] = client_flag

# PEP-249 requires autocommit to be initially off
Expand Down

0 comments on commit 5c04abf

Please sign in to comment.