From 0934ad5d7fb0bcbde436c9a99cf5cd262153b8e7 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 20 Feb 2006 13:04:40 +0100 Subject: Bug#17382 mysql-test-run mysqldump fails with mysqlimport client/Makefile.am: Use LDADD_R as common variable for programs to be linked with thread safe library. client/mysqlimport.c: Enable "--use-threads" Formatting mysql-test/r/mysqldump.result: Update test result mysql-test/t/disabled.def: Enable mysqldump mysql-test/t/mysqldump.test: Enable test for mysqlimport with threads Add test for failed mysqlimport --- mysql-test/t/mysqldump.test | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'mysql-test/t/mysqldump.test') diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index 90a6782200d..dc711975569 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -1049,7 +1049,6 @@ SET SQL_MODE = @old_sql_mode; DROP TRIGGER tr1; DROP TABLE t1; ---disable_parsing # # Added for use-thread option # @@ -1070,7 +1069,22 @@ select * from t2; --exec $MYSQL_IMPORT --silent --use-threads=5 test $MYSQLTEST_VARDIR/tmp/t1.txt $MYSQLTEST_VARDIR/tmp/t2.txt select * from t1; select * from t2; +# Now we test with multiple threads, but less threads than files. +create table words(a varchar(255)); +create table words2(b varchar(255)); +--exec $MYSQL_IMPORT --silent --use-threads=2 test $MYSQLTEST_VARDIR/tmp/t1.txt $MYSQLTEST_VARDIR/tmp/t2.txt $MYSQLTEST_VARDIR/std_data_ln/words.dat $MYSQLTEST_VARDIR/std_data_ln/words2.dat +select * from t1; +select * from t2; +select * from words; +select * from words2; + +# Drop table "words" and run with threads, should fail +drop table words; +--replace_regex /.*mysqlimport/mysql-import/ +--error 1 +--exec $MYSQL_IMPORT --silent --use-threads=2 test $MYSQLTEST_VARDIR/tmp/t1.txt $MYSQLTEST_VARDIR/tmp/t2.txt $MYSQLTEST_VARDIR/std_data_ln/words.dat $MYSQLTEST_VARDIR/std_data_ln/words2.dat 2>&1 drop table t1; drop table t2; ---enable_parsing + +drop table words2; -- cgit v1.2.1