Skip to content

Commit 9244828

Browse files
committed
BUG25111218: Fix duplicate logic for reading EOF packet
Removed duplicate logic for reading EOF packet during query result read from the server. The code is unnecessary given the modifications to parse_eof(), which correctly reads the EOF packet for versions with the new packet as well as older versions without the modified EOF packet.
1 parent d0b86c0 commit 9244828

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

lib/mysql/connector/protocol.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,6 @@ def read_text_result(self, sock, version, count=1):
318318
eof = None
319319
rowdata = None
320320
i = 0
321-
eof57 = version >= (5, 7, 5)
322321
while True:
323322
if eof or i == count:
324323
break
@@ -334,10 +333,6 @@ def read_text_result(self, sock, version, count=1):
334333
elif (packet[4] == 254 and packet[0] < 7):
335334
eof = self.parse_eof(packet)
336335
rowdata = None
337-
elif eof57 and (packet[4] == 0 and packet[0] > 9):
338-
# EOF deprecation: make sure we catch it whether flag is set or not
339-
eof = self.parse_ok(packet)
340-
rowdata = None
341336
else:
342337
eof = None
343338
rowdata = utils.read_lc_string_list(packet[4:])

0 commit comments

Comments
 (0)