Bug #19493 NDB does not ignore duplicate keys when using LOAD DATA LOCAL
Submitted: 2 May 2006 21:02 Modified: 15 Jun 2006 10:21
Reporter: Jonathan Miller Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:4.1 -> OS:Linux (Linux 32 Bit OS)
Assigned to: Tomas Ulin CPU Architecture:Any

[2 May 2006 21:02] Jonathan Miller
Description:
Comments from test case:

# Now let us test how well we replicate LOAD DATA LOCAL in situation when
# we met duplicates in tables to which we are adding rows.
# (It supposed that LOAD DATA LOCAL ignores such errors)

rpl_loaddatalocal.test fails when using ndb as default engine with:

TEST                           RESULT         TIME (ms)
-------------------------------------------------------

rpl_loaddatalocal              [ fail ]

Errors are (from /home/ndbdev/jmiller/clones/mysql-5.1-new/mysql-test/var/log/mysqltest-time) :
mysqltest: At line 54: query 'load data local infile '/home/ndbdev/jmiller/clones/mysql-5.1-new/mysql-test/var/master-data/rpl_loaddatalocal.select_outfile' into table t1' failed: 1022: Can't write; duplicate key in table 't1'
(the last lines may be the most important ones)
Result from queries before failure can be found in r/rpl_loaddatalocal.log

How to repeat:
./mysql-test-run.pl --do-test=rpl_loaddatalocal --force --mysqld=--default-storage-engine=ndb --with-ndbcluster-all

Suggested fix:
NDB should ingore duplicate errors when LOAD DATA LOCAL is in use
[6 May 2006 0:27] Tomas Ulin
I don't get a problem with the dup key error when running this

however LOAD DATA LOCAL does not work correcty for ndb... it does not load all values for me

(changing category, since it is not a replication bug)
[14 Jun 2006 16:25] 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/7645
[14 Jun 2006 16:31] 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/7647
[14 Jun 2006 20:42] Tomas Ulin
pushed to 4.1.21 5.0.23 5.1.12
[15 Jun 2006 10:21] 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.1.21/5.0.23/5.1.12changelogs; closed.