Bug #17081 "LOAD DATA INFILE" may not load all the data
Submitted: 2 Feb 2006 19:55 Modified: 14 Feb 2006 9:20
Reporter: Jonathan Miller Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:4.1-> OS:Linux (Linux)
Assigned to: Tomas Ulin CPU Architecture:Any

[2 Feb 2006 19:55] Jonathan Miller
Description:
I was working on rpl_LD_Infile.test trying to get it to pass when using NDB as the default engine. Once I got the result and reject file side by side in my compare tool I noticed that one of the issues is that for NDB it was missing some of the data on the master, not just the slave.

I have broken the test case down where replication is not needed to produce the issues.

This is a release build done today for a freshly pulled clone.

This is the output for an MyISAM table:

DROP TABLE IF EXISTS test.t1;
CREATE TABLE test.t1 (a VARCHAR(255), PRIMARY KEY(a))ENGINE=MyISAM;
LOAD DATA INFILE '../../std_data/words2.dat' INTO TABLE test.t1;
SELECT * FROM test.t1 ORDER BY a DESC;
a
aberration
aberrant
Abernathy
Aberdeen
Abelson
Abelian
Abel
abed
Abe
abducts
abductors
abductor
abductions
abduction
abducted
abduct
abdominal
abdomens
abdomen
Abby
abbreviations
abbreviation
abbreviating
abbreviates
abbreviated
abbreviate
Abbott
abbots
abbot
abbeys
abbey
abbe
Abba
abating
abates
abater
abatements
abatement
abated
abate
abasing
abashing
abashes
abashed
abash
abases
abasements
abasement
abased
abase
DROP TABLE test.t1;

This is the output if NDB is used:

DROP TABLE IF EXISTS test.t1;
CREATE TABLE test.t1 (a VARCHAR(255), PRIMARY KEY(a))ENGINE=NDB;
LOAD DATA INFILE '../../std_data/words2.dat' INTO TABLE test.t1;
SELECT * FROM test.t1 ORDER BY a DESC;
a
abbreviations
abbreviation
abbreviating
abbreviates
abbreviated
abbreviate
Abbott
abbots
abbot
abbeys
abbey
abbe
Abba
abating
abates
abater
abatements
abatement
abated
abate
abasing
abashing
abashes
abashed
abash
abases
abasements
abasement
abased
abase
DROP TABLE test.t1;

How to repeat:
1) Create a test file that contains the test listed below.
2) Create an empty result file
3) Run once using MyISAM thought mysql-test-run
4) Run again using NDB for the table type.

Test Case:
# Begin clean up test section
--disable_warnings
DROP TABLE IF EXISTS test.t1;
--enable_warnings
CREATE TABLE test.t1 (a VARCHAR(255), PRIMARY KEY(a))ENGINE=NDB;
LOAD DATA INFILE '../../std_data/words2.dat' INTO TABLE test.t1;
sleep 30;
SELECT * FROM test.t1 ORDER BY a DESC;
DROP TABLE test.t1;
[6 Feb 2006 22:09] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/2214
[7 Feb 2006 8:23] Tomas Ulin
pushed into 5.0.19 and 4.1.19

will be pushed into 5.1.7 onece merge jam is released
[7 Feb 2006 9:36] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/2222
[7 Feb 2006 9:52] Tomas Ulin
pushed to 5.1.7
[14 Feb 2006 9:20] Jon Stephens
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Documented bugfix in 4.0.19, 5.0.19, and 5.1.7 changelogs. Closed.