Commit d6d994bf authored by Sergei Golubchik's avatar Sergei Golubchik

remove two redundant *.inc files to restart a server

namely, restart_mysqld_with_option.inc and kill_and_restart_mysqld.inc -
use restart_mysqld.inc instead.

Also remove innodb_wl6501_crash_stripped.inc that wasn't used anywhere.
parent 143e771d
--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
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
......@@ -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;
......
......@@ -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
......
......@@ -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;
......
......@@ -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
......
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
......
......@@ -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
......
......@@ -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;
......
......@@ -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);
......
......@@ -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;
......
......@@ -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
......
......@@ -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;
......
......@@ -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
......
......@@ -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;
......
......@@ -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;
......
......@@ -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);
......
......@@ -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);
......
......@@ -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
......
......@@ -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;
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment