MySQL Forums
Forum List  »  Connector/Python

Re: OperationalError: (2013, 'Lost connection to MySQL server during query')
Posted by: Carl JR3
Date: June 05, 2008 10:46AM

I'm receiving the same error on a recently restored MySQL configuration, on a two key table. The error seems to only happen, at the present time, when the "LIKE" keyword is applied in the query.

For example,

SELECT [COL1],[COL2],[COL3] FROM [TABLE] WHERE [COLUMN] LIKE '%[SEARCH STRING]%'

However, when I replace the "LIKE" keyword with "=" operators, and remove the "%" characters, it works fine.

Furthermore, using "LIKE" more than once, in conjunction with "AND" (see the next example) returns the same error, even while limiting the results to 1.

For example,

SELECT [COL1],[COL2],[COL3] FROM [TABLE] WHERE [COL1] LIKE '%[SEARCH1]%' AND [COL2] LIKE '%[SEARCH2]%' LIMIT 1

The error, 'Lost Connection... during query' is returned.

Could this be perhaps a table related issue? I can perform the same queries on a different table and get results.

My table settings, on the table that is sending back the error are:

Engine: InnoDB
Charset: latin1
Collation: latin1_swedish_c
Pack Keys: Default
RAID Type: None
MySQL Version: 5.0.27

EDIT:

This must be table related, as the "CHECK TABLE" command returns the same error on this table.



Edited 1 time(s). Last edit at 06/05/2008 11:08AM by Carl JR3.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.