diff options
author | unknown <monty@hundin.mysql.fi> | 2001-06-24 22:11:00 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-06-24 22:11:00 +0300 |
commit | a96e1b6954f56504b831c61bae50899b79575827 (patch) | |
tree | 2c5662a19583d6ae066e383d5de337ae60cf618f /mysql-test | |
parent | 8f33f8d4d36080b161fac72971239afd4bf3137f (diff) | |
download | mariadb-git-a96e1b6954f56504b831c61bae50899b79575827.tar.gz |
Fixed bug in multi-table-delete code
client/mysqltest.c:
Added --big-test argument
libmysqld/lib_sql.cc:
Reset error messages before new query.
libmysqld/lib_vio.c:
Fixed reading of results.
mysql-test/mysql-test-run.sh:
Added option --big
mysql-test/r/multi_update.result:
More multi-delete tests
mysql-test/t/bdb-crash.test:
Added missing test if BDB is supported
mysql-test/t/multi_update.test:
More multi-delete tests
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/mysql-test-run.sh | 2 | ||||
-rw-r--r-- | mysql-test/r/multi_update.result | 36 | ||||
-rw-r--r-- | mysql-test/t/bdb-crash.test | 1 | ||||
-rw-r--r-- | mysql-test/t/multi_update.test | 28 |
4 files changed, 47 insertions, 20 deletions
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index 76a64adc95b..a822f0c7a81 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -151,6 +151,8 @@ while test $# -gt 0; do DO_BENCH=1 NO_SLAVE=1 ;; + --big*) # Actually --big-test + EXTRA_MYSQL_TEST_OPT="$EXTRA_MYSQL_TEST_OPT $1" ;; --sleep=*) EXTRA_MYSQL_TEST_OPT="$EXTRA_MYSQL_TEST_OPT $1" SLEEP_TIME=`$ECHO "$1" | $SED -e "s;--sleep=;;"` diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result index f8c51f25237..6358e2a81cd 100644 --- a/mysql-test/r/multi_update.result +++ b/mysql-test/r/multi_update.result @@ -1,14 +1,22 @@ -id1 t -1 3 -2 2 -id2 t -1 3 -1 2 -1 1 -id3 t -2 3 -2 2 -2 1 -1 3 -1 2 -1 1 +Table Op Msg_type Msg_text +test.t1 check status OK +test.t2 check status OK +test.t3 check status OK +count(*) +0 +count(*) +0 +count(*) +0 +count(*) +0 +count(*) +0 +count(*) +0 +count(*) +0 +count(*) +0 +count(*) +0 diff --git a/mysql-test/t/bdb-crash.test b/mysql-test/t/bdb-crash.test index 05ab7260d23..e2d2cd42be2 100644 --- a/mysql-test/t/bdb-crash.test +++ b/mysql-test/t/bdb-crash.test @@ -1,3 +1,4 @@ +-- source include/have_bdb.inc # test for bug reported by Mark Steele drop table if exists tblChange; diff --git a/mysql-test/t/multi_update.test b/mysql-test/t/multi_update.test index 2b7c8587dc4..0ab255a9532 100644 --- a/mysql-test/t/multi_update.test +++ b/mysql-test/t/multi_update.test @@ -1,3 +1,10 @@ +# +# Only run the test if we are using --big-test, because this test takes a +# long time +# +-- require r/big_test.require +eval select $BIG_TEST as using_big_test; + drop table if exists t1,t2,t3; create table t1(id1 int not null auto_increment primary key, t char(12)); create table t2(id2 int not null, t char(12), index(id2)); @@ -25,11 +32,20 @@ delete t1.*, t2.*, t3.* from t1,t2,t3 where t1.id1 = t2.id2 and t2.id2 = t3.id3 check table t1, t2, t3; -select * from t1 where id1 > 9500; -select * from t2 where id2 > 9500; -select * from t3 where id3 > 9500; +select count(*) from t1 where id1 > 9500; +select count(*) from t2 where id2 > 9500; +select count(*) from t3 where id3 > 9500; delete t1, t2, t3 from t1,t2,t3 where t1.id1 = t2.id2 and t2.id2 = t3.id3 and t1.id1 > 500; -select * from t1 where id1 > 500; -select * from t2 where id2 > 500; -select * from t3 where id3 > 500; +select count(*) from t1 where id1 > 500; +select count(*) from t2 where id2 > 500; +select count(*) from t3 where id3 > 500; + +delete t1, t2, t3 from t1,t2,t3 where t1.id1 = t2.id2 and t2.id2 = t3.id3 and t1.id1 > 0; + +# These queries will force a scan of the table +select count(*) from t1 where id1; +select count(*) from t2 where id2; +select count(*) from t3 where id3; + +drop table t1,t2,t3; |