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