Like query matching on '%reinstatement%' causes lost mysql connection during query

Bug #1094295 reported by DT on 2012-12-28
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Connector/Python
New
Undecided
Unassigned

Bug Description

Lost connection to mysql running a query that matches on '%rein%', '%reinst%', '%reinstatement%', '%instat%', '%nstat%', etc. Runs an aggregate function query ok, then gets stuck on regular query.

This runs ok: SELECT COUNT(col) FROM tbl WHERE col LIKE '%%nstate%%';

This generates error below: SELECT col FROM tbl WHERE col LIKE '%%nstate%%';

Traceback (most recent call last):
  File "word_cloud_v2.py", line 80, in <module>
    cursor_in.execute(sql_phrase)
  File "/usr/local/lib/python2.7/site-packages/mysql/connector/cursor.py", line 392, in execute
    self._handle_result(self._connection.cmd_query(stmt))
  File "/usr/local/lib/python2.7/site-packages/mysql/connector/cursor.py", line 316, in _handle_result
    self._handle_resultset()
  File "/usr/local/lib/python2.7/site-packages/mysql/connector/cursor.py", line 684, in _handle_resultset
    (self._rows, eof) = self._connection.get_rows()
  File "/usr/local/lib/python2.7/site-packages/mysql/connector/connection.py", line 451, in get_rows
    rows = self._protocol.read_text_result(self._socket, count)
  File "/usr/local/lib/python2.7/site-packages/mysql/connector/protocol.py", line 234, in read_text_result
    packet = sock.recv()
  File "/usr/local/lib/python2.7/site-packages/mysql/connector/network.py", line 169, in recv_plain
    raise errors.InterfaceError(errno=2013)
mysql.connector.errors.InterfaceError: 2013: Lost connection to MySQL server during query

also:
SELECT col FROM tble WHERE col LIKE '%%rein%%';

Traceback (most recent call last):
  File "word_cloud_v2.py", line 80, in <module>
    cursor_in.execute(sql_phrase)
  File "/usr/local/lib/python2.7/site-packages/mysql/connector/cursor.py", line 392, in execute
    self._handle_result(self._connection.cmd_query(stmt))
  File "/usr/local/lib/python2.7/site-packages/mysql/connector/cursor.py", line 316, in _handle_result
    self._handle_resultset()
  File "/usr/local/lib/python2.7/site-packages/mysql/connector/cursor.py", line 684, in _handle_resultset
    (self._rows, eof) = self._connection.get_rows()
  File "/usr/local/lib/python2.7/site-packages/mysql/connector/connection.py", line 451, in get_rows
    rows = self._protocol.read_text_result(self._socket, count)
  File "/usr/local/lib/python2.7/site-packages/mysql/connector/protocol.py", line 234, in read_text_result
    packet = sock.recv()
  File "/usr/local/lib/python2.7/site-packages/mysql/connector/network.py", line 169, in recv_plain
    raise errors.InterfaceError(errno=2013)
mysql.connector.errors.InterfaceError: 2013: Lost connection to MySQL server during query

Also:
SELECT col FROM tble WHERE col LIKE '%%reinstatement%%';

Traceback (most recent call last):
  File "word_cloud_v2.py", line 80, in <module>
    cursor_in.execute(sql_phrase)
  File "/usr/local/lib/python2.7/site-packages/mysql/connector/cursor.py", line 392, in execute
    self._handle_result(self._connection.cmd_query(stmt))
  File "/usr/local/lib/python2.7/site-packages/mysql/connector/cursor.py", line 316, in _handle_result
    self._handle_resultset()
  File "/usr/local/lib/python2.7/site-packages/mysql/connector/cursor.py", line 684, in _handle_resultset
    (self._rows, eof) = self._connection.get_rows()
  File "/usr/local/lib/python2.7/site-packages/mysql/connector/connection.py", line 451, in get_rows
    rows = self._protocol.read_text_result(self._socket, count)
  File "/usr/local/lib/python2.7/site-packages/mysql/connector/protocol.py", line 234, in read_text_result
    packet = sock.recv()
  File "/usr/local/lib/python2.7/site-packages/mysql/connector/network.py", line 169, in recv_plain
    raise errors.InterfaceError(errno=2013)
mysql.connector.errors.InterfaceError: 2013: Lost connection to MySQL server during query

I have already tried troubleshooting by creating sql expression with different methods, concating strings and variables, same result.

The mysql connection buffers and gets warnings.

Previously I had a problem matching on '%assign%' using a similar table and data, but I *cannot* replicate that problem anymore.

sql_phrase = "SELECT col FROM table WHERE col LIKE '%%assign%%';"
cursor.execute(sql_phrase)

*Previous* error that cannot be replicated anymore, matching on '%assign%'

Traceback (most recent call last):
  File "judge_who.py", line 33, in <module>
    cursor.execute(sql_phrase)
  File "/usr/local/lib/python2.7/site-packages/mysql/connector/cursor.py", line 392, in execute
    self._handle_result(self._connection.cmd_query(stmt))
  File "/usr/local/lib/python2.7/site-packages/mysql/connector/cursor.py", line 316, in _handle_result
    self._handle_resultset()
  File "/usr/local/lib/python2.7/site-packages/mysql/connector/cursor.py", line 684, in _handle_resultset
    (self._rows, eof) = self._connection.get_rows()
  File "/usr/local/lib/python2.7/site-packages/mysql/connector/connection.py", line 451, in get_rows
    rows = self._protocol.read_text_result(self._socket, count)
  File "/usr/local/lib/python2.7/site-packages/mysql/connector/protocol.py", line 234, in read_text_result
    packet = sock.recv()
  File "/usr/local/lib/python2.7/site-packages/mysql/connector/network.py", line 169, in recv_plain
    raise errors.InterfaceError(errno=2013)
mysql.connector.errors.InterfaceError: 2013: Lost connection to MySQL server during query

DT (dougt901-2012) wrote :

also have same problem matching on '%pet%' and '%petition%', but *not* '%peti%' and *not* '%tition%'.

Traceback (most recent call last):
  File "word_cloud_v2.py", line 79, in <module>
    cursor_in.execute(sql_phrase)
  File "/usr/local/lib/python2.7/site-packages/mysql/connector/cursor.py", line 392, in execute
    self._handle_result(self._connection.cmd_query(stmt))
  File "/usr/local/lib/python2.7/site-packages/mysql/connector/cursor.py", line 316, in _handle_result
    self._handle_resultset()
  File "/usr/local/lib/python2.7/site-packages/mysql/connector/cursor.py", line 684, in _handle_resultset
    (self._rows, eof) = self._connection.get_rows()
  File "/usr/local/lib/python2.7/site-packages/mysql/connector/connection.py", line 451, in get_rows
    rows = self._protocol.read_text_result(self._socket, count)
  File "/usr/local/lib/python2.7/site-packages/mysql/connector/protocol.py", line 234, in read_text_result
    packet = sock.recv()
  File "/usr/local/lib/python2.7/site-packages/mysql/connector/network.py", line 169, in recv_plain
    raise errors.InterfaceError(errno=2013)
mysql.connector.errors.InterfaceError: 2013: Lost connection to MySQL server during query

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions