MySQL Disconnect on query
I have a very confusing issue which I have finally isolated to a minimum amount of code.
The environment is a MySQL community server 5.1.latest running on Win2000 server (Also tried 2003 but the 2000 is our standard workhorse tester)
Python 2.6.4
SQLAlchemy 0.6
Client code running under XP (The destination customer requires this)
DB is innodb
All works fine for virtually any standard query. I can repeat over and over with no issues. If I start a transaction (in SQLAlchemy, I create a "Session()" instance and then do a session.
InterfaceError: (InterfaceError) 2055: Lost connection to MySQL server at '192.168.
But ONLY on the query that gets a real result - the .count query will still work, and any NON transaction based queries still work!! Basically, it breaks the transaction by somehow issuing a transaction that MySQL considers "bad" and is waiting for it to be rolled back.
Not only that, but I then get the same error immediately in the original process! MySQL is then "broken" as it returns a error for any new connections that request a transaction that You can not connect until the invalid transaction is rolled back.. Firstly, NO updates have been made to the DB at all, only very simple queries, and secondly, given the connection is now down on both clients, how would one roll it back anyway!?
This does not appear to be an SQLAlchemy issue, as it is performing at it's most basic level. i.e. Create a session, perform a basic one table query, fail. This ONLY fails if another connection is created on the same XP even though it's in a completely different context (process).
So - the question is - "Do you have any known issues with connections (TCP) under Windows (Specifically XP)? Have you seen this type of "concurrency" issue with connections from the same client to the server causing a massive failure on the MySQL server?
Help! :-) I've tried everything. (Except that last one that fixes it obviously)
Cheers
Warwick
Question information
- Language:
- English Edit question
- Status:
- Open
- Assignee:
- Geert JM Vanderkelen Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Warwick Prince for more information if necessary.