diff options
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/mysql-test-run.sh | 2 | ||||
-rw-r--r-- | mysql-test/r/innodb.result | 2 | ||||
-rw-r--r-- | mysql-test/r/truncate.result | 1 | ||||
-rw-r--r-- | mysql-test/t/drop.test | 8 | ||||
-rw-r--r-- | mysql-test/t/innodb.test | 34 | ||||
-rw-r--r-- | mysql-test/t/truncate.test | 6 |
6 files changed, 47 insertions, 6 deletions
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index a9c16107a7f..e560dab1c9b 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -171,7 +171,7 @@ while test $# -gt 0; do ;; --mysqld=*) TMP=`$ECHO "$1" | $SED -e "s;--mysqld=;;"` - EXTRA_MYSQL_TEST_OPT="$EXTRA_MYSQL_TEST_OPT $TMP" + EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT $TMP" EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT $TMP" ;; --gcov ) diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 84a3151577c..67aa024b117 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -479,3 +479,5 @@ id name value uid 1 one one value 101 3 three three value 103 6 two other value 102 +a +a diff --git a/mysql-test/r/truncate.result b/mysql-test/r/truncate.result index 716b38c57c7..e091bb8c73a 100644 --- a/mysql-test/r/truncate.result +++ b/mysql-test/r/truncate.result @@ -2,3 +2,4 @@ count(*) 0 count(*) 1 +a b c1 diff --git a/mysql-test/t/drop.test b/mysql-test/t/drop.test index 2a45fe8253b..50a33762776 100644 --- a/mysql-test/t/drop.test +++ b/mysql-test/t/drop.test @@ -28,16 +28,16 @@ drop database foo; # test drop/create database and FLUSH TABLES WITH READ LOCK drop database if exists foo; flush tables with read lock; ---error 1209 +--error 1209,1218; create database foo; unlock tables; create database foo; show databases; flush tables with read lock; ---error 1208 +--error 1208,1218; drop database foo; unlock tables; drop database foo; show databases; - - +--error 1008 +drop database foo; diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index 5530e2b1f54..0d2eb09eabd 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -512,3 +512,37 @@ replace into t1 (value,name,uid) values ('other value','two',102); select * from t1; drop table t1; +# +# Test DROP DATABASE +# + +create database test_$1; +create table test_$1.t1 (a int not null) type= innodb; +insert into test_$1.t1 values(1); +create table test_$1.t2 (a int not null) type= myisam; +insert into test_$1.t2 values(1); +create table test_$1.t3 (a int not null) type= heap; +insert into test_$1.t3 values(1); +commit; +drop database test_$1; +--error 12 +show tables from test_$1; + +# +# Test truncate table +# + +create table t1 (a int not null) type= innodb; +insert into t1 values(1),(2); +--error 1192 +truncate table t1; +commit; +truncate table t1; +select * from t1; +insert into t1 values(1),(2); +delete from t1; +select * from t1; +commit; +drop table t1; + + diff --git a/mysql-test/t/truncate.test b/mysql-test/t/truncate.test index e995517cf1e..2430682a93f 100644 --- a/mysql-test/t/truncate.test +++ b/mysql-test/t/truncate.test @@ -2,10 +2,14 @@ # Test of truncate # create table t1 (a integer, b integer,c1 CHAR(10)); +insert into t1 (a) values (1),(2); truncate table t1; select count(*) from t1; insert into t1 values(1,2,"test"); select count(*) from t1; +delete from t1; +select * from t1; drop table t1; # The following should fail -!$1146 select count(*) from t1; +--error 1146 +select count(*) from t1; |