Bug #18008 Load data infile to cluster fails
Submitted: 7 Mar 2006 8:08 Modified: 7 Mar 2006 11:16
Reporter: Johan Andersson Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:* OS:Linux (Linux)
Assigned to: CPU Architecture:Any

[7 Mar 2006 8:08] Johan Andersson
Description:
-bash-2.05b$ cat /tmp/test
1

create database d1;
use d1;
create table t1 (i int) engine=ndbcluster;

load data  infile '/tmp/test' into table t1;

-- Query OK, 1 row affected (0.07 sec)
-- Records: 1  Deleted: 0  Skipped: 0  Warnings: 0

select * from t1;
-- Empty set (0.00 sec)

How to repeat:
see above

Suggested fix:
-
[7 Mar 2006 11:16] Johan Andersson
see http://bugs.mysql.com/bug.php?id=17081
[10 Mar 2006 17:35] Gary Russell
For further information, we put together this test case as a result of us finding this problem in a bigger environment. In that environment, we saw three conditions.
 
1. Situations where no rows were loaded into a table.
2. Situations where some, but not all rows were loaded into a table.
3. Some tables loaded just fine.
 
We did not determine a pattern for the 3 cases, but it appeared consistent.
 
In particular, we had two tables where we attempted to load records. In one table we consistently loaded the first 89950 rows of 90000 (the last 50 rows in the input file were dropped); in another table, the last 32 of 10000 were dropped. This occurred each time we tried, even with different input data.

We detoured the problem by creating the tables as MyISAM and then altering them to NDB.