1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

MDEV-21360 global debug_dbug pre-test value restoration issues

This commit is contained in:
Alice Sherepa
2020-01-09 13:38:48 +01:00
parent 451573fab1
commit b7fb30e930
171 changed files with 564 additions and 564 deletions

View File

@@ -7,7 +7,7 @@ create table t1 (a int);
--sync_slave_with_master
connection slave;
set @saved_dbug = @@global.debug_dbug;
SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug='d,rows_log_event_before_open_table';
connection master;
@@ -23,7 +23,7 @@ set debug_sync='now SIGNAL go_ahead_sql';
--source include/wait_for_slave_sql_error.inc
let $error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
--echo Last_SQL_Error = $error
set @@global.debug_dbug = @saved_dbug;
SET @@GLOBAL.debug_dbug = @saved_dbug;
set debug_sync='RESET';
connection master;
drop table t1;

View File

@@ -15,7 +15,7 @@ call mtr.add_suppression("Slave SQL.*Failed during slave thread initialization.*
reset slave;
# Set debug flags on slave to force errors to occur
set @saved_dbug = @@global.debug_dbug;
SET @saved_dbug = @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug="d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init";
--disable_query_log
@@ -40,7 +40,7 @@ start slave;
#
# Cleanup
#
set @@global.debug_dbug = @saved_dbug;
SET @@GLOBAL.debug_dbug = @saved_dbug;
# Clear Last_SQL_Error
RESET SLAVE;

View File

@@ -15,7 +15,7 @@ source include/master-slave.inc;
connection slave;
stop slave;
set @saved_dbug = @@global.debug_dbug;
SET @saved_dbug = @@GLOBAL.debug_dbug;
SET @@debug_dbug="d,simulate_find_log_pos_error";
--error ER_UNKNOWN_TARGET_BINLOG
@@ -36,7 +36,7 @@ reset slave;
change master to master_host='dummy';
connection master;
set @saved_dbug_m = @@global.debug_dbug;
SET @saved_dbug_m = @@global.debug_dbug;
SET @@debug_dbug="d,simulate_find_log_pos_error";
--error ER_UNKNOWN_TARGET_BINLOG
reset master;
@@ -59,7 +59,7 @@ connection slave;
call mtr.add_suppression("Failed to locate old binlog or relay log files");
call mtr.add_suppression("MYSQL_BIN_LOG::purge_logs was called with file ..master-bin.000001 not listed in the index");
--enable_query_log
set @@global.debug_dbug = @saved_dbug;
SET @@GLOBAL.debug_dbug = @saved_dbug;
--echo ==== clean up ====
CHANGE MASTER TO MASTER_HOST = '127.0.0.1';

View File

@@ -26,7 +26,7 @@ call mtr.add_suppression("Fatal error: The slave I/O thread stops because master
call mtr.add_suppression("Slave I/O thread .* register on master");
#Test case 1: Try to get the value of the UNIX_TIMESTAMP from master under network disconnection
set @saved_dbug = @@global.debug_dbug;
SET @saved_dbug = @@GLOBAL.debug_dbug;
# set up two parameters to pass into extra/rpl_tests/rpl_get_master_version_and_clock
let $dbug_sync_point= 'debug_lock.before_get_UNIX_TIMESTAMP';
@@ -42,7 +42,7 @@ source extra/rpl_tests/rpl_get_master_version_and_clock.test;
# cleanup
set @@global.debug_dbug = @saved_dbug;
SET @@GLOBAL.debug_dbug = @saved_dbug;
# is not really necessary but avoids mtr post-run env check warnings
SET DEBUG_SYNC= 'RESET';

View File

@@ -17,7 +17,7 @@
--let $rpl_server_number= 1
--source include/rpl_restart_server.inc
set @saved_dbug = @@session.debug_dbug;
SET @saved_dbug = @@SESSION.debug_dbug;
SET @@debug_dbug="d,simulate_big_table_id";
CREATE TABLE t (a int);
@@ -52,7 +52,7 @@ if (`SELECT sum(a) != 6 FROM t`)
--connection master
DROP TABLE t;
set debug_dbug= @saved_dbug;
SET debug_dbug= @saved_dbug;
--sync_slave_with_master
--source include/rpl_end.inc

View File

@@ -9,7 +9,7 @@
# - setup log_warnings and debug
--connection slave
--source include/stop_slave.inc
set @saved_dbug = @@global.debug_dbug;
SET @saved_dbug = @@GLOBAL.debug_dbug;
--let $log_warnings_save= `SELECT @@GLOBAL.log_warnings`
SET GLOBAL log_warnings = 2;
@@ -55,7 +55,7 @@ EOF
# cleanup
--source include/stop_slave.inc
set @@global.debug_dbug = @saved_dbug;
SET @@GLOBAL.debug_dbug = @saved_dbug;
--eval SET GLOBAL log_warnings = $log_warnings_save
--source include/start_slave.inc

View File

@@ -47,7 +47,7 @@ sync_slave_with_master;
connection slave;
ANALYZE TABLE t2;
--echo # Slave will crash if using the wrong or no index
set @saved_dbug = @@global.debug_dbug;
SET @saved_dbug = @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug="+d,slave_crash_if_wrong_index,slave_crash_if_table_scan";
connection master;
@@ -239,5 +239,5 @@ connection master;
DROP TABLE t1;
sync_slave_with_master;
connection slave;
set @@global.debug_dbug = @saved_dbug;
SET @@GLOBAL.debug_dbug = @saved_dbug;
--source include/rpl_end.inc

View File

@@ -33,7 +33,7 @@ source include/start_slave.inc;
CREATE TABLE t1 (a INT) ENGINE=innodb;
# Make the following events as if they offset over 2GB from the beginning of binlog
set @saved_dbug = @@global.debug_dbug;
SET @saved_dbug = @@GLOBAL.debug_dbug;
SET @@GLOBAL.debug_dbug="d,dbug_master_binlog_over_2GB";
SET @@SESSION.skip_replication=1;
INSERT INTO t1 SET a=1;
@@ -51,7 +51,7 @@ FLUSH LOGS;
# Clean up
#
--connection master
set @@global.debug_dbug = @saved_dbug;
SET @@GLOBAL.debug_dbug = @saved_dbug;
--eval SET @@GLOBAL.rpl_semi_sync_master_timeout = $sav_timeout_master
--eval SET @@GLOBAL.rpl_semi_sync_master_enabled = $sav_enabled_master

View File

@@ -11,7 +11,7 @@ connection slave;
SET DEBUG_SYNC= 'RESET';
source include/stop_slave.inc;
set @saved_dbug = @@global.debug_dbug;
SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= 'd,dbug.before_get_running_status_yes'; # to block due-started IO
# Test 1. Slave is stopped
@@ -77,7 +77,7 @@ echo Slave_SQL_Running= $status;
connection slave;
set @@global.debug_dbug = @saved_dbug;
SET @@GLOBAL.debug_dbug = @saved_dbug;
SET DEBUG_SYNC= 'RESET';
--echo End of tests
--source include/rpl_end.inc

View File

@@ -29,7 +29,7 @@
##########################################################################
connection slave;
set @saved_dbug = @@global.debug_dbug;
SET @saved_dbug = @@GLOBAL.debug_dbug;
SET @@global.debug_dbug= '+d,remove_slave_load_file_before_write';
connection master;
@@ -74,7 +74,7 @@ call mtr.add_suppression("Slave: File.* not found.*");
call mtr.add_suppression("Slave SQL: Error .File.* not found.* error.* 29");
--let $rpl_only_running_threads= 1
set @@global.debug_dbug = @saved_dbug;
SET @@GLOBAL.debug_dbug = @saved_dbug;
--source include/rpl_end.inc

View File

@@ -22,7 +22,7 @@ source include/stop_slave.inc;
--echo # Suspend the INSERT statement in current transaction on SQL thread.
--echo # It guarantees that SQL thread is applying the transaction when
--echo # STOP SLAVE command launchs.
set @saved_dbug = @@global.debug_dbug;
SET @saved_dbug = @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug= '+d,after_mysql_insert,*';
source include/start_slave.inc;
@@ -44,7 +44,7 @@ source extra/rpl_tests/rpl_stop_slave.test;
--echo
--echo # Test end
set @@global.debug_dbug = @saved_dbug;
SET @@GLOBAL.debug_dbug = @saved_dbug;
source include/restart_slave_sql.inc;
connection slave;
@@ -77,7 +77,7 @@ connection master;
# make sure that there are no zombie threads
--source include/stop_dump_threads.inc
set @saved_dbug = @@global.debug_dbug;
SET @saved_dbug = @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug= '+d,dump_thread_wait_before_send_xid,*';
connection slave;
@@ -124,7 +124,7 @@ reap;
# sure that we disable the DBUG_EXECUTE_IF
# that would set the dump thread to wait
connection master;
set @@global.debug_dbug = @saved_dbug;
SET @@GLOBAL.debug_dbug = @saved_dbug;
# make sure that there are no zombie threads
--source include/stop_dump_threads.inc

View File

@@ -18,7 +18,7 @@ sync_slave_with_master;
# view already has to be on slave
show tables;
connection master;
set @saved_dbug = @@session.debug_dbug;
SET @saved_dbug = @@SESSION.debug_dbug;
set @@debug_dbug="d,simulate_register_view_failure";
--error ER_OUT_OF_RESOURCES
@@ -31,5 +31,5 @@ show tables;
connection master;
DROP VIEW IF EXISTS v1;
DROP TABLE t1;
set debug_dbug= @saved_dbug;
SET debug_dbug= @saved_dbug;
--source include/rpl_end.inc