diff options
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/mysql-test-run.sh | 13 | ||||
-rw-r--r-- | mysql-test/r/have_symlink.require | 2 | ||||
-rw-r--r-- | mysql-test/r/symlink.result | 23 | ||||
-rw-r--r-- | mysql-test/t/bdb.test | 4 | ||||
-rw-r--r-- | mysql-test/t/err000001.test | 3 | ||||
-rw-r--r-- | mysql-test/t/innodb.test | 4 | ||||
-rw-r--r-- | mysql-test/t/overflow.test | 2 | ||||
-rw-r--r-- | mysql-test/t/status.test | 2 | ||||
-rw-r--r-- | mysql-test/t/symlink.test | 82 |
9 files changed, 123 insertions, 12 deletions
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index 969255d5e6e..2e282718b96 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -99,8 +99,9 @@ export MYSQL_TEST_DIR STD_DATA=$MYSQL_TEST_DIR/std_data hostname=`hostname` # Installed in the mysql privilege table -TESTDIR="$MYSQL_TEST_DIR/t/" +TESTDIR="$MYSQL_TEST_DIR/t" TESTSUFFIX=test +TOT_SKIP=0 TOT_PASS=0 TOT_FAIL=0 TOT_TEST=0 @@ -359,8 +360,10 @@ report_stats () { $ECHO "" $ECHO "The log files in $MYSQL_TEST_DIR/var/log may give you some hint" $ECHO "of what when wrong." - $ECHO "If you want to report this error, please read first the documentation at" - $ECHO "http://www.mysql.com/doc/M/y/MySQL_test_suite.html" + $ECHO "" + $ECHO "Please follow the instructions outlined at" + $ECHO "http://www.mysql.com/doc/R/e/Reporting_mysqltest_bugs.html" + $ECHO "to find the reason to this problem and how to report this." fi } @@ -640,7 +643,7 @@ run_testcase () timestr="$USERT $SYST $REALT" pname=`$ECHO "$tname "|$CUT -c 1-16` RES="$pname $timestr" - pass_inc + skip_inc $ECHO "$RES$RES_SPACE [ skipped ]" return fi @@ -747,7 +750,7 @@ run_testcase () $ECHO "Resuming Tests" $ECHO "" else - pass_inc + skip_inc $ECHO "$RES$RES_SPACE [ skipped ]" fi fi diff --git a/mysql-test/r/have_symlink.require b/mysql-test/r/have_symlink.require new file mode 100644 index 00000000000..55ad9437034 --- /dev/null +++ b/mysql-test/r/have_symlink.require @@ -0,0 +1,2 @@ +Variable_name Value +have_symlink YES diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result new file mode 100644 index 00000000000..71e8f79b890 --- /dev/null +++ b/mysql-test/r/symlink.result @@ -0,0 +1,23 @@ +Table Op Msg_type Msg_text +test.t9 check status OK +Table Op Msg_type Msg_text +test.t9 optimize status OK +Table Op Msg_type Msg_text +test.t9 repair status OK +Table Create Table +t9 CREATE TABLE `t9` ( + `a` int(11) NOT NULL auto_increment, + `b` char(16) NOT NULL default '', + `c` int(11) NOT NULL default '0', + PRIMARY KEY (`a`) +) TYPE=MyISAM +count(*) +16724 +Table Create Table +t9 CREATE TABLE `t9` ( + `a` int(11) NOT NULL auto_increment, + `b` char(16) NOT NULL default '', + `c` int(11) NOT NULL default '0', + `d` int(11) NOT NULL default '0', + PRIMARY KEY (`a`) +) TYPE=MyISAM diff --git a/mysql-test/t/bdb.test b/mysql-test/t/bdb.test index 96296e238fd..1042430cb78 100644 --- a/mysql-test/t/bdb.test +++ b/mysql-test/t/bdb.test @@ -686,7 +686,7 @@ drop table t1; create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) type=bdb; insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL'); LOCK TABLES t1 WRITE; ---error 690 +--error 1062 insert into t1 values (99,1,2,'D'),(1,1,2,'D'); select id from t1; select id from t1; @@ -697,7 +697,7 @@ create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(3 insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL'); LOCK TABLES t1 WRITE; begin; ---error 690 +--error 1062 insert into t1 values (99,1,2,'D'),(1,1,2,'D'); select id from t1; insert ignore into t1 values (100,1,2,'D'),(1,1,99,'D'); diff --git a/mysql-test/t/err000001.test b/mysql-test/t/err000001.test index 9957cefff9b..d9898054a83 100644 --- a/mysql-test/t/err000001.test +++ b/mysql-test/t/err000001.test @@ -10,7 +10,8 @@ create table t1 (a int); !$1054 select count(test.t1.b) from t1; !$1109 select count(not_existing_database.t1) from t1; !$1109 select count(not_existing_database.t1.a) from t1; -!$1044 select count(not_existing_database.t1.a) from not_existing_database.t1; +--error 1044,1146 +select count(not_existing_database.t1.a) from not_existing_database.t1; !$1054 select 1 from t1 order by 2; !$1054 select 1 from t1 group by 2; !$1054 select 1 from t1 order by t1.b; diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index cef53ce8165..84b861a9c47 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -437,7 +437,7 @@ drop table t1; create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) type=innodb; insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL'); LOCK TABLES t1 WRITE; ---error 690 +--error 1062 insert into t1 values (99,1,2,'D'),(1,1,2,'D'); select id from t1; select id from t1; @@ -448,7 +448,7 @@ create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(3 insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL'); LOCK TABLES t1 WRITE; begin; ---error 690 +--error 1062 insert into t1 values (99,1,2,'D'),(1,1,2,'D'); select id from t1; insert ignore into t1 values (100,1,2,'D'),(1,1,99,'D'); diff --git a/mysql-test/t/overflow.test b/mysql-test/t/overflow.test index 7a652257bac..6619a87cabb 100644 --- a/mysql-test/t/overflow.test +++ b/mysql-test/t/overflow.test @@ -1,4 +1,4 @@ connect (con1,localhost,boo,,); connection con1; --- error 1064; +-- error 1064,1102 drop database AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA; diff --git a/mysql-test/t/status.test b/mysql-test/t/status.test index 70a7a3ab584..bdfeb26073f 100644 --- a/mysql-test/t/status.test +++ b/mysql-test/t/status.test @@ -6,7 +6,7 @@ show status like 'Table_lock%'; connection con1; SET SQL_LOG_BIN=0; drop table if exists t1; -create table t1(n int); +create table t1(n int) type=myisam; insert into t1 values(1); connection con2; lock tables t1 read; diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test new file mode 100644 index 00000000000..5e2b8232844 --- /dev/null +++ b/mysql-test/t/symlink.test @@ -0,0 +1,82 @@ +-- require r/have_symlink.require +show variables like "have_symlink"; + +# +# First create little data to play with +# +drop table if exists t1,t2,t7,t8,t9; +create table t1 (a int not null auto_increment, b char(16) not null, primary key (a)); +create table t2 (a int not null auto_increment, b char(16) not null, primary key (a)); +insert into t1 (b) values ("test"),("test1"),("test2"),("test3"); +insert into t2 (b) select b from t1; +insert into t1 (b) select b from t2; +insert into t2 (b) select b from t1; +insert into t1 (b) select b from t2; +insert into t2 (b) select b from t1; +insert into t1 (b) select b from t2; +insert into t2 (b) select b from t1; +insert into t1 (b) select b from t2; +insert into t2 (b) select b from t1; +insert into t1 (b) select b from t2; +insert into t2 (b) select b from t1; +insert into t1 (b) select b from t2; +insert into t2 (b) select b from t1; +insert into t1 (b) select b from t2; +insert into t2 (b) select b from t1; +insert into t1 (b) select b from t2; +insert into t2 (b) select b from t1; +insert into t1 (b) select b from t2; +drop table t2; + +# +# Start the test +# We use t9 here to not crash with tables generated by the backup test +# + +eval create table t9 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam data directory="$MYSQL_TEST_DIR/var/tmp" index directory="$MYSQL_TEST_DIR/var/run"; +insert into t9 select * from t1; +check table t9; +optimize table t9; +repair table t9; +alter table t9 add column c int not null; +show create table t9; + +# Test renames +alter table t9 rename t8, add column d int not null; +alter table t8 rename t7; +rename table t7 to t9; +# Drop old t1 table, keep t9 +drop table t1; + +# +# Test error handling +# Note that we are using the above table t9 here! +# + +--error 1103 +create table t1 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam data directory="tmp"; + +# Check that we cannot link over a table from another database. + +drop database if exists test_mysqltest; +create database test_mysqltest; + +--error 1 +create table test_mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam index directory="/this-dir-does-not-exist"; + +--error 1103 +create table test_mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam index directory="not-hard-path"; + +--error 1 +eval create table test_mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam index directory="$MYSQL_TEST_DIR/var/run"; + +--error 1 +eval create table test_mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam data directory="$MYSQL_TEST_DIR/var/tmp"; + +# Check moving table t9 from default database to test_mysqltest; +# In this case the symlinks should be removed. + +alter table t9 rename test_mysqltest.t9; +select count(*) from test_mysqltest.t9; +show create table test_mysqltest.t9; +drop database test_mysqltest; |