summaryrefslogtreecommitdiff
path: root/mysql-test/suite/ndb/t
diff options
context:
space:
mode:
authormsvensson@pilot.mysql.com <>2008-02-28 12:21:44 +0100
committermsvensson@pilot.mysql.com <>2008-02-28 12:21:44 +0100
commit56a354794c9c9ef13aad39ac45c5d525024c988c (patch)
tree1a7e1ed12d61ecd778a2370fd8db32bb46c5015d /mysql-test/suite/ndb/t
parentae3f30828b48708f0c4ceade46dba08fe872c92e (diff)
parent0462076eacd374299d8599407a38ab8d516b5ed1 (diff)
downloadmariadb-git-56a354794c9c9ef13aad39ac45c5d525024c988c.tar.gz
Merge pilot.mysql.com:/data/msvensson/mysql/mysql-5.1-rpl
into pilot.mysql.com:/data/msvensson/mysql/mysql-5.1-mtr
Diffstat (limited to 'mysql-test/suite/ndb/t')
-rw-r--r--mysql-test/suite/ndb/t/ndb_alter_table.test9
-rw-r--r--mysql-test/suite/ndb/t/ndb_binlog_discover.test2
-rw-r--r--mysql-test/suite/ndb/t/ndb_config.test8
-rw-r--r--mysql-test/suite/ndb/t/ndb_load.test4
-rw-r--r--mysql-test/suite/ndb/t/ndb_loaddatalocal.test41
-rw-r--r--mysql-test/suite/ndb/t/ndb_replace.test4
-rw-r--r--mysql-test/suite/ndb/t/ndb_single_user.test12
-rw-r--r--mysql-test/suite/ndb/t/ndb_trigger.test2
-rw-r--r--mysql-test/suite/ndb/t/ndbapi.test16
9 files changed, 50 insertions, 48 deletions
diff --git a/mysql-test/suite/ndb/t/ndb_alter_table.test b/mysql-test/suite/ndb/t/ndb_alter_table.test
index 082fe726927..6dc3088137d 100644
--- a/mysql-test/suite/ndb/t/ndb_alter_table.test
+++ b/mysql-test/suite/ndb/t/ndb_alter_table.test
@@ -362,7 +362,8 @@ CREATE TABLE t1 (
CREATE TEMPORARY TABLE ndb_show_tables (id INT, type VARCHAR(20), state VARCHAR(20), logging VARCHAR(20), _database VARCHAR(255), _schema VARCHAR(20), name VARCHAR(255));
--disable_warnings
---exec $NDB_TOOLS_DIR/ndb_show_tables --p > $MYSQLTEST_VARDIR/master-data/test/tmp.dat
+let $MYSQLD_DATADIR= `select @@datadir`;
+--exec $NDB_TOOLS_DIR/ndb_show_tables --p > $MYSQLD_DATADIR/test/tmp.dat
LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables;
--enable_warnings
@@ -372,7 +373,7 @@ truncate ndb_show_tables;
alter table t1 change tiny new_tiny tinyint(4) DEFAULT '0' NOT NULL;
--disable_warnings
---exec $NDB_TOOLS_DIR/ndb_show_tables --p > $MYSQLTEST_VARDIR/master-data/test/tmp.dat
+--exec $NDB_TOOLS_DIR/ndb_show_tables --p > $MYSQLD_DATADIR/test/tmp.dat
LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables;
--enable_warnings
@@ -386,9 +387,9 @@ alter table t1 add index i2(new_tiny);
drop index i1 on t1;
--disable_warnings
---exec $NDB_TOOLS_DIR/ndb_show_tables --p > $MYSQLTEST_VARDIR/master-data/test/tmp.dat
+--exec $NDB_TOOLS_DIR/ndb_show_tables --p > $MYSQLD_DATADIR/test/tmp.dat
LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables;
---exec rm $MYSQLTEST_VARDIR/master-data/test/tmp.dat || true
+--exec rm $MYSQLD_DATADIR/test/tmp.dat || true
--enable_warnings
select 'no_copy' from ndb_show_tables where id = @t1_id and name like '%t1%';
diff --git a/mysql-test/suite/ndb/t/ndb_binlog_discover.test b/mysql-test/suite/ndb/t/ndb_binlog_discover.test
index e842b57093a..dc8275a8a39 100644
--- a/mysql-test/suite/ndb/t/ndb_binlog_discover.test
+++ b/mysql-test/suite/ndb/t/ndb_binlog_discover.test
@@ -30,7 +30,7 @@ while ($mysql_errno)
--enable_query_log
--source include/show_binlog_events2.inc
-PURGE MASTER LOGS TO 'master-bin.000002';
+PURGE MASTER LOGS TO 'mysqld-bin.000002';
--source include/show_binlog_events2.inc
drop table t1;
diff --git a/mysql-test/suite/ndb/t/ndb_config.test b/mysql-test/suite/ndb/t/ndb_config.test
index f63c0087c1e..08d1226953c 100644
--- a/mysql-test/suite/ndb/t/ndb_config.test
+++ b/mysql-test/suite/ndb/t/ndb_config.test
@@ -6,7 +6,7 @@
--exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid,host,DataMemory,IndexMemory --type=ndbd 2> /dev/null
--exec $NDB_TOOLS_DIR/ndb_config --no-defaults -r \\\n -f " " --query=nodeid,host,DataMemory,IndexMemory --type=ndbd 2> /dev/null
--exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid --type=ndbd --host=localhost 2> /dev/null
---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=type,nodeid,host --config-file=$NDB_BACKUP_DIR/config.ini 2> /dev/null
+--exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=type,nodeid,host --config-file=$MYSQL_TEST_DIR/std_data/ndb_config_config.ini 2> /dev/null
# End of 4.1 tests
@@ -18,6 +18,6 @@
--exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster2 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --ndb-shm --connections --query=type,nodeid1,nodeid2,group,nodeidserver --mycnf 2> /dev/null
---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid --host=localhost --config-file=$NDB_BACKUP_DIR/config.ini 2> /dev/null
---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid --host=1.2.3.4 --config-file=$NDB_BACKUP_DIR/config.ini 2> /dev/null
---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid --host=127.0.0.1 --config-file=$NDB_BACKUP_DIR/config.ini 2> /dev/null
+--exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid --host=localhost --config-file=$MYSQL_TEST_DIR/std_data/ndb_config_config.ini 2> /dev/null
+--exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid --host=1.2.3.4 --config-file=$MYSQL_TEST_DIR/std_data/ndb_config_config.ini 2> /dev/null
+--exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid --host=127.0.0.1 --config-file=$MYSQL_TEST_DIR/std_data/ndb_config_config.ini 2> /dev/null
diff --git a/mysql-test/suite/ndb/t/ndb_load.test b/mysql-test/suite/ndb/t/ndb_load.test
index af2df70b74e..aa48b3dfdcf 100644
--- a/mysql-test/suite/ndb/t/ndb_load.test
+++ b/mysql-test/suite/ndb/t/ndb_load.test
@@ -12,12 +12,12 @@ DROP TABLE IF EXISTS t1;
# should give duplicate key
CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=NDB;
--error 1022
-LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1 ;
+LOAD DATA INFILE '../../../std_data/words.dat' INTO TABLE t1 ;
DROP TABLE t1;
# now without a primary key we should be ok
CREATE TABLE t1 (word CHAR(20) NOT NULL) ENGINE=NDB;
-LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1 ;
+LOAD DATA INFILE '../../../std_data/words.dat' INTO TABLE t1 ;
SELECT * FROM t1 ORDER BY word;
DROP TABLE t1;
diff --git a/mysql-test/suite/ndb/t/ndb_loaddatalocal.test b/mysql-test/suite/ndb/t/ndb_loaddatalocal.test
index 3eae3891f43..257a26087b7 100644
--- a/mysql-test/suite/ndb/t/ndb_loaddatalocal.test
+++ b/mysql-test/suite/ndb/t/ndb_loaddatalocal.test
@@ -15,55 +15,56 @@ while ($1)
dec $1;
}
set SQL_LOG_BIN=1;
+let $MYSQLD_DATADIR= `select @@datadir`;
enable_query_log;
---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
-eval select * into outfile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1;
+--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
+eval select * into outfile '$MYSQLD_DATADIR/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;
+--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
+eval load data local infile '$MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' into table t1;
select count(*) from t1;
---remove_file $MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile
+--remove_file $MYSQLD_DATADIR/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;
+--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
+eval select * into outfile '$MYSQLD_DATADIR/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;
---remove_file $MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile
+--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
+eval load data local infile '$MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' into table t1;
+--remove_file $MYSQLD_DATADIR/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;
+--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
+eval select * into outfile '$MYSQLD_DATADIR/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;
---remove_file $MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile
+--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
+eval load data local infile '$MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' into table t1;
+--remove_file $MYSQLD_DATADIR/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;
+--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
+eval select * into outfile '$MYSQLD_DATADIR/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;
---remove_file $MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile
+--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
+eval load data local infile '$MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' into table t1;
+--remove_file $MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile
select * from t1 order by a;
drop table t1;
diff --git a/mysql-test/suite/ndb/t/ndb_replace.test b/mysql-test/suite/ndb/t/ndb_replace.test
index aa2072b98dd..432cf7f2dcd 100644
--- a/mysql-test/suite/ndb/t/ndb_replace.test
+++ b/mysql-test/suite/ndb/t/ndb_replace.test
@@ -85,12 +85,12 @@ select * from t1 order by pk;
delete from t1;
# Test for load data replace which updates pk
insert into t1 values (1, 1, 1), (4, 4, 4), (6, 6, 6);
-load data infile '../std_data_ln/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (pk, apk);
+load data infile '../../../std_data/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (pk, apk);
select * from t1 order by pk;
delete from t1;
# Now test for load data replace which doesn't touch pk
insert into t1 values (1, 1, 1), (3, 3, 3), (5, 5, 5);
-load data infile '../std_data_ln/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (pk, apk);
+load data infile '../../../std_data/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (pk, apk);
select * from t1 order by pk;
delete from t1;
# Finally test for both types of replace ... select
diff --git a/mysql-test/suite/ndb/t/ndb_single_user.test b/mysql-test/suite/ndb/t/ndb_single_user.test
index 07925b25917..76a4307f226 100644
--- a/mysql-test/suite/ndb/t/ndb_single_user.test
+++ b/mysql-test/suite/ndb/t/ndb_single_user.test
@@ -15,8 +15,8 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
--eval set @node_id= SUBSTRING('$node_id', 20)+0
--enable_query_log
--let $node_id= `SELECT @node_id`
---exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "enter single user mode $node_id" >> $NDB_TOOLS_OUTPUT
---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" --single-user >> $NDB_TOOLS_OUTPUT
+--exec $NDB_MGM --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" -e "enter single user mode $node_id" >> $NDB_TOOLS_OUTPUT
+--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" --single-user >> $NDB_TOOLS_OUTPUT
# verify that we are indeed in single user mode
# and test that some operations give correct errors
@@ -124,7 +124,7 @@ update t1 set b=b+100;
--error 1296
update t1 set b=b+100 where a > 7;
---exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "exit single user mode" >> $NDB_TOOLS_OUTPUT
+--exec $NDB_MGM --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" -e "exit single user mode" >> $NDB_TOOLS_OUTPUT
--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults >> $NDB_TOOLS_OUTPUT
#
@@ -139,8 +139,8 @@ BEGIN;
update t1 set b=b+100 where a=2;
# enter single user mode
---exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "enter single user mode $node_id" >> $NDB_TOOLS_OUTPUT
---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" --single-user >> $NDB_TOOLS_OUTPUT
+--exec $NDB_MGM --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" -e "enter single user mode $node_id" >> $NDB_TOOLS_OUTPUT
+--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" --single-user >> $NDB_TOOLS_OUTPUT
--connection server1
update t1 set b=b+100 where a=3;
@@ -160,7 +160,7 @@ create table t2 (a int) engine myisam;
alter table t2 add column (b int);
# exit single user mode
---exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "exit single user mode" >> $NDB_TOOLS_OUTPUT
+--exec $NDB_MGM --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" -e "exit single user mode" >> $NDB_TOOLS_OUTPUT
--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults >> $NDB_TOOLS_OUTPUT
# cleanup
diff --git a/mysql-test/suite/ndb/t/ndb_trigger.test b/mysql-test/suite/ndb/t/ndb_trigger.test
index 2e944174fd0..9f01157fc93 100644
--- a/mysql-test/suite/ndb/t/ndb_trigger.test
+++ b/mysql-test/suite/ndb/t/ndb_trigger.test
@@ -98,7 +98,7 @@ delete from t1;
delete from t2;
# Check for load data replace
insert into t1 values (3, 1, 1.05), (5, 2, 2.05);
-load data infile '../std_data_ln/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (id, a);
+load data infile '../../../std_data/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (id, a);
select * from t1 order by id;
select * from t2 order by op, a, b;
update t4 set b = 10 where a = 1;
diff --git a/mysql-test/suite/ndb/t/ndbapi.test b/mysql-test/suite/ndb/t/ndbapi.test
index 3424513f8af..398a2cbfbfa 100644
--- a/mysql-test/suite/ndb/t/ndbapi.test
+++ b/mysql-test/suite/ndb/t/ndbapi.test
@@ -7,28 +7,28 @@ drop database if exists mysqltest;
--enable_warnings
--exec echo Running ndbapi_simple
---exec $NDB_EXAMPLES_DIR/ndbapi_simple/ndbapi_simple $MASTER_MYSOCK "localhost:$NDBCLUSTER_PORT" >> $NDB_EXAMPLES_OUTPUT
+--exec $NDB_EXAMPLES_DIR/ndbapi_simple/ndbapi_simple $MASTER_MYSOCK "$NDB_CONNECTSTRING" >> $NDB_EXAMPLES_OUTPUT
--exec echo Running ndbapi_simple_index
---exec $NDB_EXAMPLES_DIR/ndbapi_simple_index/ndbapi_simple_index $MASTER_MYSOCK "localhost:$NDBCLUSTER_PORT" >> $NDB_EXAMPLES_OUTPUT
+--exec $NDB_EXAMPLES_DIR/ndbapi_simple_index/ndbapi_simple_index $MASTER_MYSOCK "$NDB_CONNECTSTRING" >> $NDB_EXAMPLES_OUTPUT
--exec echo Running ndbapi_scan
---exec $NDB_EXAMPLES_DIR/ndbapi_scan/ndbapi_scan $MASTER_MYSOCK "localhost:$NDBCLUSTER_PORT" >> $NDB_EXAMPLES_OUTPUT
+--exec $NDB_EXAMPLES_DIR/ndbapi_scan/ndbapi_scan $MASTER_MYSOCK "$NDB_CONNECTSTRING" >> $NDB_EXAMPLES_OUTPUT
--exec echo Running ndbapi_retries
---exec $NDB_EXAMPLES_DIR/ndbapi_retries/ndbapi_retries $MASTER_MYSOCK "localhost:$NDBCLUSTER_PORT" >> $NDB_EXAMPLES_OUTPUT
+--exec $NDB_EXAMPLES_DIR/ndbapi_retries/ndbapi_retries $MASTER_MYSOCK "$NDB_CONNECTSTRING" >> $NDB_EXAMPLES_OUTPUT
--exec echo Running ndbapi_async
---exec $NDB_EXAMPLES_DIR/ndbapi_async/ndbapi_async $MASTER_MYSOCK "localhost:$NDBCLUSTER_PORT" >> $NDB_EXAMPLES_OUTPUT
+--exec $NDB_EXAMPLES_DIR/ndbapi_async/ndbapi_async $MASTER_MYSOCK "$NDB_CONNECTSTRING" >> $NDB_EXAMPLES_OUTPUT
--exec echo Running ndbapi_async1
---exec $NDB_EXAMPLES_DIR/ndbapi_async1/ndbapi_async1 $MASTER_MYSOCK "localhost:$NDBCLUSTER_PORT" >> $NDB_EXAMPLES_OUTPUT
+--exec $NDB_EXAMPLES_DIR/ndbapi_async1/ndbapi_async1 $MASTER_MYSOCK "$NDB_CONNECTSTRING" >> $NDB_EXAMPLES_OUTPUT
use TEST_DB;
create table t0(c0 int, c1 int, c2 char(4), c3 char(4), c4 text,
primary key(c0, c2)) engine ndb charset latin1;
#--exec echo Running ndbapi_event
-#--exec $NDB_EXAMPLES_DIR/ndbapi_event/ndbapi_event "localhost:$NDBCLUSTER_PORT" 1 >> $NDB_EXAMPLES_OUTPUT
+#--exec $NDB_EXAMPLES_DIR/ndbapi_event/ndbapi_event "$NDB_CONNECTSTRING" 1 >> $NDB_EXAMPLES_OUTPUT
insert into t0 values (1, 2, 'a', 'b', null);
insert into t0 values (3, 4, 'c', 'd', null);
update t0 set c3 = 'e' where c0 = 1 and c2 = 'a'; -- use pk
@@ -41,4 +41,4 @@ delete from t0;
drop table t0;
--exec echo Running mgmapi_logevent
---exec $NDB_EXAMPLES_DIR/mgmapi_logevent/mgmapi_logevent "localhost:$NDBCLUSTER_PORT" 1 >> $NDB_EXAMPLES_OUTPUT
+--exec $NDB_EXAMPLES_DIR/mgmapi_logevent/mgmapi_logevent "$NDB_CONNECTSTRING" 1 >> $NDB_EXAMPLES_OUTPUT