Browse Source
Merge poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
Merge poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0 sql/ha_ndbcluster.cc: manual mergepull/374/head
3 changed files with 134 additions and 0 deletions
-
46mysql-test/r/ndb_loaddatalocal.result
-
70mysql-test/t/ndb_loaddatalocal.test
-
18sql/ha_ndbcluster.cc
@ -0,0 +1,46 @@ |
|||
DROP TABLE IF EXISTS t1; |
|||
create table t1(a int) engine=myisam; |
|||
select * into outfile 'MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1; |
|||
drop table t1; |
|||
create table t1(a int) engine=ndb; |
|||
load data local infile 'MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1; |
|||
select count(*) from t1; |
|||
count(*) |
|||
10000 |
|||
drop table t1; |
|||
create table t1(a int) engine=myisam; |
|||
insert into t1 values (1), (2), (2), (3); |
|||
select * into outfile 'MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1; |
|||
drop table t1; |
|||
create table t1(a int primary key) engine=ndb; |
|||
load data local infile 'MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1; |
|||
select * from t1 order by a; |
|||
a |
|||
1 |
|||
2 |
|||
3 |
|||
drop table t1; |
|||
create table t1(a int) engine=myisam; |
|||
insert into t1 values (1), (1), (2), (3); |
|||
select * into outfile 'MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1; |
|||
drop table t1; |
|||
create table t1(a int primary key) engine=ndb; |
|||
load data local infile 'MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1; |
|||
select * from t1 order by a; |
|||
a |
|||
1 |
|||
2 |
|||
3 |
|||
drop table t1; |
|||
create table t1(a int) engine=myisam; |
|||
insert into t1 values (1), (2), (3), (3); |
|||
select * into outfile 'MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1; |
|||
drop table t1; |
|||
create table t1(a int primary key) engine=ndb; |
|||
load data local infile 'MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1; |
|||
select * from t1 order by a; |
|||
a |
|||
1 |
|||
2 |
|||
3 |
|||
drop table t1; |
|||
@ -0,0 +1,70 @@ |
|||
-- source include/have_ndb.inc |
|||
-- source include/not_embedded.inc |
|||
|
|||
--disable_warnings |
|||
DROP TABLE IF EXISTS t1; |
|||
--enable_warnings |
|||
|
|||
create table t1(a int) engine=myisam; |
|||
let $1=10000; |
|||
disable_query_log; |
|||
set SQL_LOG_BIN=0; |
|||
while ($1) |
|||
{ |
|||
insert into t1 values(1); |
|||
dec $1; |
|||
} |
|||
set SQL_LOG_BIN=1; |
|||
enable_query_log; |
|||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
|||
eval select * into outfile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1; |
|||
#This will generate a 20KB file, now test LOAD DATA LOCAL |
|||
drop table t1; |
|||
|
|||
create table t1(a int) engine=ndb; |
|||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
|||
eval load data local infile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1; |
|||
select count(*) from t1; |
|||
system rm $MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile ; |
|||
drop table t1; |
|||
|
|||
create table t1(a int) engine=myisam; |
|||
insert into t1 values (1), (2), (2), (3); |
|||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
|||
eval select * into outfile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1; |
|||
drop table t1; |
|||
|
|||
create table t1(a int primary key) engine=ndb; |
|||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
|||
eval load data local infile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1; |
|||
system rm $MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile; |
|||
select * from t1 order by a; |
|||
drop table t1; |
|||
|
|||
create table t1(a int) engine=myisam; |
|||
insert into t1 values (1), (1), (2), (3); |
|||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
|||
eval select * into outfile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1; |
|||
drop table t1; |
|||
|
|||
create table t1(a int primary key) engine=ndb; |
|||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
|||
eval load data local infile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1; |
|||
system rm $MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile; |
|||
select * from t1 order by a; |
|||
drop table t1; |
|||
|
|||
create table t1(a int) engine=myisam; |
|||
insert into t1 values (1), (2), (3), (3); |
|||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
|||
eval select * into outfile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1; |
|||
drop table t1; |
|||
|
|||
create table t1(a int primary key) engine=ndb; |
|||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
|||
eval load data local infile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1; |
|||
system rm $MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile; |
|||
select * from t1 order by a; |
|||
drop table t1; |
|||
|
|||
# End of 4.1 tests |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue