diff options
21 files changed, 32 insertions, 86 deletions
diff --git a/mysql-test/include/kill_and_restart_mysqld.inc b/mysql-test/include/kill_and_restart_mysqld.inc deleted file mode 100644 index f2ac9b504d2..00000000000 --- a/mysql-test/include/kill_and_restart_mysqld.inc +++ /dev/null @@ -1,19 +0,0 @@ ---let $_server_id= `SELECT @@server_id` ---let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect - -if ($restart_parameters) -{ - --echo # Kill and restart: $restart_parameters - --exec echo "restart: $restart_parameters" > $_expect_file_name -} -if (!$restart_parameters) -{ - --echo # Kill and restart - --exec echo "restart" > $_expect_file_name -} - ---shutdown_server 0 ---source include/wait_until_disconnected.inc ---enable_reconnect ---source include/wait_until_connected_again.inc ---disable_reconnect diff --git a/mysql-test/include/restart_mysqld_with_option.inc b/mysql-test/include/restart_mysqld_with_option.inc deleted file mode 100644 index 4250b368b1a..00000000000 --- a/mysql-test/include/restart_mysqld_with_option.inc +++ /dev/null @@ -1,31 +0,0 @@ - -if ($rpl_inited) -{ - if (!$allow_rpl_inited) - { - --die ERROR IN TEST: This script does not support replication - } -} - -# 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 10; - -# Write file to make mysql-test-run.pl start up the server again ---exec echo "restart:$_mysqld_option" > $_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 - diff --git a/mysql-test/suite/innodb/r/autoinc_persist.result b/mysql-test/suite/innodb/r/autoinc_persist.result index 814f3d32e60..e61262076ed 100644 --- a/mysql-test/suite/innodb/r/autoinc_persist.result +++ b/mysql-test/suite/innodb/r/autoinc_persist.result @@ -432,7 +432,6 @@ DELETE FROM t7 WHERE a = 100000200; set global innodb_flush_log_at_trx_commit=1; INSERT INTO t9 VALUES(100000000200); DELETE FROM t9 WHERE a = 100000000200; -# Kill and restart INSERT INTO t1 VALUES(0); SELECT a AS `Expect 126` FROM t1 ORDER BY a DESC LIMIT 1; Expect 126 @@ -498,7 +497,6 @@ SELECT * FROM t19; a 1 2 -# Kill and restart INSERT INTO t1 VALUES(0), (0); SELECT * FROM t1; a @@ -639,7 +637,6 @@ BEGIN; # Without the fix in page_create_empty() the counter value would be lost # when ROLLBACK deletes the last row. ROLLBACK; -# Kill and restart INSERT INTO t3 VALUES(0); SELECT MAX(a) AS `Expect 120` FROM t3; Expect 120 @@ -913,7 +910,6 @@ UPDATE t33 SET a = 10 WHERE a = 1; INSERT INTO t33 VALUES(2, NULL); ERROR 23000: Duplicate entry '2' for key 'PRIMARY' COMMIT; -# Kill and restart # This will not insert 0 INSERT INTO t31(a) VALUES(6), (0); SELECT * FROM t31; diff --git a/mysql-test/suite/innodb/r/innodb-blob.result b/mysql-test/suite/innodb/r/innodb-blob.result index afdaca9acd2..ec37492c279 100644 --- a/mysql-test/suite/innodb/r/innodb-blob.result +++ b/mysql-test/suite/innodb/r/innodb-blob.result @@ -43,7 +43,6 @@ a 3 BEGIN; INSERT INTO t2 VALUES (42); -# Kill and restart disconnect con1; disconnect con2; connection default; @@ -98,7 +97,6 @@ SELECT info FROM information_schema.processlist WHERE state = 'debug sync point: before_row_upd_extern'; info UPDATE t3 SET c=REPEAT('i',3000) WHERE a=2 -# Kill and restart disconnect con2; connection default; ERROR HY000: Lost connection to MySQL server during query @@ -130,7 +128,6 @@ SELECT info FROM information_schema.processlist WHERE state = 'debug sync point: after_row_upd_extern'; info UPDATE t3 SET c=REPEAT('j',3000) WHERE a=2 -# Kill and restart disconnect con2; connection default; ERROR HY000: Lost connection to MySQL server during query diff --git a/mysql-test/suite/innodb/r/innodb_bug53756.result b/mysql-test/suite/innodb/r/innodb_bug53756.result index 9809682a4b2..06fa96c2f81 100644 --- a/mysql-test/suite/innodb/r/innodb_bug53756.result +++ b/mysql-test/suite/innodb/r/innodb_bug53756.result @@ -77,7 +77,6 @@ pk c1 4 44 START TRANSACTION; INSERT INTO bug_53756 VALUES (666,666); -# Kill and restart disconnect con1; disconnect con2; disconnect con3; diff --git a/mysql-test/suite/innodb/r/innodb_bug59641.result b/mysql-test/suite/innodb/r/innodb_bug59641.result index 2c042585745..8bf574e2bec 100644 --- a/mysql-test/suite/innodb/r/innodb_bug59641.result +++ b/mysql-test/suite/innodb/r/innodb_bug59641.result @@ -17,7 +17,6 @@ UPDATE t SET b=4*a WHERE a=32; XA END '789'; XA PREPARE '789'; CONNECT con3,localhost,root,,; -# Kill and restart SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; SELECT * FROM t; a b diff --git a/mysql-test/suite/innodb/r/log_file_size.result b/mysql-test/suite/innodb/r/log_file_size.result index e07dba67a7b..b0ab6e38395 100644 --- a/mysql-test/suite/innodb/r/log_file_size.result +++ b/mysql-test/suite/innodb/r/log_file_size.result @@ -1,13 +1,11 @@ CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB; BEGIN; INSERT INTO t1 VALUES (42); -# Kill and restart: --innodb-log-file-size=6M SELECT * FROM t1; a INSERT INTO t1 VALUES (42); BEGIN; DELETE FROM t1; -# Kill and restart: --innodb-log-files-in-group=3 --innodb-log-file-size=5M SELECT * FROM t1; a 42 diff --git a/mysql-test/suite/innodb/r/read_only_recovery.result b/mysql-test/suite/innodb/r/read_only_recovery.result index 7fcbfddf33e..532749a7aae 100644 --- a/mysql-test/suite/innodb/r/read_only_recovery.result +++ b/mysql-test/suite/innodb/r/read_only_recovery.result @@ -13,7 +13,6 @@ SET GLOBAL innodb_flush_log_at_trx_commit=1; BEGIN; INSERT INTO t VALUES(0); ROLLBACK; -# Kill and restart: --innodb-force-recovery=3 disconnect con1; SELECT * FROM t; a diff --git a/mysql-test/suite/innodb/r/xa_recovery.result b/mysql-test/suite/innodb/r/xa_recovery.result index 7a9448ad9f0..a93afcb07f8 100644 --- a/mysql-test/suite/innodb/r/xa_recovery.result +++ b/mysql-test/suite/innodb/r/xa_recovery.result @@ -6,7 +6,6 @@ UPDATE t1 set a=2; XA END 'x'; XA PREPARE 'x'; connection default; -# Kill and restart disconnect con1; connect con1,localhost,root; SELECT * FROM t1 LOCK IN SHARE MODE; diff --git a/mysql-test/suite/innodb/t/autoinc_persist.test b/mysql-test/suite/innodb/t/autoinc_persist.test index 45a96f85fe1..904ed51f718 100644 --- a/mysql-test/suite/innodb/t/autoinc_persist.test +++ b/mysql-test/suite/innodb/t/autoinc_persist.test @@ -251,7 +251,8 @@ set global innodb_flush_log_at_trx_commit=1; INSERT INTO t9 VALUES(100000000200); DELETE FROM t9 WHERE a = 100000000200; ---source include/kill_and_restart_mysqld.inc +--let $shutdown_timeout=0 +--source include/restart_mysqld.inc INSERT INTO t1 VALUES(0); SELECT a AS `Expect 126` FROM t1 ORDER BY a DESC LIMIT 1; @@ -306,7 +307,7 @@ RENAME TABLE t9 to t19; INSERT INTO t19 VALUES(0), (0); SELECT * FROM t19; ---source include/kill_and_restart_mysqld.inc +--source include/restart_mysqld.inc INSERT INTO t1 VALUES(0), (0); SELECT * FROM t1; @@ -400,7 +401,7 @@ while ($i) { --enable_query_log ROLLBACK; ---source include/kill_and_restart_mysqld.inc +--source include/restart_mysqld.inc INSERT INTO t3 VALUES(0); SELECT MAX(a) AS `Expect 120` FROM t3; @@ -494,7 +495,7 @@ UPDATE t33 SET a = 10 WHERE a = 1; INSERT INTO t33 VALUES(2, NULL); COMMIT; ---source include/kill_and_restart_mysqld.inc +--source include/restart_mysqld.inc --echo # This will not insert 0 INSERT INTO t31(a) VALUES(6), (0); diff --git a/mysql-test/suite/innodb/t/innodb-blob.test b/mysql-test/suite/innodb/t/innodb-blob.test index ea50af4a7fc..d2484e2175d 100644 --- a/mysql-test/suite/innodb/t/innodb-blob.test +++ b/mysql-test/suite/innodb/t/innodb-blob.test @@ -70,7 +70,8 @@ SELECT a FROM t1; BEGIN; INSERT INTO t2 VALUES (42); ---source include/kill_and_restart_mysqld.inc +--let $shutdown_timeout=0 +--source include/restart_mysqld.inc disconnect con1; disconnect con2; @@ -138,7 +139,8 @@ SET DEBUG_SYNC='now WAIT_FOR have_latch'; SELECT info FROM information_schema.processlist WHERE state = 'debug sync point: before_row_upd_extern'; ---source include/kill_and_restart_mysqld.inc +--let $shutdown_timeout=0 +--source include/restart_mysqld.inc disconnect con2; connection default; @@ -177,7 +179,8 @@ SET DEBUG_SYNC='now WAIT_FOR have_latch'; SELECT info FROM information_schema.processlist WHERE state = 'debug sync point: after_row_upd_extern'; ---source include/kill_and_restart_mysqld.inc +--let $shutdown_timeout=0 +--source include/restart_mysqld.inc disconnect con2; connection default; diff --git a/mysql-test/suite/innodb/t/innodb_bug53756.test b/mysql-test/suite/innodb/t/innodb_bug53756.test index d6bccf70147..a676868aea7 100644 --- a/mysql-test/suite/innodb/t/innodb_bug53756.test +++ b/mysql-test/suite/innodb/t/innodb_bug53756.test @@ -84,7 +84,8 @@ SELECT * FROM bug_53756; START TRANSACTION; INSERT INTO bug_53756 VALUES (666,666); ---source include/kill_and_restart_mysqld.inc +--let $shutdown_timeout=0 +--source include/restart_mysqld.inc --disconnect con1 --disconnect con2 --disconnect con3 diff --git a/mysql-test/suite/innodb/t/innodb_bug59641.test b/mysql-test/suite/innodb/t/innodb_bug59641.test index 5f7528cf01a..e0d3431e45b 100644 --- a/mysql-test/suite/innodb/t/innodb_bug59641.test +++ b/mysql-test/suite/innodb/t/innodb_bug59641.test @@ -33,7 +33,8 @@ XA PREPARE '789'; CONNECT (con3,localhost,root,,); ---source include/kill_and_restart_mysqld.inc +--let $shutdown_timeout=0 +--source include/restart_mysqld.inc SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; SELECT * FROM t; COMMIT; diff --git a/mysql-test/suite/innodb/t/log_alter_table.test b/mysql-test/suite/innodb/t/log_alter_table.test index f479c6695aa..bb7738d9fb8 100644 --- a/mysql-test/suite/innodb/t/log_alter_table.test +++ b/mysql-test/suite/innodb/t/log_alter_table.test @@ -4,6 +4,9 @@ # Embedded server does not support crashing --source include/not_embedded.inc +# start afresh +--source include/restart_mysqld.inc + --echo # --echo # Bug#21801423 INNODB REDO LOG DOES NOT INDICATE WHEN --echo # FILES ARE CREATED diff --git a/mysql-test/suite/innodb/t/log_file_size.test b/mysql-test/suite/innodb/t/log_file_size.test index 4705ca68091..d01263e3c89 100644 --- a/mysql-test/suite/innodb/t/log_file_size.test +++ b/mysql-test/suite/innodb/t/log_file_size.test @@ -29,7 +29,7 @@ BEGIN; INSERT INTO t1 VALUES (42); let $restart_parameters = --innodb-log-file-size=6M; ---source include/kill_and_restart_mysqld.inc +--source include/restart_mysqld.inc SELECT * FROM t1; @@ -38,7 +38,7 @@ BEGIN; DELETE FROM t1; let $restart_parameters = --innodb-log-files-in-group=3 --innodb-log-file-size=5M; ---source include/kill_and_restart_mysqld.inc +--source include/restart_mysqld.inc SELECT * FROM t1; diff --git a/mysql-test/suite/innodb/t/read_only_recovery.test b/mysql-test/suite/innodb/t/read_only_recovery.test index b111d96debe..a1a69be724b 100644 --- a/mysql-test/suite/innodb/t/read_only_recovery.test +++ b/mysql-test/suite/innodb/t/read_only_recovery.test @@ -20,7 +20,9 @@ BEGIN; INSERT INTO t VALUES(0); ROLLBACK; --let $restart_parameters= --innodb-force-recovery=3 ---source include/kill_and_restart_mysqld.inc +--let $shutdown_timeout= 0 +--source include/restart_mysqld.inc +--let $shutdown_timeout= 30 --disconnect con1 SELECT * FROM t; SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; diff --git a/mysql-test/suite/innodb/t/xa_recovery.test b/mysql-test/suite/innodb/t/xa_recovery.test index f5c2b655545..957b758d05c 100644 --- a/mysql-test/suite/innodb/t/xa_recovery.test +++ b/mysql-test/suite/innodb/t/xa_recovery.test @@ -15,7 +15,8 @@ connect (con1,localhost,root); XA START 'x'; UPDATE t1 set a=2; XA END 'x'; XA PREPARE 'x'; connection default; ---source include/kill_and_restart_mysqld.inc +--let $shutdown_timeout=0 +--source include/restart_mysqld.inc disconnect con1; connect (con1,localhost,root); diff --git a/mysql-test/suite/innodb_fts/r/crash_recovery.result b/mysql-test/suite/innodb_fts/r/crash_recovery.result index 2ff867b70fe..7bf86631d1e 100644 --- a/mysql-test/suite/innodb_fts/r/crash_recovery.result +++ b/mysql-test/suite/innodb_fts/r/crash_recovery.result @@ -23,7 +23,6 @@ DELETE FROM articles LIMIT 1; ROLLBACK; disconnect flush_redo_log; connection default; -# Kill and restart INSERT INTO articles (title,body) VALUES ('MySQL Tutorial','DBMS stands for DataBase ...'); CREATE FULLTEXT INDEX idx ON articles (title,body); @@ -52,7 +51,6 @@ DELETE FROM articles LIMIT 1; ROLLBACK; disconnect flush_redo_log; connection default; -# Kill and restart INSERT INTO articles (title,body) VALUES ('MySQL Tutorial','DBMS stands for DataBase ...'); SELECT * FROM articles @@ -83,7 +81,6 @@ INSERT INTO articles VALUES BEGIN; INSERT INTO articles VALUES (100, 200, 'MySQL Tutorial','DBMS stands for DataBase ...'); -# Kill and restart INSERT INTO articles VALUES (8, 12, 'MySQL Tutorial','DBMS stands for DataBase ...'); SELECT * FROM articles WHERE MATCH (title, body) AGAINST ('Tutorial' IN NATURAL LANGUAGE MODE); diff --git a/mysql-test/suite/innodb_fts/t/crash_recovery.test b/mysql-test/suite/innodb_fts/t/crash_recovery.test index 63c920a91ec..8b82e5e68b5 100644 --- a/mysql-test/suite/innodb_fts/t/crash_recovery.test +++ b/mysql-test/suite/innodb_fts/t/crash_recovery.test @@ -47,7 +47,7 @@ ROLLBACK; --disconnect flush_redo_log --connection default ---source include/kill_and_restart_mysqld.inc +--source include/restart_mysqld.inc # This insert will re-initialize the Doc ID counter, it should not crash INSERT INTO articles (title,body) VALUES @@ -85,7 +85,7 @@ ROLLBACK; --disconnect flush_redo_log --connection default ---source include/kill_and_restart_mysqld.inc +--source include/restart_mysqld.inc # This insert will re-initialize the Doc ID counter, it should not crash INSERT INTO articles (title,body) VALUES @@ -126,7 +126,7 @@ BEGIN; INSERT INTO articles VALUES (100, 200, 'MySQL Tutorial','DBMS stands for DataBase ...'); ---source include/kill_and_restart_mysqld.inc +--source include/restart_mysqld.inc # This would re-initialize the FTS index and do the re-tokenization # of above records diff --git a/storage/rocksdb/mysql-test/rocksdb/t/compression_zstd.test b/storage/rocksdb/mysql-test/rocksdb/t/compression_zstd.test index 263896e8487..c2216f768d0 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/compression_zstd.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/compression_zstd.test @@ -7,8 +7,8 @@ if ($no_zstd) -- Skip Requires RocksDB to be built with ZStandard Compression support } ---let $_mysqld_option=--rocksdb_default_cf_options=compression_per_level=kZSTDNotFinalCompression;compression_opts=-14:4:0; ---source include/restart_mysqld_with_option.inc +--let $restart_parameters=--rocksdb_default_cf_options=compression_per_level=kZSTDNotFinalCompression;compression_opts=-14:4:0; +--source include/restart_mysqld.inc create table t (id int primary key) engine=rocksdb; drop table t; diff --git a/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_cf_options.test b/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_cf_options.test index 23f9b771d42..5fee66bddb6 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_cf_options.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_cf_options.test @@ -34,8 +34,8 @@ select cf_name, option_type, value # restart with cf configs for cf1 and cf2 --exec echo "" > $MYSQLTEST_VARDIR/log/mysqld.1.err ---let $_mysqld_option=--rocksdb_override_cf_options=cf1={write_buffer_size=8m;target_file_size_base=2m};cf2={write_buffer_size=16m;max_bytes_for_level_multiplier=8};z={target_file_size_base=4m}; ---source include/restart_mysqld_with_option.inc +--let $restart_parameters=--rocksdb_override_cf_options=cf1={write_buffer_size=8m;target_file_size_base=2m};cf2={write_buffer_size=16m;max_bytes_for_level_multiplier=8};z={target_file_size_base=4m}; +--source include/restart_mysqld.inc # check column family options in log -- should reflect individual settings |