diff options
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/create.test | 2 | ||||
-rw-r--r-- | mysql-test/t/create_select_tmp.test | 16 | ||||
-rw-r--r-- | mysql-test/t/drop.test | 10 | ||||
-rw-r--r-- | mysql-test/t/flush.test | 2 | ||||
-rw-r--r-- | mysql-test/t/handler.test | 18 | ||||
-rw-r--r-- | mysql-test/t/innodb.test | 2 | ||||
-rw-r--r-- | mysql-test/t/mysqltest.test | 63 | ||||
-rw-r--r-- | mysql-test/t/rpl000001.test | 2 | ||||
-rw-r--r-- | mysql-test/t/rpl_EE_error.test | 2 | ||||
-rw-r--r-- | mysql-test/t/rpl_drop.test | 2 | ||||
-rw-r--r-- | mysql-test/t/rpl_error_ignored_table.test | 4 | ||||
-rw-r--r-- | mysql-test/t/rpl_loaddata.test | 2 |
12 files changed, 94 insertions, 31 deletions
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index ca3446b46fc..480f0506a11 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -238,7 +238,7 @@ drop table t1; create table `t1 `(a int); --error 1102 create database `db1 `; ---error 1166; +--error 1166 create table t1(`a ` int); # diff --git a/mysql-test/t/create_select_tmp.test b/mysql-test/t/create_select_tmp.test index d81a3799d98..3416bd2d383 100644 --- a/mysql-test/t/create_select_tmp.test +++ b/mysql-test/t/create_select_tmp.test @@ -11,19 +11,19 @@ drop table if exists t1, t2; --enable_warnings CREATE TABLE t1 ( a int ); INSERT INTO t1 VALUES (1),(2),(1); ---error 1062; +--error 1062 CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1; ---error 1146; +--error 1146 select * from t2; ---error 1062; +--error 1062 CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1; ---error 1146; +--error 1146 select * from t2; ---error 1062; +--error 1062 CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1; ---error 1146; +--error 1146 select * from t2; ---error 1062; +--error 1062 CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1; ---error 1146; +--error 1146 select * from t2; diff --git a/mysql-test/t/drop.test b/mysql-test/t/drop.test index 5e123ca0de8..ebd70ed063a 100644 --- a/mysql-test/t/drop.test +++ b/mysql-test/t/drop.test @@ -6,13 +6,13 @@ drop database if exists mysqltest; drop database if exists client_test_db; --enable_warnings ---error 1051; +--error 1051 drop table t1; create table t1(n int); insert into t1 values(1); create temporary table t1( n int); insert into t1 values(2); ---error 1050; +--error 1050 create table t1(n int); drop table t1; select * from t1; @@ -56,13 +56,13 @@ drop database mysqltest; # test drop/create database and FLUSH TABLES WITH READ LOCK flush tables with read lock; ---error 1209,1223; +--error 1209,1223 create database mysqltest; unlock tables; create database mysqltest; show databases; flush tables with read lock; ---error 1208,1223; +--error 1208,1223 drop database mysqltest; unlock tables; drop database mysqltest; @@ -73,7 +73,7 @@ drop database mysqltest; # test create table and FLUSH TABLES WITH READ LOCK drop table t1; flush tables with read lock; ---error 1223; +--error 1223 create table t1(n int); unlock tables; create table t1(n int); diff --git a/mysql-test/t/flush.test b/mysql-test/t/flush.test index 9ee6b5d76b8..16ef5d2ae93 100644 --- a/mysql-test/t/flush.test +++ b/mysql-test/t/flush.test @@ -37,7 +37,7 @@ connection con1; select * from t1; connection con2; flush tables with read lock; ---error 1099; +--error 1099 drop table t2; connection con1; send drop table t2; diff --git a/mysql-test/t/handler.test b/mysql-test/t/handler.test index 3de8e8ae784..1ab30016512 100644 --- a/mysql-test/t/handler.test +++ b/mysql-test/t/handler.test @@ -300,7 +300,7 @@ handler t5 open as h5; handler h5 read first limit 9; # close first alter table t1 engine=MyISAM; ---error 1109; +--error 1109 handler h1 read first limit 9; handler h2 read first limit 9; handler h3 read first limit 9; @@ -308,22 +308,22 @@ handler h4 read first limit 9; handler h5 read first limit 9; # close last alter table t5 engine=MyISAM; ---error 1109; +--error 1109 handler h1 read first limit 9; handler h2 read first limit 9; handler h3 read first limit 9; handler h4 read first limit 9; ---error 1109; +--error 1109 handler h5 read first limit 9; # close middle alter table t3 engine=MyISAM; ---error 1109; +--error 1109 handler h1 read first limit 9; handler h2 read first limit 9; ---error 1109; +--error 1109 handler h3 read first limit 9; handler h4 read first limit 9; ---error 1109; +--error 1109 handler h5 read first limit 9; handler h2 close; handler h4 close; @@ -335,11 +335,11 @@ handler h1_1 read first limit 9; handler h1_2 read first limit 9; handler h1_3 read first limit 9; alter table t1 engine=MyISAM; ---error 1109; +--error 1109 handler h1_1 read first limit 9; ---error 1109; +--error 1109 handler h1_2 read first limit 9; ---error 1109; +--error 1109 handler h1_3 read first limit 9; drop table t1; drop table t2; diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index 5216c889e59..ab2502271aa 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -1183,7 +1183,7 @@ drop table t1; # CREATE TABLE t1 ( a char(10) ) ENGINE=InnoDB; ---error 1214; +--error 1214 SELECT a FROM t1 WHERE MATCH (a) AGAINST ('test' IN BOOLEAN MODE); DROP TABLE t1; diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index 8099510ecd1..abee461e8bb 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -706,6 +706,69 @@ while ($i) --exec echo -e "while (0){\n echo hej;" | $MYSQL_TEST 2>&1 # ---------------------------------------------------------------------------- +# Test error messages returned from comments starting with a command +# ---------------------------------------------------------------------------- +--error 1 +--exec echo "--if the other server is down" | $MYSQL_TEST 2>&1 + +--error 1 +--exec echo "-- end when ..." | $MYSQL_TEST 2>&1 + +# ---------------------------------------------------------------------------- +# Test replace +# ---------------------------------------------------------------------------- +--replace_result a b +select "a" as col1, "c" as col2; + +--replace_result a b c d +select "a" as col1, "c" as col2; + +--error 1 +--exec echo "--replace_result a" | $MYSQL_TEST 2>&1 +--error 1 +--exec echo "--replace_result a;" | $MYSQL_TEST 2>&1 +--error 1 +--exec echo "replace_result a;" | $MYSQL_TEST 2>&1 +--error 1 +--exec echo "replace_result a ;" | $MYSQL_TEST 2>&1 +--exec echo "replace_result a b;" | $MYSQL_TEST 2>&1 +--error 1 +--exec echo "--replace_result a b c" | $MYSQL_TEST 2>&1 +--error 1 +--exec echo "replace_result a b c ;" | $MYSQL_TEST 2>&1 + + +--replace_column 1 b +select "a" as col1, "c" as col2; + +--replace_column 1 b 2 d +select "a" as col1, "c" as col2; + +--error 1 +--exec echo "--replace_column a" | $MYSQL_TEST 2>&1 + +--error 1 +--exec echo "--replace_column 1" | $MYSQL_TEST 2>&1 + +--error 1 +--exec echo "--replace_column a b" | $MYSQL_TEST 2>&1 +--error 1 +--exec echo "--replace_column a 1" | $MYSQL_TEST 2>&1 +--error 1 +--exec echo "--replace_column 1 b c " | $MYSQL_TEST 2>&1 + + +# ---------------------------------------------------------------------------- +# Test sync_with_master +# ---------------------------------------------------------------------------- +--error 1 +--exec echo "save_master_pos; sync_with_master 10!;" | $MYSQL_TEST 2>&1 +--error 1 +--exec echo "save_master_pos; sync_with_master 10 !;" | $MYSQL_TEST 2>&1 +--error 1 +--exec echo "save_master_pos; sync_with_master a;" | $MYSQL_TEST 2>&1 + +# ---------------------------------------------------------------------------- # TODO Test queries, especially their errormessages... so it's easy to debug # new scripts and diagnose errors # ---------------------------------------------------------------------------- diff --git a/mysql-test/t/rpl000001.test b/mysql-test/t/rpl000001.test index 835af92186f..dddf3d8df5f 100644 --- a/mysql-test/t/rpl000001.test +++ b/mysql-test/t/rpl000001.test @@ -89,7 +89,7 @@ kill @id; # We don't drop t3 as this is a temporary table drop table t2; connection master; ---error 1053; +--error 1053 reap; connection slave; # The SQL slave thread should now have stopped because the query was killed on diff --git a/mysql-test/t/rpl_EE_error.test b/mysql-test/t/rpl_EE_error.test index 1a1572b48b0..fce21420741 100644 --- a/mysql-test/t/rpl_EE_error.test +++ b/mysql-test/t/rpl_EE_error.test @@ -22,7 +22,7 @@ set sql_log_bin=0; insert into t1 values(2); set sql_log_bin=1; save_master_pos; ---error 1062; +--error 1062 insert into t1 values(1),(2); drop table t1; save_master_pos; diff --git a/mysql-test/t/rpl_drop.test b/mysql-test/t/rpl_drop.test index ab5b608cab6..485d5f70e22 100644 --- a/mysql-test/t/rpl_drop.test +++ b/mysql-test/t/rpl_drop.test @@ -5,7 +5,7 @@ source include/master-slave.inc; drop table if exists t1, t2; --enable_warnings create table t1 (a int); ---error 1051; +--error 1051 drop table t1, t2; save_master_pos; connection slave; diff --git a/mysql-test/t/rpl_error_ignored_table.test b/mysql-test/t/rpl_error_ignored_table.test index 0062a67ff1a..51f9ca35768 100644 --- a/mysql-test/t/rpl_error_ignored_table.test +++ b/mysql-test/t/rpl_error_ignored_table.test @@ -6,7 +6,7 @@ source include/master-slave.inc; connection master; create table t1 (a int primary key); # generate an error that goes to the binlog ---error 1062; +--error 1062 insert into t1 values (1),(1); save_master_pos; connection slave; @@ -45,7 +45,7 @@ select (@id := id) - id from t3; kill @id; drop table t2,t3; connection master; ---error 0,1053; +--error 0,1053 reap; connection master1; show binlog events from 79; diff --git a/mysql-test/t/rpl_loaddata.test b/mysql-test/t/rpl_loaddata.test index 10213644836..cc1fcad03b0 100644 --- a/mysql-test/t/rpl_loaddata.test +++ b/mysql-test/t/rpl_loaddata.test @@ -123,7 +123,7 @@ connection master; reset master; create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60), unique(day)); ---error 1062; +--error 1062 load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines; |