mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
714762ddb7
Description: ============ To change 'CONSERVATIVE' @@global.slave_parallel_mode default to 'OPTIMISTIC' in 10.5. @sql/sys_vars.cc Changed default parallel_mode to 'OPTIMISTIC' @sql/rpl_filter.cc Changed default parallel_mode to 'OPTIMISTIC' @sql/mysqld.cc Removed the initialization of 'SLAVE_PARALLEL_CONSERVATIVE' to 'opt_slave_parallel_mode' variable. @mysql-test/suite/rpl/t/rpl_parallel_mdev6589.test @mysql-test/suite/rpl/t/rpl_mdev6386.test Added 'mtr' suppression to ignore 'ER_PRIOR_COMMIT_FAILED'. In case of 'OPTIMISTIC' mode if a transaction gets killed during "wait_for_prior_commit" it results in above error "1964". Hence suppression needs to be added for this error. @mysql-test/suite/rpl/t/rpl_parallel_conflicts.test Test has a 'slave.opt' which explicitly sets slave_parallel_mode to 'conservative'. When the test ends this mode conflicts with new default mode. Hence check test case reports an error. The 'slave.opt' is removed and options are set and reset within test. @mysql-test/suite/multi_source/info_logs.result @mysql-test/suite/multi_source/reset_slave.result @mysql-test/suite/multi_source/simple.result Result content mismatch in "show slave status" output. This is expected as new slave_parallel_mode='OPTIMISTIC'. @mysql-test/include/check-testcase.test Updated default 'slave_parallel_mode' to 'optimistic'. Refactored rpl_parallel.test into following test cases. Test case 1: @mysql-test/suite/rpl/t/rpl_parallel_domain.test Test case 2: @mysql-test/suite/rpl/t/rpl_parallel_domain_slave_single_grp.test Test case 3: @mysql-test/suite/rpl/t/rpl_parallel_single_grpcmt.test Test case 4: @mysql-test/suite/rpl/t/rpl_parallel_stop_slave.test Test case 5: @mysql-test/suite/rpl/t/rpl_parallel_slave_bgc_kill.test Test case 6: @mysql-test/suite/rpl/t/rpl_parallel_gco_wait_kill.test Test case 7: @mysql-test/suite/rpl/t/rpl_parallel_free_deferred_event.test Test case 8: @mysql-test/suite/rpl/t/rpl_parallel_missed_error_handling.test Test case 9: @mysql-test/suite/rpl/t/rpl_parallel_innodb_lock_conflict.test Test case 10: @mysql-test/suite/rpl/t/rpl_parallel_gtid_slave_pos_update_fail.test Test case 11: @mysql-test/suite/rpl/t/rpl_parallel_wrong_exec_master_pos.test Test case 12: @mysql-test/suite/rpl/t/rpl_parallel_partial_binlog_trans.test Test case 13: @mysql-test/suite/rpl/t/rpl_parallel_ignore_error_on_rotate.test Test case 14: @mysql-test/suite/rpl/t/rpl_parallel_wrong_binlog_order.test Test case 15: @mysql-test/suite/rpl/t/rpl_parallel_incorrect_relay_pos.test Test case 16: @mysql-test/suite/rpl/t/rpl_parallel_retry_deadlock.test Test case 17: @mysql-test/suite/rpl/t/rpl_parallel_deadlock_corrupt_binlog.test Test case 18: @mysql-test/suite/rpl/t/rpl_parallel_mode.test Test case 19: @mysql-test/suite/rpl/t/rpl_parallel_analyze_table_hang.test Test case 20: @mysql-test/suite/rpl/t/rpl_parallel_record_gtid_wakeup.test Test case 21: @mysql-test/suite/rpl/t/rpl_parallel_stop_on_con_kill.test Test case 22: @mysql-test/suite/rpl/t/rpl_parallel_rollback_assert.test
158 lines
4.9 KiB
Text
158 lines
4.9 KiB
Text
# ==== Purpose ====
|
|
#
|
|
# This test is executed twice for each test case. Before every
|
|
# testcase it is run with mysqltest in record mode and will thus
|
|
# produce an output file that can be compared to output from after the
|
|
# tescase. In that way, it is possible to check that a testcase does
|
|
# not have any unwanted side affects.
|
|
|
|
--disable_query_log
|
|
|
|
# We want to ensure all slave configuration is restored. But SHOW
|
|
# SLAVE STATUS returns nothing for servers not configured as slaves,
|
|
# and (after BUG#28796 was fixed) there is no way to de-configure a
|
|
# slave. Hence, it's impossible to clean up the replication state at
|
|
# the end. But we want to check that the slave is stopped, there is
|
|
# no error, and a few other invariants. So we issue SHOW SLAVE
|
|
# STATUS, and if it returns no rows we fake the result.
|
|
--let $tmp= query_get_value(SHOW SLAVE STATUS, Slave_IO_Running, 1)
|
|
--let $tmp= `SELECT '$tmp' = 'No such row'`
|
|
if ($tmp)
|
|
{
|
|
# Note: after WL#5177, fields 13-18 shall not be filtered-out.
|
|
--echo Slave_IO_State
|
|
--echo Master_Host 127.0.0.1
|
|
--echo Master_User root
|
|
--echo Master_Port #
|
|
--echo Connect_Retry #
|
|
--echo Master_Log_File #
|
|
--echo Read_Master_Log_Pos #
|
|
--echo Relay_Log_File #
|
|
--echo Relay_Log_Pos #
|
|
--echo Relay_Master_Log_File #
|
|
--echo Slave_IO_Running No
|
|
--echo Slave_SQL_Running No
|
|
--echo Replicate_Do_DB #
|
|
--echo Replicate_Ignore_DB #
|
|
--echo Replicate_Do_Table #
|
|
--echo Replicate_Ignore_Table #
|
|
--echo Replicate_Wild_Do_Table #
|
|
--echo Replicate_Wild_Ignore_Table #
|
|
--echo Last_Errno 0
|
|
--echo Last_Error
|
|
--echo Skip_Counter 0
|
|
--echo Exec_Master_Log_Pos #
|
|
--echo Relay_Log_Space #
|
|
--echo Until_Condition #
|
|
--echo Until_Log_File #
|
|
--echo Until_Log_Pos #
|
|
--echo Master_SSL_Allowed No
|
|
--echo Master_SSL_CA_File
|
|
--echo Master_SSL_CA_Path
|
|
--echo Master_SSL_Cert
|
|
--echo Master_SSL_Cipher
|
|
--echo Master_SSL_Key
|
|
--echo Seconds_Behind_Master NULL
|
|
--echo Master_SSL_Verify_Server_Cert No
|
|
--echo Last_IO_Errno 0
|
|
--echo Last_IO_Error
|
|
--echo Last_SQL_Errno 0
|
|
--echo Last_SQL_Error
|
|
--echo Replicate_Ignore_Server_Ids
|
|
--echo Master_Server_Id #
|
|
--echo Master_SSL_Crl #
|
|
--echo Master_SSL_Crlpath #
|
|
--echo Using_Gtid No
|
|
--echo Gtid_IO_Pos #
|
|
--echo Replicate_Do_Domain_Ids
|
|
--echo Replicate_Ignore_Domain_Ids
|
|
--echo Parallel_Mode optimistic
|
|
--echo SQL_Delay 0
|
|
--echo SQL_Remaining_Delay NULL
|
|
--echo Slave_SQL_Running_State
|
|
--echo Slave_DDL_Groups #
|
|
--echo Slave_Non_Transactional_Groups #
|
|
--echo Slave_Transactional_Groups #
|
|
}
|
|
if (!$tmp) {
|
|
# Note: after WL#5177, fields 13-18 shall not be filtered-out.
|
|
--replace_column 4 # 5 # 6 # 7 # 8 # 9 # 10 # 13 # 14 # 15 # 16 # 17 # 18 # 22 # 23 # 24 # 25 # 26 # 40 # 41 # 42 # 44 # 51 # 52 # 53 #
|
|
query_vertical
|
|
SHOW SLAVE STATUS;
|
|
}
|
|
|
|
#
|
|
# Ensure that we don't get warnings from mysql.proc (used by check_mysqld)
|
|
#
|
|
|
|
--disable_query_log
|
|
--disable_warnings
|
|
--disable_result_log
|
|
select count(*) from mysql.proc;
|
|
--enable_result_log
|
|
--enable_warnings
|
|
--enable_query_log
|
|
|
|
call mtr.check_testcase();
|
|
|
|
let $datadir=`select @@datadir`;
|
|
list_files $datadir mysql_upgrade_info;
|
|
list_files_write_file $datadir.tempfiles.txt $datadir/test #sql*;
|
|
--replace_regex /#sql-ib[1-9][0-9]*\.ibd\n//
|
|
cat_file $datadir.tempfiles.txt;
|
|
remove_file $datadir.tempfiles.txt;
|
|
list_files $datadir/mysql #sql*;
|
|
|
|
#
|
|
# Check that SHOW ENGINE INNODB STATUS does not show any active transactions
|
|
# We do this only if wsrep provider is loaded, to avoid disturbing any non-Galera MTR tests
|
|
#
|
|
if (`SELECT COUNT(*)=1 FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME = 'wsrep' AND PLUGIN_STATUS='ACTIVE'`) {
|
|
if (`SELECT @@wsrep_on`) {
|
|
if (`SELECT COUNT(*) FROM information_schema.innodb_trx WHERE trx_mysql_thread_id != 0`) {
|
|
if ($before) {
|
|
--echo Before test start.
|
|
}
|
|
if (!$before) {
|
|
--echo After test end.
|
|
}
|
|
--echo There is one or more active InnoDB transaction(s) when there should be none. Dumping some diagnostics.
|
|
|
|
--let $status_locks = `SELECT @@innodb_status_output_locks`
|
|
--let $status_output = `SELECT @@innodb_status_output`
|
|
--enable_query_log
|
|
SET GLOBAL innodb_status_output_locks=ON;
|
|
SHOW ENGINE INNODB STATUS;
|
|
--disable_query_log
|
|
--eval SET GLOBAL innodb_status_output_locks=$status_locks;
|
|
--eval SET GLOBAL innodb_status_output=$status_output;
|
|
--enable_query_log
|
|
|
|
--vertical_results
|
|
if ($before) {
|
|
--replace_regex /$/ /
|
|
}
|
|
SELECT * FROM information_schema.processlist;
|
|
|
|
if ($before) {
|
|
--replace_regex /$/ /
|
|
}
|
|
SELECT * FROM information_schema.innodb_trx;
|
|
|
|
if ($before) {
|
|
--replace_regex /$/ /
|
|
}
|
|
SELECT * FROM information_schema.innodb_locks;
|
|
|
|
if ($before) {
|
|
--replace_regex /$/ /
|
|
}
|
|
SELECT * FROM information_schema.innodb_lock_waits;
|
|
--horizontal_results
|
|
--disable_query_log
|
|
}
|
|
}
|
|
}
|
|
|
|
--enable_query_log
|
|
|