diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2023-02-06 20:18:44 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2023-02-06 20:18:44 +0100 |
commit | 70a515df434a57709eaf69f451c22739d7908ba4 (patch) | |
tree | 04630c357d661ceeacf991523c6d329736fa4441 /mysql-test | |
parent | 4c79e15cc3716f69c044d4287ad2160da8101cdc (diff) | |
parent | 80ae69c8bc948382920b083ba203369e941cc90e (diff) | |
download | mariadb-git-70a515df434a57709eaf69f451c22739d7908ba4.tar.gz |
Merge branch '10.6.12' into 10.6
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/main/debug_sync.result | 59 | ||||
-rw-r--r-- | mysql-test/main/debug_sync.test | 30 | ||||
-rwxr-xr-x | mysql-test/mariadb-test-run.pl | 25 | ||||
-rw-r--r-- | mysql-test/suite/innodb/r/mdev-14846.result | 3 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/mdev-14846.test | 3 | ||||
-rw-r--r-- | mysql-test/suite/stress/r/deadlock_drop_table.result | 3 | ||||
-rw-r--r-- | mysql-test/suite/stress/t/deadlock_drop_table.test | 7 | ||||
-rw-r--r-- | mysql-test/suite/sys_vars/r/debug_sync_basic.result | 6 | ||||
-rw-r--r-- | mysql-test/suite/sys_vars/r/sysvars_debug.result | 2 |
9 files changed, 94 insertions, 44 deletions
diff --git a/mysql-test/main/debug_sync.result b/mysql-test/main/debug_sync.result index bb9ae1a417d..4c1711a6d6b 100644 --- a/mysql-test/main/debug_sync.result +++ b/mysql-test/main/debug_sync.result @@ -2,7 +2,7 @@ SET DEBUG_SYNC= 'RESET'; DROP TABLE IF EXISTS t1; SHOW VARIABLES LIKE 'DEBUG_SYNC'; Variable_name Value -debug_sync ON - current signal: '' +debug_sync ON - current signals: '' SET DEBUG_SYNC='p0 SIGNAL s1 WAIT_FOR s2 TIMEOUT 6 EXECUTE 2 HIT_LIMIT 3'; SET DEBUG_SYNC='p0 SIGNAL s1 WAIT_FOR s2 TIMEOUT 6 EXECUTE 2'; SET DEBUG_SYNC='p0 SIGNAL s1 WAIT_FOR s2 TIMEOUT 6 HIT_LIMIT 3'; @@ -150,34 +150,34 @@ SET @myvar= 'now SIGNAL from_myvar'; SET DEBUG_SYNC= @myvar; SHOW VARIABLES LIKE 'DEBUG_SYNC'; Variable_name Value -debug_sync ON - current signal: 'from_myvar' +debug_sync ON - current signals: 'from_myvar' SET DEBUG_SYNC= LEFT('now SIGNAL from_function_cut_here', 24); SHOW VARIABLES LIKE 'DEBUG_SYNC'; Variable_name Value -debug_sync ON - current signal: 'from_function' +debug_sync ON - current signals: 'from_myvar,from_function' SET DEBUG_SYNC= 'now SIGNAL something'; SHOW VARIABLES LIKE 'DEBUG_SYNC'; Variable_name Value -debug_sync ON - current signal: 'something' +debug_sync ON - current signals: 'something,from_function,from_myvar' SET DEBUG_SYNC= 'now WAIT_FOR nothing TIMEOUT 0'; Warnings: Warning #### debug sync point wait timed out SET DEBUG_SYNC= 'now SIGNAL nothing'; SHOW VARIABLES LIKE 'DEBUG_SYNC'; Variable_name Value -debug_sync ON - current signal: 'nothing' +debug_sync ON - current signals: 'something,from_function,nothing,from_myvar' SET DEBUG_SYNC= 'now WAIT_FOR nothing TIMEOUT 0'; SET DEBUG_SYNC= 'now SIGNAL something EXECUTE 0'; SHOW VARIABLES LIKE 'DEBUG_SYNC'; Variable_name Value -debug_sync ON - current signal: 'nothing' +debug_sync ON - current signals: 'something,from_function,from_myvar' SET DEBUG_SYNC= 'now WAIT_FOR anotherthing TIMEOUT 0 EXECUTE 0'; SET DEBUG_SYNC= 'now HIT_LIMIT 1'; ERROR HY000: debug sync point hit limit reached SET DEBUG_SYNC= 'RESET'; SHOW VARIABLES LIKE 'DEBUG_SYNC'; Variable_name Value -debug_sync ON - current signal: '' +debug_sync ON - current signals: '' SET DEBUG_SYNC= 'p1abcd SIGNAL s1 EXECUTE 2'; SET DEBUG_SYNC= 'p2abc SIGNAL s2 EXECUTE 2'; SET DEBUG_SYNC= 'p9abcdef SIGNAL s9 EXECUTE 2'; @@ -190,23 +190,30 @@ SET DEBUG_SYNC= 'p3abcdef SIGNAL s3 EXECUTE 2'; SET DEBUG_SYNC= 'p4a TEST'; SHOW VARIABLES LIKE 'DEBUG_SYNC'; Variable_name Value -debug_sync ON - current signal: 's4' +debug_sync ON - current signals: 's4' SET DEBUG_SYNC= 'p1abcd TEST'; SHOW VARIABLES LIKE 'DEBUG_SYNC'; Variable_name Value -debug_sync ON - current signal: 's1' +debug_sync ON - current signals: 's4,s1' SET DEBUG_SYNC= 'p7 TEST'; SHOW VARIABLES LIKE 'DEBUG_SYNC'; Variable_name Value -debug_sync ON - current signal: 's7' +debug_sync ON - current signals: 's1,s7,s4' SET DEBUG_SYNC= 'p9abcdef TEST'; SHOW VARIABLES LIKE 'DEBUG_SYNC'; Variable_name Value -debug_sync ON - current signal: 's9' +debug_sync ON - current signals: 's1,s7,s4,s9' SET DEBUG_SYNC= 'p3abcdef TEST'; SHOW VARIABLES LIKE 'DEBUG_SYNC'; Variable_name Value -debug_sync ON - current signal: 's3' +debug_sync ON - current signals: 's1,s3,s4,s9,s7' +SET DEBUG_SYNC= 'now WAIT_FOR s9'; +SET DEBUG_SYNC= 'now WAIT_FOR s1'; +SET DEBUG_SYNC= 'now WAIT_FOR s4'; +SET DEBUG_SYNC= 'now WAIT_FOR s7'; +SHOW VARIABLES LIKE 'DEBUG_SYNC'; +Variable_name Value +debug_sync ON - current signals: 's3' SET DEBUG_SYNC= 'p1abcd CLEAR'; SET DEBUG_SYNC= 'p2abc CLEAR'; SET DEBUG_SYNC= 'p5abcde CLEAR'; @@ -219,19 +226,19 @@ SET DEBUG_SYNC= 'p7 CLEAR'; SET DEBUG_SYNC= 'p1abcd TEST'; SHOW VARIABLES LIKE 'DEBUG_SYNC'; Variable_name Value -debug_sync ON - current signal: 's3' +debug_sync ON - current signals: 's3' SET DEBUG_SYNC= 'p7 TEST'; SHOW VARIABLES LIKE 'DEBUG_SYNC'; Variable_name Value -debug_sync ON - current signal: 's3' +debug_sync ON - current signals: 's3' SET DEBUG_SYNC= 'p9abcdef TEST'; SHOW VARIABLES LIKE 'DEBUG_SYNC'; Variable_name Value -debug_sync ON - current signal: 's3' +debug_sync ON - current signals: 's3' SET DEBUG_SYNC= 'RESET'; SHOW VARIABLES LIKE 'DEBUG_SYNC'; Variable_name Value -debug_sync ON - current signal: '' +debug_sync ON - current signals: '' CREATE USER mysqltest_1@localhost; GRANT SUPER ON *.* TO mysqltest_1@localhost; connect con1,localhost,mysqltest_1,,; @@ -292,4 +299,24 @@ disconnect con1; disconnect con2; connection default; DROP TABLE t1; +# +# Test NO_CLEAR_EVENT flag. The signal should still be visible after +# the wait has completed succesfully. +# +SET DEBUG_SYNC= 'now SIGNAL s1'; +SHOW VARIABLES LIKE 'DEBUG_SYNC'; +Variable_name Value +debug_sync ON - current signals: 's1' +SET DEBUG_SYNC= 'now WAIT_FOR s1 NO_CLEAR_EVENT'; +SHOW VARIABLES LIKE 'DEBUG_SYNC'; +Variable_name Value +debug_sync ON - current signals: 's1' +SET DEBUG_SYNC= 'now WAIT_FOR s1'; +SHOW VARIABLES LIKE 'DEBUG_SYNC'; +Variable_name Value +debug_sync ON - current signals: '' +SET DEBUG_SYNC= 'now SIGNAL s1,s2,s5,s7'; +SHOW VARIABLES LIKE 'DEBUG_SYNC'; +Variable_name Value +debug_sync ON - current signals: 's2,s7,s1,s5' SET DEBUG_SYNC= 'RESET'; diff --git a/mysql-test/main/debug_sync.test b/mysql-test/main/debug_sync.test index 89414939f59..1dc3dc9c71e 100644 --- a/mysql-test/main/debug_sync.test +++ b/mysql-test/main/debug_sync.test @@ -298,6 +298,16 @@ SET DEBUG_SYNC= 'p9abcdef TEST'; SHOW VARIABLES LIKE 'DEBUG_SYNC'; SET DEBUG_SYNC= 'p3abcdef TEST'; SHOW VARIABLES LIKE 'DEBUG_SYNC'; + +# +# Wait for all signals currently active except s3. +# +SET DEBUG_SYNC= 'now WAIT_FOR s9'; +SET DEBUG_SYNC= 'now WAIT_FOR s1'; +SET DEBUG_SYNC= 'now WAIT_FOR s4'; +SET DEBUG_SYNC= 'now WAIT_FOR s7'; +SHOW VARIABLES LIKE 'DEBUG_SYNC'; + # # Clear the actions. # @@ -320,7 +330,7 @@ SHOW VARIABLES LIKE 'DEBUG_SYNC'; SET DEBUG_SYNC= 'p9abcdef TEST'; SHOW VARIABLES LIKE 'DEBUG_SYNC'; # -# Now cleanup. Actions are clear already, but signal needs to be cleared. +# Now cleanup. Actions are clear already, but s3 signal needs to be cleared. # SET DEBUG_SYNC= 'RESET'; SHOW VARIABLES LIKE 'DEBUG_SYNC'; @@ -418,10 +428,24 @@ disconnect con2; connection default; DROP TABLE t1; +--echo # +--echo # Test NO_CLEAR_EVENT flag. The signal should still be visible after +--echo # the wait has completed succesfully. +--echo # +SET DEBUG_SYNC= 'now SIGNAL s1'; +SHOW VARIABLES LIKE 'DEBUG_SYNC'; +SET DEBUG_SYNC= 'now WAIT_FOR s1 NO_CLEAR_EVENT'; +SHOW VARIABLES LIKE 'DEBUG_SYNC'; +SET DEBUG_SYNC= 'now WAIT_FOR s1'; +SHOW VARIABLES LIKE 'DEBUG_SYNC'; + +SET DEBUG_SYNC= 'now SIGNAL s1,s2,s5,s7'; +SHOW VARIABLES LIKE 'DEBUG_SYNC'; + + # # Cleanup after test case. -# Otherwise signal would contain 'flushed' here, -# which could confuse the next test. +# Otherwise signal would confuse the next test. # SET DEBUG_SYNC= 'RESET'; diff --git a/mysql-test/mariadb-test-run.pl b/mysql-test/mariadb-test-run.pl index 46a51d2fa58..670f63a990f 100755 --- a/mysql-test/mariadb-test-run.pl +++ b/mysql-test/mariadb-test-run.pl @@ -145,6 +145,7 @@ my $opt_start_exit; my $start_only; my $file_wsrep_provider; my $num_saved_cores= 0; # Number of core files saved in vardir/log/ so far. +my $test_name_for_report; our @global_suppressions; @@ -515,13 +516,13 @@ sub main { } if ( not @$completed ) { - my $test_name= mtr_grab_file($path_testlog); - $test_name =~ s/^CURRENT_TEST:\s//; - chomp($test_name); - my $tinfo = My::Test->new(name => $test_name); - $tinfo->{result}= 'MTR_RES_FAILED'; - $tinfo->{comment}=' '; - mtr_report_test($tinfo); + if ($test_name_for_report) + { + my $tinfo = My::Test->new(name => $test_name_for_report); + $tinfo->{result}= 'MTR_RES_FAILED'; + $tinfo->{comment}=' '; + mtr_report_test($tinfo); + } mtr_error("Test suite aborted"); } @@ -3740,8 +3741,8 @@ sub resfile_report_test ($) { sub run_testcase ($$) { my ($tinfo, $server_socket)= @_; my $print_freq=20; - - mtr_verbose("Running test:", $tinfo->{name}); + $test_name_for_report= $tinfo->{name}; + mtr_verbose("Running test:", $test_name_for_report); $ENV{'MTR_TEST_NAME'} = $tinfo->{name}; resfile_report_test($tinfo) if $opt_resfile; @@ -5130,12 +5131,10 @@ sub mysqld_start ($$) { if (!$rc) { # Report failure about the last test case before exit - my $test_name= mtr_grab_file($path_current_testlog); - $test_name =~ s/^CURRENT_TEST:\s//; - my $tinfo = My::Test->new(name => $test_name); + my $tinfo = My::Test->new(name => $test_name_for_report); $tinfo->{result}= 'MTR_RES_FAILED'; $tinfo->{failures}= 1; - $tinfo->{logfile}=get_log_from_proc($mysqld->{'proc'}, $tinfo->{name}); + $tinfo->{logfile}=get_log_from_proc($mysqld->{'proc'}, $test_name_for_report); report_option('verbose', 1); mtr_report_test($tinfo); } diff --git a/mysql-test/suite/innodb/r/mdev-14846.result b/mysql-test/suite/innodb/r/mdev-14846.result index 219bd718feb..a1ccfb6bb4d 100644 --- a/mysql-test/suite/innodb/r/mdev-14846.result +++ b/mysql-test/suite/innodb/r/mdev-14846.result @@ -31,11 +31,12 @@ pk f1 f2 f3 3 t q 1 5 z t NULL SET DEBUG_SYNC='now SIGNAL default_dml'; +SET DEBUG_SYNC='now SIGNAL con2_dml'; connection default; SET DEBUG_SYNC='now WAIT_FOR default_dml'; UPDATE t3 AS alias1 LEFT JOIN t3 AS alias2 ON ( alias1.f1 <> alias1.f2 ) SET alias1.f3 = 59 WHERE ( EXISTS ( SELECT t1.f3 FROM t1 WHERE t1.f1 = alias1.f1 ) ) OR alias2.f1 = 'h'; connect con2,localhost,root,,test; -set debug_sync='now WAIT_FOR default_dml'; +set debug_sync='now WAIT_FOR con2_dml'; SET DEBUG_SYNC='now SIGNAL con1_dml2'; disconnect con2; connection con1; diff --git a/mysql-test/suite/innodb/t/mdev-14846.test b/mysql-test/suite/innodb/t/mdev-14846.test index adcefecd52f..b1f32302591 100644 --- a/mysql-test/suite/innodb/t/mdev-14846.test +++ b/mysql-test/suite/innodb/t/mdev-14846.test @@ -35,6 +35,7 @@ SET DEBUG_SYNC='now WAIT_FOR con1_dml'; begin; SELECT * FROM t1 for update; # Holds x lock of all records in the table t1 SET DEBUG_SYNC='now SIGNAL default_dml'; +SET DEBUG_SYNC='now SIGNAL con2_dml'; --connection default SET DEBUG_SYNC='now WAIT_FOR default_dml'; @@ -42,7 +43,7 @@ SET DEBUG_SYNC='now WAIT_FOR default_dml'; # It holds the lock of all record in t3 and tries to acquire record lock for the table t1. --connect (con2,localhost,root,,test) -set debug_sync='now WAIT_FOR default_dml'; +set debug_sync='now WAIT_FOR con2_dml'; let $wait_condition= select count(*) > 0 from information_schema.innodb_lock_waits; --source include/wait_condition.inc diff --git a/mysql-test/suite/stress/r/deadlock_drop_table.result b/mysql-test/suite/stress/r/deadlock_drop_table.result index 326f694e8d9..7e549157c81 100644 --- a/mysql-test/suite/stress/r/deadlock_drop_table.result +++ b/mysql-test/suite/stress/r/deadlock_drop_table.result @@ -19,11 +19,12 @@ a b c 1 NULL NULL set debug_sync='now SIGNAL go'; set debug_sync='now WAIT_FOR parked2'; -set debug_sync='before_wait_for_refs SIGNAL waiting WAIT_FOR go2'; +set debug_sync='before_wait_for_refs SIGNAL waiting WAIT_FOR go3'; drop table t1;; connection con2; set debug_sync='now WAIT_FOR waiting'; set debug_sync='now SIGNAL go2'; +set debug_sync='now SIGNAL go3'; connection default; connection con1; connection default; diff --git a/mysql-test/suite/stress/t/deadlock_drop_table.test b/mysql-test/suite/stress/t/deadlock_drop_table.test index 0ec19f87389..b4f8f2201e0 100644 --- a/mysql-test/suite/stress/t/deadlock_drop_table.test +++ b/mysql-test/suite/stress/t/deadlock_drop_table.test @@ -20,15 +20,12 @@ set debug_sync='now WAIT_FOR parked'; select * from t1; set debug_sync='now SIGNAL go'; set debug_sync='now WAIT_FOR parked2'; -set debug_sync='before_wait_for_refs SIGNAL waiting WAIT_FOR go2'; +set debug_sync='before_wait_for_refs SIGNAL waiting WAIT_FOR go3'; --send drop table t1; --connection con2 set debug_sync='now WAIT_FOR waiting'; set debug_sync='now SIGNAL go2'; - -# Write out show processlist if the debug sync point times out -let $wait_condition= select count(*)=0 from information_schema.processlist where state like "%debug%"; -source include/wait_condition.inc; +set debug_sync='now SIGNAL go3'; --connection default --reap diff --git a/mysql-test/suite/sys_vars/r/debug_sync_basic.result b/mysql-test/suite/sys_vars/r/debug_sync_basic.result index 6ebb46dd662..11506cac2c2 100644 --- a/mysql-test/suite/sys_vars/r/debug_sync_basic.result +++ b/mysql-test/suite/sys_vars/r/debug_sync_basic.result @@ -2,17 +2,17 @@ select @@global.debug_sync; ERROR HY000: Variable 'debug_sync' is a SESSION variable select @@session.debug_sync; @@session.debug_sync -ON - current signal: '' +ON - current signals: '' show global variables like "debug_sync"; Variable_name Value show session variables like "debug_sync"; Variable_name Value -debug_sync ON - current signal: '' +debug_sync ON - current signals: '' select * from information_schema.global_variables where variable_name="debug_sync"; VARIABLE_NAME VARIABLE_VALUE select * from information_schema.session_variables where variable_name="debug_sync"; VARIABLE_NAME VARIABLE_VALUE -DEBUG_SYNC ON - current signal: '' +DEBUG_SYNC ON - current signals: '' set @@session.debug_sync=1; ERROR 42000: Incorrect argument type to variable 'debug_sync' set @@session.debug_sync=1.1; diff --git a/mysql-test/suite/sys_vars/r/sysvars_debug.result b/mysql-test/suite/sys_vars/r/sysvars_debug.result index 0d77b0211a1..fc04ac83210 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_debug.result +++ b/mysql-test/suite/sys_vars/r/sysvars_debug.result @@ -77,7 +77,7 @@ READ_ONLY YES COMMAND_LINE_ARGUMENT OPTIONAL GLOBAL_VALUE_PATH NULL VARIABLE_NAME DEBUG_SYNC -SESSION_VALUE ON - current signal: '' +SESSION_VALUE ON - current signals: '' GLOBAL_VALUE NULL GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE |