Skip to content

Commit

Permalink
Merge 10.3 into 10.4
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Aug 21, 2020
2 parents 688fb63 + c277bcd commit aa6cb7e
Show file tree
Hide file tree
Showing 54 changed files with 263 additions and 314 deletions.
6 changes: 4 additions & 2 deletions client/mysqltest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ static uint opt_tail_lines= 0;

static uint opt_connect_timeout= 0;
static uint opt_wait_for_pos_timeout= 0;

static const uint default_wait_for_pos_timeout= 300;
static char delimiter[MAX_DELIMITER_LENGTH]= ";";
static size_t delimiter_length= 1;

Expand Down Expand Up @@ -5080,6 +5080,8 @@ void do_shutdown_server(struct st_command *command)
};
DBUG_ENTER("do_shutdown_server");

/* the wait-for-pos' default based value of 'timeout' must fit to MDEV-23511 */
compile_time_assert(default_wait_for_pos_timeout / 5 >= 60);
check_command_args(command, command->first_argument, shutdown_args,
sizeof(shutdown_args)/sizeof(struct command_arg),
' ');
Expand Down Expand Up @@ -7039,7 +7041,7 @@ static struct my_option my_long_options[] =
{"wait_for_pos_timeout", 0,
"Number of seconds to wait for master_pos_wait",
&opt_wait_for_pos_timeout, &opt_wait_for_pos_timeout, 0, GET_UINT,
REQUIRED_ARG, 300, 0, 3600 * 12, 0, 0, 0},
REQUIRED_ARG, default_wait_for_pos_timeout, 0, 3600 * 12, 0, 0, 0},
{"plugin_dir", 0, "Directory for client-side plugins.",
&opt_plugin_dir, &opt_plugin_dir, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/include/restart_mysqld.inc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ==== Usage ====
#
# [--let $shutdown_timeout= 30]
# [--let $shutdown_timeout= 60]
# [--let $allow_rpl_inited= 1]
# --source include/restart_mysqld.inc

Expand Down
4 changes: 2 additions & 2 deletions mysql-test/include/rpl_stop_server.inc
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ if ($rpl_debug)
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect

# Send shutdown to the connected server and give
# it 60 seconds to die before zapping it
shutdown_server 60;
# it 60 seconds (of mysqltest's default) to die before zapping it
shutdown_server;

--source include/wait_until_disconnected.inc

Expand Down
2 changes: 1 addition & 1 deletion mysql-test/include/search_pattern_in_file.inc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
# # Stop the server
# let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
# --exec echo "wait" > $restart_file
# --shutdown_server 10
# --shutdown_server
# --source include/wait_until_disconnected.inc
#
# --error 1
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/include/shutdown_mysqld.inc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ==== Usage ====
#
# [--let $shutdown_timeout= 30]
# [--let $shutdown_timeout= 60]
# [--let $allow_rpl_inited= 1]
# --source include/shutdown_mysqld.inc

Expand Down
2 changes: 1 addition & 1 deletion mysql-test/main/empty_server_name-8224.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
--source include/not_embedded.inc
create server '' foreign data wrapper w2 options (host '127.0.0.1');
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server 10
--shutdown_server
--source include/wait_until_disconnected.inc
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect

Expand Down
4 changes: 2 additions & 2 deletions mysql-test/main/host_cache_size_functionality.test
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ select @@global.Host_Cache_Size > 0;

let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
--exec echo "wait" > $restart_file
--shutdown_server 10
--shutdown_server
--source include/wait_until_disconnected.inc
-- exec echo "restart:--host_cache_size=1 " > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
-- enable_reconnect
Expand Down Expand Up @@ -143,7 +143,7 @@ SELECT Host_Cache_Size = @@SESSION.Host_Cache_Size;

#let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
#--exec echo "wait" > $restart_file
#--shutdown_server 10
#--shutdown_server
#--source include/wait_until_disconnected.inc
#-- exec echo "restart:--bind-address=$bind_ip " > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
#-- enable_reconnect
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/main/init_file_set_password-7656.test
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ EOF

--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect

--shutdown_server 10
--shutdown_server
--source include/wait_until_disconnected.inc

--exec echo "restart:--init-file=$MYSQLTEST_VARDIR/init.file " > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/main/log_errchk.test
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
--echo # and slow query log file.
# Restart server with fifo file as general log file.
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server 60
--shutdown_server
--source include/wait_until_disconnected.inc
--enable_reconnect
# Write file to make mysql-test-run.pl start up the server again
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/suite/binlog/t/binlog_max_extension.test
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ RESET MASTER;

# 1. Stop master server
-- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
-- shutdown_server 10
-- shutdown_server
-- source include/wait_until_disconnected.inc

# 2. Prepare log and index file
Expand Down Expand Up @@ -70,7 +70,7 @@ FLUSH LOGS;

# 1. Stop the server
-- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
-- shutdown_server 10
-- shutdown_server
-- source include/wait_until_disconnected.inc

# 2. Undo changes to index and log files
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/binlog_encryption/restart_server.inc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
--enable_reconnect
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect

shutdown_server 10;
shutdown_server;

--source include/wait_until_disconnected.inc

Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/innodb/t/innodb-corrupted-table.test
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ alter table t1 add primary key (pk);
--echo # Stop the server, replace the frm with the old one and restart the server

--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server 10
--shutdown_server
--source include/wait_until_disconnected.inc

--remove_file $datadir/test/t1.frm
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/suite/innodb/t/innodb_bug60196.test
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ SELECT * FROM bug_60196;
-- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect

# Send a shutdown request to the server
-- shutdown_server 10
-- shutdown_server

# Call script that will poll the server waiting for it to disapear
-- source include/wait_until_disconnected.inc
Expand Down Expand Up @@ -124,7 +124,7 @@ SELECT * FROM Bug_60309;
-- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect

# Send a shutdown request to the server
-- shutdown_server 10
-- shutdown_server

# Call script that will poll the server waiting for it to disapear
-- source include/wait_until_disconnected.inc
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/multi_source/info_logs.test
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ show all slaves status;
--append_file $MYSQLTEST_VARDIR/tmp/mysqld.3.expect
restart
EOF
--shutdown_server 60
--shutdown_server
--source include/wait_until_connected_again.inc
--source include/wait_for_slave_to_start.inc
set default_master_connection = 'MASTER 2.2';
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/roles/acl_load_mutex-5170.test
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ flush tables;
--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
wait
EOF
--shutdown_server 60
--shutdown_server
--source include/wait_until_disconnected.inc
--enable_reconnect
--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/rpl/include/rpl_shutdown_wait_slaves.inc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ SET @@GLOBAL.debug_dbug="+d,simulate_delay_at_shutdown";
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
wait
EOF
# --shutdown_server 60
# --shutdown_server
--send SHUTDOWN WAIT FOR ALL SLAVES
--reap
--source include/wait_until_disconnected.inc
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/rpl/t/rpl_gtid_crash.test
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ SELECT * FROM t1 WHERE a >= 30 ORDER BY a;
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
wait
EOF
shutdown_server 10;
shutdown_server;
--source include/wait_until_disconnected.inc

--remove_file $datadir/master-bin.state
Expand Down
18 changes: 9 additions & 9 deletions mysql-test/suite/rpl/t/rpl_gtid_stop_start.test
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ CHANGE MASTER TO master_use_gtid=current_pos;
wait
EOF
FLUSH LOGS;
--shutdown_server 30
--shutdown_server
--source include/wait_until_disconnected.inc

--connection server_1
Expand Down Expand Up @@ -70,7 +70,7 @@ SHOW BINLOG EVENTS IN 'master-bin.000004' LIMIT 1,1;
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
wait
EOF
--shutdown_server 30
--shutdown_server
--source include/wait_until_disconnected.inc

--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
Expand Down Expand Up @@ -103,7 +103,7 @@ SELECT * FROM t1 ORDER BY a;
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
wait
EOF
--shutdown_server 30
--shutdown_server
--source include/wait_until_disconnected.inc

--append_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
Expand Down Expand Up @@ -148,7 +148,7 @@ SELECT * FROM t1 ORDER BY a;
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
wait
EOF
--shutdown_server 30
--shutdown_server
--source include/wait_until_disconnected.inc

--append_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
Expand Down Expand Up @@ -191,7 +191,7 @@ SET sql_log_bin= 1;
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
wait
EOF
--shutdown_server 30
--shutdown_server
--source include/wait_until_disconnected.inc

--append_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
Expand Down Expand Up @@ -221,7 +221,7 @@ SELECT * FROM t1 ORDER BY a;
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
wait
EOF
--shutdown_server 30
--shutdown_server
--source include/wait_until_disconnected.inc

--append_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
Expand All @@ -237,7 +237,7 @@ SET sql_log_bin= 1;
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
wait
EOF
--shutdown_server 30
--shutdown_server
--source include/wait_until_disconnected.inc

--append_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
Expand Down Expand Up @@ -273,7 +273,7 @@ SELECT domain_id, COUNT(*) FROM mysql.gtid_slave_pos GROUP BY domain_id;
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
wait
EOF
--shutdown_server 30
--shutdown_server
--source include/wait_until_disconnected.inc

--append_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
Expand Down Expand Up @@ -305,7 +305,7 @@ SET sql_log_bin=1;
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
wait
EOF
--shutdown_server 30
--shutdown_server
--source include/wait_until_disconnected.inc

# Let the slave mysqld server start again.
Expand Down
10 changes: 5 additions & 5 deletions mysql-test/suite/rpl/t/rpl_mdev12179.test
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ SET sql_log_bin=1;
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
wait
EOF
--shutdown_server 30
--shutdown_server
--source include/wait_until_disconnected.inc

--connection server_1
Expand Down Expand Up @@ -96,7 +96,7 @@ SET sql_log_bin=1;
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
wait
EOF
--shutdown_server 30
--shutdown_server
--source include/wait_until_disconnected.inc

--connection server_1
Expand Down Expand Up @@ -134,7 +134,7 @@ SET sql_log_bin=1;
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
wait
EOF
--shutdown_server 30
--shutdown_server
--source include/wait_until_disconnected.inc

--connection server_1
Expand Down Expand Up @@ -178,7 +178,7 @@ SET sql_log_bin=1;
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
wait
EOF
--shutdown_server 30
--shutdown_server
--source include/wait_until_disconnected.inc

--connection server_1
Expand Down Expand Up @@ -275,7 +275,7 @@ while (!$done)
wait
EOF
--connection server_2
--shutdown_server 30
--shutdown_server
--source include/wait_until_disconnected.inc

--echo *** Restart the slave server to prove 'gtid_slave_pos_innodb' autodiscovery ***
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/rpl/t/rpl_mdev382.test
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ SELECT * FROM `db1``; select 'oops!'`.`t``1` ORDER BY 1;
wait-rpl_mdev382.test
EOF

--shutdown_server 30
--shutdown_server

--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
restart-rpl_mdev382.test
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/rpl/t/rpl_parallel_partition.test
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ ALTER TABLE `E` REMOVE PARTITIONING;
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
wait
EOF
--shutdown_server 30
--shutdown_server
--source include/wait_until_disconnected.inc
--connection default
--source include/wait_until_disconnected.inc
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/storage_engine/alter_tablespace.test
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ wait
EOF

--enable_reconnect
--shutdown_server 60
--shutdown_server

--source include/wait_until_disconnected.inc

Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/storage_engine/trx/xa_recovery.test
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
restart
EOF
--shutdown_server 60
--shutdown_server
--source include/wait_until_connected_again.inc


Expand Down
6 changes: 3 additions & 3 deletions storage/innobase/dict/dict0crea.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1511,7 +1511,7 @@ dict_create_or_check_foreign_constraint_tables(void)

row_mysql_unlock_data_dictionary(trx);

trx_free(trx);
trx->free();

srv_file_per_table = srv_file_per_table_backup;

Expand Down Expand Up @@ -1612,7 +1612,7 @@ dict_create_or_check_sys_virtual()

row_mysql_unlock_data_dictionary(trx);

trx_free(trx);
trx->free();

srv_file_per_table = srv_file_per_table_backup;

Expand Down Expand Up @@ -2146,7 +2146,7 @@ dict_create_or_check_sys_tablespace(void)

row_mysql_unlock_data_dictionary(trx);

trx_free(trx);
trx->free();

srv_file_per_table = srv_file_per_table_backup;

Expand Down
Loading

0 comments on commit aa6cb7e

Please sign in to comment.