summaryrefslogtreecommitdiff
path: root/mysql-test/suite
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2021-05-21 13:06:00 +0300
committerMonty <monty@mariadb.org>2021-05-24 21:04:40 +0300
commite5b6db01795d6adbc39f10fbd70da1d8a0980fc2 (patch)
tree3d58f7b134d7108717dc14e23c705dbed9158a1d /mysql-test/suite
parent3b8d4180d5f7f8c0d72be734f13a8de05ef537cb (diff)
downloadmariadb-git-e5b6db01795d6adbc39f10fbd70da1d8a0980fc2.tar.gz
Speed up atomic test suite by improving wait_until_connected_again.inc
and remove usage of RESET MASTER in loops. - Remove sleep of 0.1 second that was done even when not needed. - Don't call include/wait_wsrep_ready.inc if NO_WSREP is defined. - Added NO_WSREP=1 to all atomic tests. - Use 'select 1' instead of 'show status' to check is server is up. - Changed RESET MASTER to FLUSH BINARY LOGS to speed up atomic tests. To be able to do this, added a new parameter variable to show_events.inc to allow one to specify the name of the binary log in the output.
Diffstat (limited to 'mysql-test/suite')
-rw-r--r--mysql-test/suite/atomic/alter_table.result1
-rw-r--r--mysql-test/suite/atomic/alter_table.test18
-rw-r--r--mysql-test/suite/atomic/alter_table_aria.result1
-rw-r--r--mysql-test/suite/atomic/alter_table_big_query.test18
-rw-r--r--mysql-test/suite/atomic/alter_table_rocksdb.result1
-rw-r--r--mysql-test/suite/atomic/alter_table_trigger.test19
-rw-r--r--mysql-test/suite/atomic/create_table.test18
-rw-r--r--mysql-test/suite/atomic/create_trigger.result1
-rw-r--r--mysql-test/suite/atomic/create_trigger.test10
-rw-r--r--mysql-test/suite/atomic/create_view.test18
-rw-r--r--mysql-test/suite/atomic/drop_db.result1
-rw-r--r--mysql-test/suite/atomic/drop_db.test19
-rw-r--r--mysql-test/suite/atomic/drop_db_long_names.result1
-rw-r--r--mysql-test/suite/atomic/drop_db_long_names.test19
-rw-r--r--mysql-test/suite/atomic/drop_sequence.result1
-rw-r--r--mysql-test/suite/atomic/drop_sequence.test17
-rw-r--r--mysql-test/suite/atomic/drop_table.result1
-rw-r--r--mysql-test/suite/atomic/drop_table.test17
-rw-r--r--mysql-test/suite/atomic/drop_trigger.result1
-rw-r--r--mysql-test/suite/atomic/drop_trigger.test17
-rw-r--r--mysql-test/suite/atomic/drop_view.result1
-rw-r--r--mysql-test/suite/atomic/drop_view.test20
-rw-r--r--mysql-test/suite/atomic/rename_table.test3
-rw-r--r--mysql-test/suite/atomic/rename_table_binlog.test6
-rw-r--r--mysql-test/suite/atomic/rename_trigger.test3
25 files changed, 181 insertions, 51 deletions
diff --git a/mysql-test/suite/atomic/alter_table.result b/mysql-test/suite/atomic/alter_table.result
index 58a77b9edaf..9807008e119 100644
--- a/mysql-test/suite/atomic/alter_table.result
+++ b/mysql-test/suite/atomic/alter_table.result
@@ -1,4 +1,5 @@
create database test2;
+RESET MASTER;
engine: myisam
diff --git a/mysql-test/suite/atomic/alter_table.test b/mysql-test/suite/atomic/alter_table.test
index e6469c3c1b7..1f87b7e71b8 100644
--- a/mysql-test/suite/atomic/alter_table.test
+++ b/mysql-test/suite/atomic/alter_table.test
@@ -22,10 +22,13 @@
--disable_query_log
call mtr.add_suppression("InnoDB: .* does not exist in the InnoDB internal");
+# Speed up wait_until_connected_again.inc
+let NO_WSREP=1;
--enable_query_log
let $MYSQLD_DATADIR= `SELECT @@datadir`;
create database test2;
+RESET MASTER;
if ($engine_count == "")
{
@@ -103,7 +106,8 @@ while ($e < $engine_count)
commit;
flush tables;
- RESET MASTER;
+ FLUSH BINARY LOGS;
+ --let $start_binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
--echo crash point: $crash
if ($crash_count > 1)
{
@@ -164,12 +168,18 @@ while ($e < $engine_count)
select count(*) from test2.t2;
}
}
- --let $binlog_file=master-bin.000001
+ --let $binlog_file=$start_binlog_file
+ --let $binlog_output_name=master-bin.000001
+
--source include/show_binlog_events.inc
if ($error)
{
- --let $binlog_file=master-bin.000002
- --source include/show_binlog_events.inc
+ --let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
+ --let $binlog_output_name=master-bin.000002
+ if ($binlog_file != $start_binlog_file)
+ {
+ --source include/show_binlog_events.inc
+ }
}
}
--disable_warnings
diff --git a/mysql-test/suite/atomic/alter_table_aria.result b/mysql-test/suite/atomic/alter_table_aria.result
index afa1ea0cb68..0f5ad27e802 100644
--- a/mysql-test/suite/atomic/alter_table_aria.result
+++ b/mysql-test/suite/atomic/alter_table_aria.result
@@ -1,4 +1,5 @@
create database test2;
+RESET MASTER;
engine: aria
diff --git a/mysql-test/suite/atomic/alter_table_big_query.test b/mysql-test/suite/atomic/alter_table_big_query.test
index 6248d4371a0..682259cda60 100644
--- a/mysql-test/suite/atomic/alter_table_big_query.test
+++ b/mysql-test/suite/atomic/alter_table_big_query.test
@@ -11,6 +11,10 @@
--disable_query_log
call mtr.add_suppression("InnoDB: .* does not exist in the InnoDB internal");
+# Speed up wait_until_connected_again.inc
+let NO_WSREP=1;
+RESET MASTER;
+
--enable_query_log
let $MYSQLD_DATADIR= `SELECT @@datadir`;
@@ -67,7 +71,8 @@ while ($e < $engine_count)
insert into t1 (a) values (1),(2);
flush tables;
- RESET MASTER;
+ FLUSH BINARY LOGS;
+ --let $start_binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
--echo crash point: $crash
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--disable_reconnect
@@ -91,12 +96,17 @@ while ($e < $engine_count)
--list_files $MYSQLD_DATADIR/test *sql*
show create table t1;
select sum(a) from t1;
- --let $binlog_file=master-bin.000001
+ --let $binlog_file=$start_binlog_file
+ --let $binlog_output_name=master-bin.000001
--source include/show_binlog_events.inc
if ($error)
{
- --let $binlog_file=master-bin.000002
- --source include/show_binlog_events.inc
+ --let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
+ --let $binlog_output_name=master-bin.000002
+ if ($binlog_file != $start_binlog_file)
+ {
+ --source include/show_binlog_events.inc
+ }
}
}
--disable_warnings
diff --git a/mysql-test/suite/atomic/alter_table_rocksdb.result b/mysql-test/suite/atomic/alter_table_rocksdb.result
index 14ab4f29553..dda73e0b210 100644
--- a/mysql-test/suite/atomic/alter_table_rocksdb.result
+++ b/mysql-test/suite/atomic/alter_table_rocksdb.result
@@ -1,5 +1,6 @@
set global rocksdb_flush_log_at_trx_commit=1;
create database test2;
+RESET MASTER;
engine: rocksdb
diff --git a/mysql-test/suite/atomic/alter_table_trigger.test b/mysql-test/suite/atomic/alter_table_trigger.test
index 276da893483..1d6d5c224c7 100644
--- a/mysql-test/suite/atomic/alter_table_trigger.test
+++ b/mysql-test/suite/atomic/alter_table_trigger.test
@@ -13,6 +13,9 @@
--disable_query_log
call mtr.add_suppression("InnoDB: .* does not exist in the InnoDB internal");
+# Speed up wait_until_connected_again.inc
+let NO_WSREP=1;
+RESET MASTER;
--enable_query_log
let $MYSQLD_DATADIR= `SELECT @@datadir`;
@@ -77,7 +80,9 @@ while ($e < $engine_count)
end|
delimiter ;|
- RESET MASTER;
+ FLUSH BINARY LOGS;
+ --let $start_binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
+
--echo crash point: $crash
if ($crash_count != 1)
{
@@ -122,12 +127,16 @@ while ($e < $engine_count)
select sum(a) from t2;
}
- --let $binlog_file=master-bin.000001
- --source include/show_binlog_events.inc
+ --let $binlog_file=$start_binlog_file
+ --let $binlog_output_name=master-bin.000001
if ($error)
{
- --let $binlog_file=master-bin.000002
- --source include/show_binlog_events.inc
+ --let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
+ --let $binlog_output_name=master-bin.000002
+ if ($binlog_file != $start_binlog_file)
+ {
+ --source include/show_binlog_events.inc
+ }
}
}
--disable_warnings
diff --git a/mysql-test/suite/atomic/create_table.test b/mysql-test/suite/atomic/create_table.test
index fc4413dadbc..ff53a12ebab 100644
--- a/mysql-test/suite/atomic/create_table.test
+++ b/mysql-test/suite/atomic/create_table.test
@@ -15,6 +15,9 @@
--disable_query_log
call mtr.add_suppression("InnoDB: .* does not exist in the InnoDB internal");
+# Speed up wait_until_connected_again.inc
+let NO_WSREP=1;
+RESET MASTER;
--enable_query_log
let $MYSQLD_DATADIR= `SELECT @@datadir`;
@@ -89,7 +92,9 @@ while ($e < $engine_count)
{
--source include/set_binlog_format_statement.sql
}
- RESET MASTER;
+ FLUSH BINARY LOGS;
+ --let $start_binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
+
--echo crash point: $crash
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--disable_reconnect
@@ -111,12 +116,17 @@ while ($e < $engine_count)
--list_files $MYSQLD_DATADIR/test t*
--list_files $MYSQLD_DATADIR/test *sql*
- --let $binlog_file=master-bin.000001
+ --let $binlog_file=$start_binlog_file
+ --let $binlog_output_name=master-bin.000001
--source include/show_binlog_events.inc
if ($error)
{
- --let $binlog_file=master-bin.000002
- --source include/show_binlog_events.inc
+ --let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
+ --let $binlog_output_name=master-bin.000002
+ if ($binlog_file != $start_binlog_file)
+ {
+ --source include/show_binlog_events.inc
+ }
}
# Drop the tables. The warnings will show what was dropped
--disable_warnings
diff --git a/mysql-test/suite/atomic/create_trigger.result b/mysql-test/suite/atomic/create_trigger.result
index ec37377231e..20b6c76520c 100644
--- a/mysql-test/suite/atomic/create_trigger.result
+++ b/mysql-test/suite/atomic/create_trigger.result
@@ -1,3 +1,4 @@
+RESET MASTER;
"engine: aria crash point: ddl_log_create_before_create_trigger position: 1"
"engine: aria crash point: ddl_log_create_before_create_trigger position: 2"
t1.TRG
diff --git a/mysql-test/suite/atomic/create_trigger.test b/mysql-test/suite/atomic/create_trigger.test
index 2072fdb444a..09b00f99efe 100644
--- a/mysql-test/suite/atomic/create_trigger.test
+++ b/mysql-test/suite/atomic/create_trigger.test
@@ -2,6 +2,10 @@
--source include/have_log_bin.inc
--source include/not_valgrind.inc
+# Speed up wait_until_connected_again.inc
+let NO_WSREP=1;
+RESET MASTER;
+
#
# Testing of atomic CREATE TRIGGER with crashes in a lot of different places
#
@@ -53,7 +57,8 @@ while ($e < $engine_count)
{
inc $r;
- RESET MASTER;
+ FLUSH BINARY LOGS;
+ --let $start_binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
echo "engine: $engine crash point: $crash position: $r";
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
@@ -116,7 +121,8 @@ while ($e < $engine_count)
--error 0,ER_TRG_DOES_NOT_EXIST
SHOW CREATE TRIGGER t2_trg;
- --let $binlog_file=master-bin.000001
+ --let $binlog_file=$start_binlog_file
+ --let $binlog_output_name=master-bin.000001
--source include/show_binlog_events.inc
--disable_warnings
drop trigger if exists t1_trg;
diff --git a/mysql-test/suite/atomic/create_view.test b/mysql-test/suite/atomic/create_view.test
index 88d773e824c..bb7259cd02d 100644
--- a/mysql-test/suite/atomic/create_view.test
+++ b/mysql-test/suite/atomic/create_view.test
@@ -8,6 +8,9 @@
--disable_query_log
call mtr.add_suppression("InnoDB: .* does not exist in the InnoDB internal");
+# Speed up wait_until_connected_again.inc
+let NO_WSREP=1;
+RESET MASTER;
--enable_query_log
let $MYSQLD_DATADIR= `SELECT @@datadir`;
@@ -46,7 +49,9 @@ while ($e < 1)
create view t2 as select "old";
- RESET MASTER;
+ FLUSH BINARY LOGS;
+ --let $start_binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
+
--echo crash point: $crash
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--disable_reconnect
@@ -69,12 +74,17 @@ while ($e < 1)
--list_files $MYSQLD_DATADIR/test *sql*
select * from t2;
- --let $binlog_file=master-bin.000001
+ --let $binlog_file=$start_binlog_file
+ --let $binlog_output_name=master-bin.000001
--source include/show_binlog_events.inc
if ($error)
{
- --let $binlog_file=master-bin.000002
- --source include/show_binlog_events.inc
+ --let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
+ --let $binlog_output_name=master-bin.00c0002
+ if ($binlog_file != $start_binlog_file)
+ {
+ --source include/show_binlog_events.inc
+ }
}
# Drop the tables. The warnings will show what was dropped
--disable_warnings
diff --git a/mysql-test/suite/atomic/drop_db.result b/mysql-test/suite/atomic/drop_db.result
index 46838402308..775f02ec62a 100644
--- a/mysql-test/suite/atomic/drop_db.result
+++ b/mysql-test/suite/atomic/drop_db.result
@@ -1,4 +1,5 @@
call mtr.add_suppression("InnoDB: .* does not exist in the InnoDB internal");
+RESET MASTER;
"engine: aria crash point: ddl_log_drop_before_delete_table position: 1"
t1v.frm
t2.MAD
diff --git a/mysql-test/suite/atomic/drop_db.test b/mysql-test/suite/atomic/drop_db.test
index 9630815e18e..0080ac5e97d 100644
--- a/mysql-test/suite/atomic/drop_db.test
+++ b/mysql-test/suite/atomic/drop_db.test
@@ -8,6 +8,9 @@
#
call mtr.add_suppression("InnoDB: .* does not exist in the InnoDB internal");
+# Speed up wait_until_connected_again.inc
+let NO_WSREP=1;
+RESET MASTER;
let $MYSQLD_DATADIR= `SELECT @@datadir`;
let $engine_count=2;
@@ -64,10 +67,11 @@ while ($e < $engine_count)
flush tables;
use test;
- RESET MASTER;
+ FLUSH BINARY LOGS;
+ --let $start_binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
echo "engine: $engine crash point: $crash position: $r";
- --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+ --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--disable_reconnect
--eval set @@debug_dbug="+d,$crash",@debug_crash_counter=$r
let $errno=0;
@@ -90,12 +94,17 @@ while ($e < $engine_count)
--error 0,ER_SP_DOES_NOT_EXIST
show create procedure test2.foo;
- --let $binlog_file=master-bin.000001
+ --let $binlog_file=$start_binlog_file
+ --let $binlog_output_name=master-bin.000001
--source include/show_binlog_events.inc
if ($error)
{
- --let $binlog_file=master-bin.000002
- --source include/show_binlog_events.inc
+ --let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
+ --let $binlog_output_name=master-bin.000002
+ if ($binlog_file != $start_binlog_file)
+ {
+ --source include/show_binlog_events.inc
+ }
}
# Really drop the tables. The warnings will show what was dropped
--disable_warnings
diff --git a/mysql-test/suite/atomic/drop_db_long_names.result b/mysql-test/suite/atomic/drop_db_long_names.result
index 8a4ff7f762e..e1d177ab447 100644
--- a/mysql-test/suite/atomic/drop_db_long_names.result
+++ b/mysql-test/suite/atomic/drop_db_long_names.result
@@ -1,3 +1,4 @@
+RESET MASTER;
"engine: aria crash point: ddl_log_drop_after_drop_tables position: 1"
master-bin.000002 # Query # # use `test2`; DROP TABLE IF EXISTS `tABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB`,`tACCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC`,`tADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD`,`tAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE`,`tAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF`,`tAGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG`,`tAHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH`,`tAIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII`,`tAJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ`,`tAKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK`,`tALLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL` /* generated by ddl recovery */
master-bin.000002 # Query # # use `test2`; DROP VIEW IF EXISTS `tABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBv`,`tACCCCCCCCCCCCCCCCCCCCCCCCCCCCCCv`,`tADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDv`,`tAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEv`,`tAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFv`,`tAGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGv`,`tAHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHv`,`tAIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIv`,`tAJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJv`,`tAKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKv` /* generated by ddl recovery */
diff --git a/mysql-test/suite/atomic/drop_db_long_names.test b/mysql-test/suite/atomic/drop_db_long_names.test
index c96e59fb4b9..af582afc4e0 100644
--- a/mysql-test/suite/atomic/drop_db_long_names.test
+++ b/mysql-test/suite/atomic/drop_db_long_names.test
@@ -2,6 +2,10 @@
--source include/have_log_bin.inc
--source include/not_valgrind.inc
+# Speed up wait_until_connected_again.inc
+let NO_WSREP=1;
+RESET MASTER;
+
#
# Testing of atomic DROP DATABASE when the generated query could be too long
#
@@ -63,7 +67,8 @@ while ($e < $engine_count)
flush tables;
use test;
- RESET MASTER;
+ FLUSH BINARY LOGS;
+ --let $start_binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
echo "engine: $engine crash point: $crash position: $r";
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
@@ -88,12 +93,16 @@ while ($e < $engine_count)
--list_files $MYSQLD_DATADIR/test2 t*
--error 0,ER_SP_DOES_NOT_EXIST
- --let $binlog_file=master-bin.000001
- --source include/show_binlog_events.inc
+ --let $binlog_file=$start_binlog_file
+ --let $binlog_output_name=master-bin.000001
if ($error)
{
- --let $binlog_file=master-bin.000002
- --source include/show_binlog_events.inc
+ --let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
+ --let $binlog_output_name=master-bin.000002
+ if ($binlog_file != $start_binlog_file)
+ {
+ --source include/show_binlog_events.inc
+ }
}
# Really drop the tables. The warnings will show what was dropped
--disable_warnings
diff --git a/mysql-test/suite/atomic/drop_sequence.result b/mysql-test/suite/atomic/drop_sequence.result
index 64ed2dd5698..709b049bebf 100644
--- a/mysql-test/suite/atomic/drop_sequence.result
+++ b/mysql-test/suite/atomic/drop_sequence.result
@@ -1,4 +1,5 @@
call mtr.add_suppression("InnoDB: .* does not exist in the InnoDB internal");
+RESET MASTER;
create database test2;
"engine: aria crash point: ddl_log_drop_before_delete_table position: 1"
ts.MAD
diff --git a/mysql-test/suite/atomic/drop_sequence.test b/mysql-test/suite/atomic/drop_sequence.test
index a7a398a1200..e3b707e8891 100644
--- a/mysql-test/suite/atomic/drop_sequence.test
+++ b/mysql-test/suite/atomic/drop_sequence.test
@@ -8,6 +8,9 @@
#
call mtr.add_suppression("InnoDB: .* does not exist in the InnoDB internal");
+# Speed up wait_until_connected_again.inc
+let NO_WSREP=1;
+RESET MASTER;
let $MYSQLD_DATADIR= `SELECT @@datadir`;
create database test2;
@@ -77,7 +80,8 @@ while ($e < $engine_count)
end|
delimiter ;|
- RESET MASTER;
+ FLUSH BINARY LOGS;
+ --let $start_binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
echo "engine: $engine crash point: $crash position: $r";
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
@@ -100,12 +104,17 @@ while ($e < $engine_count)
--list_files $MYSQLD_DATADIR/test t*
--list_files $MYSQLD_DATADIR/test2 t*
- --let $binlog_file=master-bin.000001
+ --let $binlog_file=$start_binlog_file
+ --let $binlog_output_name=master-bin.000001
--source include/show_binlog_events.inc
if ($error)
{
- --let $binlog_file=master-bin.000002
- --source include/show_binlog_events.inc
+ --let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
+ --let $binlog_output_name=master-bin.000002
+ if ($binlog_file != $start_binlog_file)
+ {
+ --source include/show_binlog_events.inc
+ }
}
# Really drop the tables. The warnings will show what was dropped
--disable_warnings
diff --git a/mysql-test/suite/atomic/drop_table.result b/mysql-test/suite/atomic/drop_table.result
index fbff9464e2e..61ca91b2aa2 100644
--- a/mysql-test/suite/atomic/drop_table.result
+++ b/mysql-test/suite/atomic/drop_table.result
@@ -1,4 +1,5 @@
call mtr.add_suppression("InnoDB: .* does not exist in the InnoDB internal");
+RESET MASTER;
"engine: myisam crash point: ddl_log_drop_before_delete_table position: 1"
t2.MYD
t2.MYI
diff --git a/mysql-test/suite/atomic/drop_table.test b/mysql-test/suite/atomic/drop_table.test
index 975e790f5d8..a3635c76447 100644
--- a/mysql-test/suite/atomic/drop_table.test
+++ b/mysql-test/suite/atomic/drop_table.test
@@ -9,6 +9,9 @@
#
call mtr.add_suppression("InnoDB: .* does not exist in the InnoDB internal");
+# Speed up wait_until_connected_again.inc
+let NO_WSREP=1;
+RESET MASTER;
let $MYSQLD_DATADIR= `SELECT @@datadir`;
let $engine_count=5;
@@ -75,7 +78,8 @@ while ($e < $engine_count)
end|
delimiter ;|
- RESET MASTER;
+ FLUSH BINARY LOGS;
+ --let $start_binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
echo "engine: $engine crash point: $crash position: $r";
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
@@ -97,12 +101,17 @@ while ($e < $engine_count)
# Check which tables still exists
--list_files $MYSQLD_DATADIR/test t*
- --let $binlog_file=master-bin.000001
+ --let $binlog_file=$start_binlog_file
+ --let $binlog_output_name=master-bin.000001
--source include/show_binlog_events.inc
if ($error)
{
- --let $binlog_file=master-bin.000002
- --source include/show_binlog_events.inc
+ --let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
+ --let $binlog_output_name=master-bin.000002
+ if ($binlog_file != $start_binlog_file)
+ {
+ --source include/show_binlog_events.inc
+ }
}
# Really drop the tables. The warnings will show what was dropped
--disable_warnings
diff --git a/mysql-test/suite/atomic/drop_trigger.result b/mysql-test/suite/atomic/drop_trigger.result
index 265f06f31ed..89d511f58d8 100644
--- a/mysql-test/suite/atomic/drop_trigger.result
+++ b/mysql-test/suite/atomic/drop_trigger.result
@@ -1,3 +1,4 @@
+RESET MASTER;
"engine: aria crash point: ddl_log_drop_before_drop_trigger position: 1"
t1.TRG
t1_trg.TRN
diff --git a/mysql-test/suite/atomic/drop_trigger.test b/mysql-test/suite/atomic/drop_trigger.test
index 24c44cd2f2a..8ff4f3093f2 100644
--- a/mysql-test/suite/atomic/drop_trigger.test
+++ b/mysql-test/suite/atomic/drop_trigger.test
@@ -6,6 +6,9 @@
# Testing of atomic drop with crashes in a lot of different places
#
+# Speed up wait_until_connected_again.inc
+let NO_WSREP=1;
+RESET MASTER;
let $MYSQLD_DATADIR= `SELECT @@datadir`;
let long_comment=`select repeat('a',16384)`;
@@ -70,7 +73,8 @@ while ($e < $engine_count)
end|
delimiter ;|
- RESET MASTER;
+ FLUSH BINARY LOGS;
+ --let $start_binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
echo "engine: $engine crash point: $crash position: $r";
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
@@ -99,12 +103,17 @@ while ($e < $engine_count)
# Check which tables still exists
--list_files $MYSQLD_DATADIR/test *TR*
- --let $binlog_file=master-bin.000001
+ --let $binlog_file=$start_binlog_file
+ --let $binlog_output_name=master-bin.000001
--source include/show_binlog_events.inc
if ($error)
{
- --let $binlog_file=master-bin.000002
- --source include/show_binlog_events.inc
+ --let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
+ --let $binlog_output_name=master-bin.000002
+ if ($binlog_file != $start_binlog_file)
+ {
+ --source include/show_binlog_events.inc
+ }
}
--disable_warnings
drop table if exists t1;
diff --git a/mysql-test/suite/atomic/drop_view.result b/mysql-test/suite/atomic/drop_view.result
index b71b088b1a5..c5f850c65b3 100644
--- a/mysql-test/suite/atomic/drop_view.result
+++ b/mysql-test/suite/atomic/drop_view.result
@@ -1,3 +1,4 @@
+RESET MASTER;
"engine: aria crash point: ddl_log_drop_before_delete_view position: 1"
v2.frm
master-bin.000002 # Query # # use `test`; DROP VIEW IF EXISTS `v1` /* generated by ddl recovery */
diff --git a/mysql-test/suite/atomic/drop_view.test b/mysql-test/suite/atomic/drop_view.test
index f7cfdab963a..e4c1daf9964 100644
--- a/mysql-test/suite/atomic/drop_view.test
+++ b/mysql-test/suite/atomic/drop_view.test
@@ -6,7 +6,11 @@
# Testing of atomic drop of view with crashes in a lot of different places
#
+# Speed up wait_until_connected_again.inc
+let NO_WSREP=1;
+RESET MASTER;
let $MYSQLD_DATADIR= `SELECT @@datadir`;
+
let $engine_count=1;
let $engines='aria';
@@ -58,7 +62,9 @@ while ($e < $engine_count)
inc $r;
create view v1 as select * from t1;
create view v2 as select * from t1;
- RESET MASTER;
+
+ FLUSH BINARY LOGS;
+ --let $start_binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
echo "engine: $engine crash point: $crash position: $r";
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
@@ -79,12 +85,18 @@ while ($e < $engine_count)
}
# Check which tables still exists
--list_files $MYSQLD_DATADIR/test v*
- --let $binlog_file=master-bin.000001
+
+ --let $binlog_file=$start_binlog_file
+ --let $binlog_output_name=master-bin.000001
--source include/show_binlog_events.inc
if ($error)
{
- --let $binlog_file=master-bin.000002
- --source include/show_binlog_events.inc
+ --let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
+ --let $binlog_output_name=master-bin.000002
+ if ($binlog_file != $start_binlog_file)
+ {
+ --source include/show_binlog_events.inc
+ }
}
# Really drop the views
--disable_warnings
diff --git a/mysql-test/suite/atomic/rename_table.test b/mysql-test/suite/atomic/rename_table.test
index c128d548aef..ee24d1f087f 100644
--- a/mysql-test/suite/atomic/rename_table.test
+++ b/mysql-test/suite/atomic/rename_table.test
@@ -4,6 +4,9 @@
--source include/not_valgrind.inc
--source include/not_embedded.inc
+# Speed up wait_until_connected_again.inc
+let NO_WSREP=1;
+
#
# Testing of atomic rename with forced crashes in a lot of different places
#
diff --git a/mysql-test/suite/atomic/rename_table_binlog.test b/mysql-test/suite/atomic/rename_table_binlog.test
index 49878cf272e..bc505148c93 100644
--- a/mysql-test/suite/atomic/rename_table_binlog.test
+++ b/mysql-test/suite/atomic/rename_table_binlog.test
@@ -4,6 +4,10 @@
--source include/have_log_bin.inc
--source include/not_valgrind.inc
+# Speed up wait_until_connected_again.inc
+let NO_WSREP=1;
+RESET MASTER;
+
#
# Testing of atomic rename with binlogging
# - First crash is before binlog is written, in which case the rename should
@@ -11,8 +15,6 @@
# - Second crash is after binlog is written, in which case the rename should hold
#
-RESET MASTER;
-
let $engine_count=2;
let $engines='myisam', 'aria';
diff --git a/mysql-test/suite/atomic/rename_trigger.test b/mysql-test/suite/atomic/rename_trigger.test
index 0509b109005..b0b419a3567 100644
--- a/mysql-test/suite/atomic/rename_trigger.test
+++ b/mysql-test/suite/atomic/rename_trigger.test
@@ -4,6 +4,9 @@
--source include/not_valgrind.inc
--source include/not_embedded.inc
+# Speed up wait_until_connected_again.inc
+let NO_WSREP=1;
+
#
# Testing of atomic rename of table with triggers when table rename works but
# rename of trigger fails.