Bug #64203 mysql proxy - query block in transaction
Submitted: 2 Feb 2012 3:27 Modified: 16 Mar 2012 13:08
Reporter: chao wang Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Proxy Severity:S2 (Serious)
Version:0.8.2 OS:Linux
Assigned to: CPU Architecture:Any
Tags: mysql proxy, query block, transaction

[2 Feb 2012 3:27] chao wang
Description:
query block in transaction

How to repeat:
example, querys like this:

START TRANSACTION;
UPDATE xxx;
INSERT xxx;
ROLLBACK;

if insert failed, "flags.in_trans" is false and be assigned to "is_in_transaction" in rw-splitting.lua, and the backend connection be released. 
the ROLLBACK be send by other backend connection. at this time, the first backend connection is locking some rows and the status still is in transaction.

Suggested fix:
the server_status isn't exsit when a query be return MYSQLD_PACKET_ERR, but the logic is not judge the res.query_status in rw-splitting.lua.
suggestion is add:

if res.query_status == proxy.MYSQLD_PACKET_OK then
    is_in_transaction = flags.in_trans
end
[16 Feb 2012 13:08] Sveta Smirnova
Thank you for the report.

Please provide full command you use to start MySQL Proxy.
[17 Mar 2012 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".