Skip to content

Commit 792aaed

Browse files
committed
MariaRocks port: Use another way to handle --force-restart
Based on discussion at maria-developers@: - Remove 'Support --force-restart "pseudo-argument"' that was added a few csets before - Instead, use "source include/restart_mysqld.inc" in the testcases that need a freshly-started server
1 parent 8014a94 commit 792aaed

12 files changed

+14
-18
lines changed

mysql-test/lib/mtr_cases.pm

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -604,14 +604,6 @@ sub process_opts {
604604
# Fallthrough, add the --default-time-zone option
605605
}
606606

607-
# --force-restart is a "fake" option which just signals MTR that
608-
# it should restart the mysqld server even if it was started with
609-
# a matching set of options
610-
if ($opt eq "--force-restart") {
611-
$tinfo->{'force_restart'}= 1;
612-
next;
613-
}
614-
615607
# Ok, this was a real option, add it
616608
push(@{$tinfo->{$opt_name}}, $opt);
617609
}

mysql-test/mysql-test-run.pl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5164,6 +5164,7 @@ ()
51645164
# Find out if server should be restarted for this test
51655165
sub server_need_restart {
51665166
my ($tinfo, $server)= @_;
5167+
51675168
if ( using_extern() )
51685169
{
51695170
mtr_verbose_restart($server, "no restart for --extern server");
@@ -5256,11 +5257,7 @@ sub server_need_restart {
52565257

52575258
sub servers_need_restart($) {
52585259
my ($tinfo)= @_;
5259-
if (defined($tinfo->{'force_restart'})) {
5260-
return all_servers();
5261-
} else {
5262-
return grep { server_need_restart($tinfo, $_); } all_servers();
5263-
}
5260+
return grep { server_need_restart($tinfo, $_); } all_servers();
52645261
}
52655262

52665263

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
--skip-rocksdb_debug_optimizer_no_zero_cardinality
22
--rocksdb_compaction_sequential_deletes=0
3-
--force-restart
43
--rocksdb_table_stats_sampling_pct=100

storage/rocksdb/mysql-test/rocksdb/t/cardinality.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
--source include/have_rocksdb.inc
22

3+
--source include/restart_mysqld.inc
4+
35
--disable_warnings
46
DROP TABLE IF EXISTS t1;
57
--enable_warnings
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--force-restart --binlog_format=row --gtid_mode=ON --enforce_gtid_consistency --log_slave_updates
1+
--binlog_format=row --gtid_mode=ON --enforce_gtid_consistency --log_slave_updates

storage/rocksdb/mysql-test/rocksdb/t/information_schema.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
--source include/have_rocksdb.inc
22
--source include/have_log_bin.inc
33

4+
--source include/restart_mysqld.inc
5+
46
--disable_warnings
57
DROP TABLE IF EXISTS t1;
68
DROP TABLE IF EXISTS t2;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--force-restart --binlog_format=row
1+
--binlog_format=row

storage/rocksdb/mysql-test/rocksdb/t/mysqldump.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
--enable_connect_log
66

7+
--source include/restart_mysqld.inc
8+
79
# Save the initial number of concurrent sessions
810
--source include/count_sessions.inc
911

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
--force-restart
21
--rocksdb_debug_optimizer_n_rows=20000
32
--rocksdb_records_in_range=1000
43
--rocksdb_table_stats_sampling_pct=100

storage/rocksdb/mysql-test/rocksdb/t/records_in_range.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
--source include/have_rocksdb.inc
22

3+
--source include/restart_mysqld.inc
4+
35
--disable_warnings
46
DROP TABLE IF EXISTS t1;
57
--enable_warnings

0 commit comments

Comments
 (0)