| 1 |
DROP TABLE IF EXISTS t1; |
| 2 |
create table t1(a int) engine=myisam; |
| 3 |
select * into outfile 'MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' from t1; |
| 4 |
drop table t1; |
| 5 |
create table t1(a int) engine=ndb; |
| 6 |
load data local infile 'MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' into table t1; |
| 7 |
select count(*) from t1; |
| 8 |
count(*) |
| 9 |
10000 |
| 10 |
drop table t1; |
| 11 |
create table t1(a int) engine=myisam; |
| 12 |
insert into t1 values (1), (2), (2), (3); |
| 13 |
select * into outfile 'MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' from t1; |
| 14 |
drop table t1; |
| 15 |
create table t1(a int primary key) engine=ndb; |
| 16 |
load data local infile 'MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' into table t1; |
| 17 |
Warnings: |
| 18 |
Warning 1062 Duplicate entry '2' for key 't1.PRIMARY' |
| 19 |
select * from t1 order by a; |
| 20 |
a |
| 21 |
1 |
| 22 |
2 |
| 23 |
3 |
| 24 |
drop table t1; |
| 25 |
create table t1(a int) engine=myisam; |
| 26 |
insert into t1 values (1), (1), (2), (3); |
| 27 |
select * into outfile 'MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' from t1; |
| 28 |
drop table t1; |
| 29 |
create table t1(a int primary key) engine=ndb; |
| 30 |
load data local infile 'MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' into table t1; |
| 31 |
Warnings: |
| 32 |
Warning 1062 Duplicate entry '1' for key 't1.PRIMARY' |
| 33 |
select * from t1 order by a; |
| 34 |
a |
| 35 |
1 |
| 36 |
2 |
| 37 |
3 |
| 38 |
drop table t1; |
| 39 |
create table t1(a int) engine=myisam; |
| 40 |
insert into t1 values (1), (2), (3), (3); |
| 41 |
select * into outfile 'MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' from t1; |
| 42 |
drop table t1; |
| 43 |
create table t1(a int primary key) engine=ndb; |
| 44 |
load data local infile 'MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' into table t1; |
| 45 |
Warnings: |
| 46 |
Warning 1062 Duplicate entry '3' for key 't1.PRIMARY' |
| 47 |
select * from t1 order by a; |
| 48 |
a |
| 49 |
1 |
| 50 |
2 |
| 51 |
3 |
| 52 |
drop table t1; |