Skip to content

Commit 3ebd77e

Browse files
committed
Always set MULTI_RESULTS flag
1 parent 16d139c commit 3ebd77e

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

Diff for: MySQLdb/connections.py

+2-11
Original file line numberDiff line numberDiff line change
@@ -173,19 +173,10 @@ class object, used to create cursors (keyword only)
173173
self._binary_prefix = kwargs2.pop("binary_prefix", False)
174174

175175
client_flag = kwargs.get("client_flag", 0)
176-
177-
client_version = tuple(
178-
[numeric_part(n) for n in _mysql.get_client_info().split(".")[:2]]
179-
)
180-
176+
client_flag |= CLIENT.MULTI_RESULTS
181177
multi_statements = kwargs2.pop("multi_statements", True)
182178
if multi_statements:
183-
if client_version >= (4, 1):
184-
client_flag |= CLIENT.MULTI_STATEMENTS
185-
186-
if client_version >= (5, 0):
187-
client_flag |= CLIENT.MULTI_RESULTS
188-
179+
client_flag |= CLIENT.MULTI_STATEMENTS
189180
kwargs2["client_flag"] = client_flag
190181

191182
# PEP-249 requires autocommit to be initially off

0 commit comments

Comments
 (0)