Bug #31734 Server hangs during large LOAD DATA
Submitted: 21 Oct 2007 10:45 Modified: 21 Oct 2007 13:37
Reporter: Remi Collet (OCA) Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: DML Severity:S3 (Non-critical)
Version:5.0.45 and 5.1.22 OS:Linux
Assigned to: CPU Architecture:Any

[21 Oct 2007 10:45] Remi Collet
Description:
I use "LOAD DATA".

For most table i don't have any problem.

On a big one (400,000 rows), server hangs.

SHOW PROCESSLIST says :

Id : 64
User : root
Host : localhost
db : glpi2
Command : Query
Time : 635
State : "Repair with keycache"
Info : LOAD DATA INFILE '/tmp/glpi_inst_software.csv' 
  INTO TABLE glpi_inst_software FIELDS TERMINATED BY ';' 
  OPTIONALLY ENCLOSED BY '\"' 
  LINES TERMINATED BY '\r\n' 
  IGNORE 1 LINES

No other process are running which use mysql.
CSV File is about 8 Mb.

Note that the table is "tuncated" before the load.

How to repeat:
Table structure used :

CREATE TABLE `glpi_inst_software` (
  `ID` int(11) NOT NULL auto_increment,
  `cID` int(11) NOT NULL default '0',
  `license` int(11) NOT NULL default '0',
  PRIMARY KEY  (`ID`),
  KEY `cID` (`cID`),
  KEY `sID` (`license`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
[21 Oct 2007 13:37] Remi Collet
Forget, only a disk space problem...