Bug #35571 killing "Load data infile" damage table
Submitted: 26 Mar 2008 11:25 Modified: 16 Dec 2008 11:52
Reporter: Susanne Ebrecht Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: MyISAM storage engine Severity:S3 (Non-critical)
Version:5.1.24 OS:Any
Assigned to: CPU Architecture:Any

[26 Mar 2008 11:25] Susanne Ebrecht
Description:
mysql> show create table t;

nothing happens ... I pressed ctrl-c after 3 minutes

mysql> select count(*) from t;

also nothing happens for more then 3 minutes

mysql> delete from t;

nothing happens ... 

mysql> drop table t;

nothing

mysql> \q

$ bin/mysql mydb

mysql> show create table t;

the same ... waiting until the end of the world. Also for "DROP" or "DELETE".

Looking to the data directory shows that table t exists.

Only a daemon restart let me drop the table.

How to repeat:
Tested with 5.1-bk:

mysql> create table t(id serial, num integer, t text);
mysql> insert into t(num, t) values(rand()*1000, 'abc');
mysql> insert into t(num, t) select rand()*1000, t from t;

do this until you have round about 4*10^6 rows in the table.

mysql> select * from t into outfile 'test';

mysql> delete from t;

This only needs a few seconds ...

mysql> load data infile 'test' into table t;

During this process:

$ kill -9 PID_FOR_MYSQL_CLI

$ bin/mysql mydb

mysql>show create table t;

you will see this hangs.

Suggested fix:
No idea
[16 Dec 2008 11:52] Susanne Ebrecht
Can't repeat this behaviour by using MySQL 5.1.31 (actual bzr tree).