Bug #51864 LOAD DATA LOCAL fails through PROXY
Submitted: 9 Mar 2010 11:51 Modified: 24 May 2010 11:38
Reporter: Andrii Nikitin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Agent Severity:S3 (Non-critical)
Version:2.1.1.1141 OS:Any
Assigned to: Jan Kneschke CPU Architecture:Any
Tags: regression

[9 Mar 2010 11:51] Andrii Nikitin
Description:
simple LOAD DATA INFILE aborts connection from client to MySQL Proxy

How to repeat:
mysql> CREATE TABLE  `test`.`test` (
    ->   `id` int(10) unsigned NOT NULL auto_increment,
    ->   `value` varchar(45) NOT NULL,
    ->   PRIMARY KEY  (`id`)
    -> ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
Query OK, 0 rows affected (0.08 sec)

mysql> load data local infile '/test/test_import.txt' into table test.test;
ERROR 2006 (HY000): MySQL server has gone away

The same command succeeds when connected directly to MySQL (tried 5.0.88)

From agent debug log the only related message:
2010-03-09 12:27:20: (debug) [src\network-mysqld.c:889]: error on server connection (fd: 1236 event: 2). closing client connection.

No related messages in server log

Suggested fix:
should work without errors
[9 Mar 2010 11:52] Andrii Nikitin
The same testcase succeeded without LOCAL keyword
[9 Mar 2010 11:56] Andrii Nikitin
test file

Attachment: test_import.txt (text/plain), 26 bytes.

[9 Mar 2010 12:01] Andrii Nikitin
most probably regression of bug #37404
[10 Mar 2010 20:01] Enterprise Tools JIRA Robot
Gary Whizin writes: 
1. re-test on 2.0 GA (see EM-2754) - is it broken there? (if so, reopen 2754)
2. fix on 2.1 (this bug)
3. open another bug for 2.2 assuming it's broken there
[10 May 2010 10:44] Enterprise Tools JIRA Robot
Jan Kneschke writes: 
revno: 1573
committer: jan@mysql.com
branch nick: rel-2.1
timestamp: Mon 2010-05-10 12:40:47 +0200
message:
  fixed LOAD DATA LOCAL INFILE handling (fixes #51864/EM-4158)
  
    * cherry picked the patches from the lp:mysql-proxy tree
------------------------------------------------------------
revno: 1572
committer: jan@mysql.com
branch nick: rel-2.1
timestamp: Fri 2010-05-07 17:49:07 +0200
message:
  fixed the load-data-infile test
  
    * send a valid LOAD DATA LOCAL INFILE query
    * enabled the test again
    * set the capability flags for LOCAL support in the mock
  
  (cherry picked from r1048 lp:mysql-proxy)
------------------------------------------------------------
revno: 1571
committer: jan@mysql.com
branch nick: rel-2.1
timestamp: Fri 2010-05-07 16:56:41 +0200
message:
  added the result-file to the dist
------------------------------------------------------------
revno: 1570
committer: jan@mysql.com
branch nick: rel-2.1
timestamp: Fri 2010-05-07 16:41:22 +0200
message:
  added test-case for LOAD DATA LOCAL INFILE
[10 May 2010 15:15] Enterprise Tools JIRA Robot
Keith Russell writes: 
Patch installed in versions => 2.1.2.1161.
[12 May 2010 1:27] Enterprise Tools JIRA Robot
Bill Weber writes: 
verified fixed in build 2.1.2.1161
[24 May 2010 11:38] MC Brown
An entry has been added to the 2.1.2 changelog: 

       Using <literal>LOAD DATA LOCAL INFILE</literal> would cause                                                                                        
        the proxy component of &merlin_agent; to terminate.