Bug #37404 | LOAD DATA LOCAL + QUAN makes client lose their connection | ||
---|---|---|---|
Submitted: | 13 Jun 2008 19:50 | Modified: | 23 Oct 2008 17:08 |
Reporter: | Diego Medina | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Enterprise Monitor: Agent | Severity: | S1 (Critical) |
Version: | 0.7.0.785 | OS: | Linux (Fedora 8) |
Assigned to: | Kay Roepke | CPU Architecture: | Any |
[13 Jun 2008 19:50]
Diego Medina
[13 Jun 2008 19:52]
Diego Medina
actual load data local infile statement
Attachment: load.sql (text/x-sql), 1.22 KiB.
[23 Jul 2008 19:25]
Andy Bang
Referenced in MEM beta README.
[21 Oct 2008 12:53]
Diego Medina
Easier steps: CREATE DATABASE test_1; CREATE TABLE `t1` ( `dt` datetime NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; LOAD DATA LOCAL INFILE "/Users/wizard/bug37404.txt" INTO TABLE test_1.t1;
[21 Oct 2008 18:57]
Kay Roepke
This turns out to be rather tricky to fix, because LOAD DATA LOCAL INFILE sends two packets (one with the data but without any indicator of what type the packet is, and one zero-length packet). To detect this packet we need to place the connection into a special state, read the two packets and pass them on. Currently the zero-length packet, which is the end-of-data indicator for the server, is silently swallowed, causing the server connection to eventually time out (the client connection hangs). Combining the two packets to one (slightly illegally) is not possible, because of a packet sanity check in the proxy plugin.
[22 Oct 2008 13:19]
Kay Roepke
With the fix, the proxy scripts never get to see the LOAD DATA LOCAL INFILE packets, because the handling is just too tricky for now. Instead we pass all the packets on to the server (behind the back of the script). As far as it is concerned there never was that statement.
[23 Oct 2008 17:08]
Diego Medina
Verified fixed on 2.0.0.7083