Bug #55600 Mysql Proxy lost connection to server during query LOAD DATA INFILE
Submitted: 28 Jul 2010 12:41 Modified: 29 Jul 2010 14:13
Reporter: Thies Meincke Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Proxy Severity:S3 (Non-critical)
Version:0.8.0 OS:Linux
Assigned to: Jan Kneschke CPU Architecture:Any

[28 Jul 2010 12:41] Thies Meincke
Description:
Query 
load data infile '/path/to/file/' into table tablename;
via mysql proxy is aborted:
ERROR 2013 (HY000): Lost connection to MySQL server during query

works fine directly without proxy.
works also fine with reporter.lua/admin.lua
error occurs with rw-splitting.lua, tutorial-keepalive.lua and other lua-scripts with connection pooling

debug messages from proxy:
2010-07-28 14:25:28: (critical) proxy-plugin.c.1130: I have no server backend, closing connection
2010-07-28 14:25:28: (critical) network-mysqld.c.1293: plugin_call(CON_STATE_READ_QUERY) failed
2010-07-28 14:25:28: (debug) [network-mysqld.c:817]: error on a connection (fd: -1 event: 0). closing client connection

Proxy version: 0.8.0 compiled on OpenSuse 11.2 64 bit
Mysql server: 5.1.36 OpenSuse 11.2 64 bit
Mysql-Client: 5.1.41 (Ubuntu), 5.0.67 (SLES 11)

How to repeat:

error occurs every time when LOAD DATA .. is used and proxy is running  with rw-splitting.lua, tutorial-keepalive.lua

Suggested fix:
none
[29 Jul 2010 8:06] Sveta Smirnova
Thank you for the report.

Verified as described. Although in my case I get "Lost connection" error even if I don't use any script.
[29 Jul 2010 11:35] Thies Meincke
sveta, you are right; I digged a little deeper and found:

no lua-script or reporter.lua und admin.lua: 
error ERROR 2013 (HY000): Lost connection to MySQL server during query appeared after a several seconds when the name of the infile is correct; 
there where wrong data inserted into destination table!

when the filename is incorrect, the error issued is:
ERROR 2 (HY000): File '/wrong/path/to/file' not found (Errcode: 2)

with lua scripts using connection pooling:
when the filename is incorrect, the error issued is:
ERROR 2013 (HY000): Lost connection to MySQL server during query
when the filename is correct: the same error message, and no data is inserted into destination table.
[29 Jul 2010 12:32] Jan Kneschke
I can't repeat this with the MySQL Proxy code from trunk.

Please build the proxy from:

  $ bzr branch lp:mysql-proxy

and see if the problem persists. We fixed LOAD DATA INFILE handling with #51864
[29 Jul 2010 14:13] Thies Meincke
works with version from trunk.

thanks.