summaryrefslogtreecommitdiff
path: root/mysql-test/include
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-08-25 10:25:48 +0200
committerSergei Golubchik <serg@mariadb.org>2017-08-25 10:25:48 +0200
commit27412877dbcf601676f4515a99b2abee1f19623b (patch)
tree2cb1a2e1a58ba10f2a96fcdec43f5ed77c326fd0 /mysql-test/include
parentf2033df6ac0f64664d9aad2d56fdd74f4bf9d666 (diff)
parenta544225d0a772bd4b67c96f5861ecc0ef7e69bba (diff)
downloadmariadb-git-27412877dbcf601676f4515a99b2abee1f19623b.tar.gz
Merge branch '10.2' into bb-10.2-ext
Diffstat (limited to 'mysql-test/include')
-rw-r--r--mysql-test/include/index_merge1.inc2
-rw-r--r--mysql-test/include/restart_mysqld.inc49
-rw-r--r--mysql-test/include/shutdown_mysqld.inc12
-rw-r--r--mysql-test/include/wait_for_slave_sql_error_and_skip.inc7
4 files changed, 22 insertions, 48 deletions
diff --git a/mysql-test/include/index_merge1.inc b/mysql-test/include/index_merge1.inc
index 88dd4c31910..b63b2db78da 100644
--- a/mysql-test/include/index_merge1.inc
+++ b/mysql-test/include/index_merge1.inc
@@ -64,6 +64,8 @@ explain
select * from t0 where key1 < 3 or key2 > 1020;
select * from t0 where key1 < 3 or key2 > 1020;
+select * from t0 where key1=1022; # MDEV-13535 no-key-read select after keyread
+
explain select * from t0 where key1 < 3 or key2 <4;
explain
diff --git a/mysql-test/include/restart_mysqld.inc b/mysql-test/include/restart_mysqld.inc
index dcaf47c55a2..3d3e55db4ac 100644
--- a/mysql-test/include/restart_mysqld.inc
+++ b/mysql-test/include/restart_mysqld.inc
@@ -6,50 +6,5 @@
--source include/not_embedded.inc
-if ($rpl_inited)
-{
- if (!$allow_rpl_inited)
- {
- --die ERROR IN TEST: When using the replication test framework (master-slave.inc, rpl_init.inc etc), use rpl_restart_server.inc instead of restart_mysqld.inc. If you know what you are doing and you really have to use restart_mysqld.inc, set allow_rpl_inited=1 before you source restart_mysqld.inc
- }
-}
-
---let $server_shutdown_timeout= 60
-if ($shutdown_timeout)
-{
- --let $server_shutdown_timeout= $shutdown_timeout
-}
-if ($shutdown_timeout == 0)
-{
- --let $server_shutdown_timeout= 0
-}
-
-# Write file to make mysql-test-run.pl expect the "crash", but don't start
-# it until it's told to
---let $_server_id= `SELECT @@server_id`
---let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
---exec echo "wait" > $_expect_file_name
-
-# Send shutdown to the connected server and give
-# it 10 seconds to die before zapping it
-shutdown_server $server_shutdown_timeout;
-
-# Write file to make mysql-test-run.pl start up the server again
-if ($restart_parameters)
-{
- --exec echo "restart: $restart_parameters" > $_expect_file_name
-}
-if (!$restart_parameters)
-{
- --exec echo "restart" > $_expect_file_name
-}
-
-# Turn on reconnect
---enable_reconnect
-
-# Call script that will poll the server waiting for it to be back online again
---source include/wait_until_connected_again.inc
-
-# Turn off reconnect again
---disable_reconnect
-
+--source include/shutdown_mysqld.inc
+--source include/start_mysqld.inc
diff --git a/mysql-test/include/shutdown_mysqld.inc b/mysql-test/include/shutdown_mysqld.inc
index 54bba1318e7..c96e69fc158 100644
--- a/mysql-test/include/shutdown_mysqld.inc
+++ b/mysql-test/include/shutdown_mysqld.inc
@@ -12,7 +12,17 @@ if ($rpl_inited)
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
--exec echo "wait" > $_expect_file_name
+--let $server_shutdown_timeout= 60
+if ($shutdown_timeout)
+{
+ --let $server_shutdown_timeout= $shutdown_timeout
+}
+if ($shutdown_timeout == 0)
+{
+ --let $server_shutdown_timeout= 0
+}
+
# Send shutdown to the connected server
---shutdown_server
+--shutdown_server $server_shutdown_timeout
--source include/wait_until_disconnected.inc
diff --git a/mysql-test/include/wait_for_slave_sql_error_and_skip.inc b/mysql-test/include/wait_for_slave_sql_error_and_skip.inc
index 9246c1839af..d68faaf04e7 100644
--- a/mysql-test/include/wait_for_slave_sql_error_and_skip.inc
+++ b/mysql-test/include/wait_for_slave_sql_error_and_skip.inc
@@ -66,6 +66,13 @@ if (!$slave_skip_counter) {
}
source include/start_slave.inc;
+# start_slave.inc returns when Slave_SQL_Running=Yes. But the slave
+# thread sets it before clearing Last_SQL_Errno. So we have to wait
+# for Last_SQL_Errno=0 separately.
+
+let $slave_param= Last_SQL_Errno;
+let $slave_param_value= 0;
+source include/wait_for_slave_param.inc;
--let $include_filename= wait_for_slave_sql_error_and_skip.inc [errno=$slave_sql_errno]
--source include/end_include_file.inc