summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/mysql.test12
-rw-r--r--mysql-test/t/mysqlbinlog.test19
-rw-r--r--mysql-test/t/mysqlcheck.test9
-rw-r--r--mysql-test/t/mysqltest.test20
-rw-r--r--mysql-test/t/ndb_lock.test2
-rw-r--r--mysql-test/t/wait_timeout.test6
6 files changed, 60 insertions, 8 deletions
diff --git a/mysql-test/t/mysql.test b/mysql-test/t/mysql.test
index 829be665e09..5bcce14969a 100644
--- a/mysql-test/t/mysql.test
+++ b/mysql-test/t/mysql.test
@@ -44,7 +44,7 @@ unlock tables;
drop table t1;
#
-# BUG#16217 - MySQL client misinterpretes multi-byte char as escape `\'
+# BUG#16217 - MySQL client misinterprets multi-byte char as escape `\'
#
# new command \C or charset
@@ -262,4 +262,14 @@ drop table t17583;
--exec echo "DELIMITER \\\\" > $MYSQLTEST_VARDIR/tmp/bug21412.sql
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug21412.sql 2>&1
+#
+# Some coverage of not normally used parts
+#
+
+--disable_query_log
+--exec $MYSQL test -e "show status" 2>&1 > /dev/null
+--exec $MYSQL --help 2>&1 > /dev/null
+--exec $MYSQL --version 2>&1 > /dev/null
+--enable_quary_log
+
--echo End of 5.0 tests
diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test
index b2bda247cd7..6c54e734006 100644
--- a/mysql-test/t/mysqlbinlog.test
+++ b/mysql-test/t/mysqlbinlog.test
@@ -7,7 +7,7 @@
set timestamp=1000000000;
--disable_warnings
-drop table if exists t1,t2;
+drop table if exists t1,t2,t3,t4,t5,t03,t04;
--enable_warnings
create table t1 (word varchar(20));
@@ -106,8 +106,11 @@ select "--- reading stdin --" as "";
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
--exec $MYSQL_BINLOG --short-form --position=79 - < $MYSQL_TEST_DIR/std_data/trunc_binlog.000001
+drop table t1,t2;
+#
# Bug#16217 (mysql client did not know how not switch its internal charset)
+#
flush logs;
create table t3 (f text character set utf8);
create table t4 (f text character set cp932);
@@ -121,6 +124,7 @@ select HEX(f) from t03;
select HEX(f) from t3;
select HEX(f) from t04;
select HEX(f) from t4;
+drop table t3,t4,t03,t04;
#
#BUG#14157: utf8 encoding in binlog without set character_set_client
@@ -133,6 +137,7 @@ flush logs;
# should use default-character-set same as the server.
--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000006 | $MYSQL
select * from t5 /* must be (1),(1) */;
+drop table t5;
#
# Bug#22645 LC_TIME_NAMES: Statement not replicated
@@ -140,7 +145,6 @@ select * from t5 /* must be (1),(1) */;
# lc_time_names dependent values correctly
#
flush logs;
-drop table if exists t5;
create table t5 (c1 int, c2 varchar(128) character set latin1 not null);
insert into t5 values (1, date_format('2001-01-01','%W'));
set lc_time_names=de_DE;
@@ -152,6 +156,8 @@ flush logs;
drop table t5;
--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000007 | $MYSQL
select * from t5 order by c1;
+drop table t5;
+
#
# Bug#20396 Bin Log does not get DELIMETER cmd - Recover StoredProc fails
#
@@ -176,7 +182,12 @@ call p1();
call p1();
drop procedure p1;
-# clean up
-drop table t1, t2, t03, t04, t3, t4, t5;
+#
+# Some coverage of not normally used parts
+#
+--disable_query_log
+--exec $MYSQL_BINLOG --version 2>&1 > /dev/null
+--exec $MYSQL_BINLOG --help 2>&1 > /dev/null
+--enable_query_log
# End of 5.0 tests
diff --git a/mysql-test/t/mysqlcheck.test b/mysql-test/t/mysqlcheck.test
index 338e16363ea..f4e18d4004f 100644
--- a/mysql-test/t/mysqlcheck.test
+++ b/mysql-test/t/mysqlcheck.test
@@ -1,3 +1,12 @@
+# Clean up after previous tests
+#
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+drop view if exists v1;
+drop database if exists client_test_db;
+--enable_warnings
+
# Embedded server doesn't support external clients
--source include/not_embedded.inc
diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test
index e0d5591fc4f..a8a55336144 100644
--- a/mysql-test/t/mysqltest.test
+++ b/mysql-test/t/mysqltest.test
@@ -1276,8 +1276,16 @@ EOF
connect (con1,localhost,root,,);
connection default;
connection con1;
+disconnect con1;
--enable_abort_on_error
+# Test connect without a database
+connect (con2,localhost,root,,*NO-ONE*);
+--error ER_NO_DB_ERROR
+show tables;
+disconnect con2;
+connection default;
+
# ----------------------------------------------------------------------------
# Test mysqltest arguments
# ----------------------------------------------------------------------------
@@ -1635,5 +1643,17 @@ EOF
--exec echo "echo Some output; exit; echo Not this;" | $MYSQL_TEST 2>&1
+# ----------------------------------------------------------------------------
+# Some coverage tests
+# ----------------------------------------------------------------------------
+
+--disable_query_log
+--exec $MYSQL_TEST --help 2>&1 > /dev/null
+--exec $MYSQL_TEST --version 2>&1 > /dev/null
+--enable_quary_log
+--disable_abort_on_error
+--error 1
+--exec $MYSQL_TEST a b c 2>&1 > /dev/null
+--enable_abort_on_error
--echo End of tests
diff --git a/mysql-test/t/ndb_lock.test b/mysql-test/t/ndb_lock.test
index 8dc02dc20cb..bd35a7d28c3 100644
--- a/mysql-test/t/ndb_lock.test
+++ b/mysql-test/t/ndb_lock.test
@@ -149,7 +149,7 @@ begin;
# Have to check with pk access here since scans take locks on
# all rows and then release them in chunks
select * from t1 where x = 1 for update;
---error 1205
+--error 1105,1205
select * from t1 where x = 2 for update;
rollback;
diff --git a/mysql-test/t/wait_timeout.test b/mysql-test/t/wait_timeout.test
index 67ed8fedfeb..9b9813f9655 100644
--- a/mysql-test/t/wait_timeout.test
+++ b/mysql-test/t/wait_timeout.test
@@ -46,7 +46,8 @@ while (!`select @aborted_clients`)
connection default;
# When the connection is closed in this way, the error code should
# be consistent see bug#2845 for an explanation
---error 2006
+# depending on platform/client, either errno 2006 or 2013 can occur below
+--error 2006,2013
select 2;
--enable_reconnect
select 3;
@@ -90,7 +91,8 @@ while (!`select @aborted_clients`)
connection con1;
# When the connection is closed in this way, the error code should
# be consistent see bug#2845 for an explanation
---error 2006
+# depending on platform/client, either errno 2006 or 2013 can occur below
+--error 2006,2013
select 2;
--enable_reconnect
select 3;