(self)
| 1391 | return row |
| 1392 | |
| 1393 | def _finish_unbuffered_query(self): |
| 1394 | # After much reading on the MySQL protocol, it appears that there is, |
| 1395 | # in fact, no way to stop MySQL from sending all the data after |
| 1396 | # executing a query, so we just spin, and wait for an EOF packet. |
| 1397 | while self.unbuffered_active: |
| 1398 | try: |
| 1399 | packet = self.connection._read_packet() |
| 1400 | except err.OperationalError as e: |
| 1401 | if e.args[0] in ( |
| 1402 | ER.QUERY_TIMEOUT, |
| 1403 | ER.STATEMENT_TIMEOUT, |
| 1404 | ): |
| 1405 | # if the query timed out we can simply ignore this error |
| 1406 | self.unbuffered_active = False |
| 1407 | self.connection = None |
| 1408 | return |
| 1409 | |
| 1410 | raise |
| 1411 | |
| 1412 | if self._check_packet_is_eof(packet): |
| 1413 | self.unbuffered_active = False |
| 1414 | self.connection = None # release reference to kill cyclic reference. |
| 1415 | |
| 1416 | def _read_rowdata_packet(self): |
| 1417 | """Read a rowdata packet for each data row in the result set.""" |
no test coverage detected