@@ -658,7 +658,7 @@ def _config(key, arg):
658
658
659
659
self .encoding = charset_by_name (self .charset ).encoding
660
660
661
- client_flag |= CLIENT .CAPABILITIES | CLIENT . MULTI_STATEMENTS
661
+ client_flag |= CLIENT .CAPABILITIES
662
662
if self .db :
663
663
client_flag |= CLIENT .CONNECT_WITH_DB
664
664
self .client_flag = client_flag
@@ -1355,12 +1355,13 @@ def _read_load_local_packet(self, first_packet):
1355
1355
self ._read_ok_packet (ok_packet )
1356
1356
1357
1357
def _check_packet_is_eof (self , packet ):
1358
- if packet .is_eof_packet ():
1359
- wp = EOFPacketWrapper (packet )
1360
- elif packet .is_ok_packet ():
1361
- wp = OKPacketWrapper (packet )
1362
- else :
1358
+ if not packet .is_eof_packet ():
1363
1359
return False
1360
+ #TODO: Support CLIENT.DEPRECATE_EOF
1361
+ # 1) Add DEPRECATE_EOF to CAPABILITIES
1362
+ # 2) Mask CAPABILITIES with server_capabilities
1363
+ # 3) if server_capabilities & CLIENT.DEPRECATE_EOF: use OKPacketWrapper instead of EOFPacketWrapper
1364
+ wp = EOFPacketWrapper (packet )
1364
1365
self .warning_count = wp .warning_count
1365
1366
self .has_next = wp .has_next
1366
1367
return True
@@ -1468,7 +1469,7 @@ def _get_descriptions(self):
1468
1469
self .converters .append ((encoding , converter ))
1469
1470
1470
1471
eof_packet = self .connection ._read_packet ()
1471
- assert eof_packet .is_eof_packet () or eof_packet . is_ok_packet , 'Protocol error, expecting EOF'
1472
+ assert eof_packet .is_eof_packet (), 'Protocol error, expecting EOF'
1472
1473
self .description = tuple (description )
1473
1474
1474
1475
0 commit comments