Skip to content

Commit 70a515d

Browse files
committed
Merge branch '10.6.12' into 10.6
2 parents 4c79e15 + 80ae69c commit 70a515d

17 files changed

+325
-102
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
MYSQL_VERSION_MAJOR=10
22
MYSQL_VERSION_MINOR=6
3-
MYSQL_VERSION_PATCH=12
3+
MYSQL_VERSION_PATCH=13
44
SERVER_MATURITY=stable

dbug/dbug.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
#include <m_string.h>
8787
#include <errno.h>
8888
#ifdef HAVE_gcov
89-
extern void __gcov_flush();
89+
#include <gcov.h>
9090
#endif
9191

9292
#ifndef DBUG_OFF
@@ -2212,7 +2212,7 @@ void _db_suicide_()
22122212
fprintf(stderr, "SIGKILL myself\n");
22132213
fflush(stderr);
22142214
#ifdef HAVE_gcov
2215-
__gcov_flush();
2215+
__gcov_dump();
22162216
#endif
22172217

22182218
retval= kill(getpid(), SIGKILL);
@@ -2262,7 +2262,7 @@ my_bool _db_my_assert(const char *file, int line, const char *msg)
22622262
fprintf(stderr, "%s:%d: assert: %s\n", file, line, msg);
22632263
fflush(stderr);
22642264
#ifdef HAVE_gcov
2265-
__gcov_flush();
2265+
__gcov_dump();
22662266
#endif
22672267
}
22682268
return a;

mysql-test/main/debug_sync.result

Lines changed: 43 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ SET DEBUG_SYNC= 'RESET';
22
DROP TABLE IF EXISTS t1;
33
SHOW VARIABLES LIKE 'DEBUG_SYNC';
44
Variable_name Value
5-
debug_sync ON - current signal: ''
5+
debug_sync ON - current signals: ''
66
SET DEBUG_SYNC='p0 SIGNAL s1 WAIT_FOR s2 TIMEOUT 6 EXECUTE 2 HIT_LIMIT 3';
77
SET DEBUG_SYNC='p0 SIGNAL s1 WAIT_FOR s2 TIMEOUT 6 EXECUTE 2';
88
SET DEBUG_SYNC='p0 SIGNAL s1 WAIT_FOR s2 TIMEOUT 6 HIT_LIMIT 3';
@@ -150,34 +150,34 @@ SET @myvar= 'now SIGNAL from_myvar';
150150
SET DEBUG_SYNC= @myvar;
151151
SHOW VARIABLES LIKE 'DEBUG_SYNC';
152152
Variable_name Value
153-
debug_sync ON - current signal: 'from_myvar'
153+
debug_sync ON - current signals: 'from_myvar'
154154
SET DEBUG_SYNC= LEFT('now SIGNAL from_function_cut_here', 24);
155155
SHOW VARIABLES LIKE 'DEBUG_SYNC';
156156
Variable_name Value
157-
debug_sync ON - current signal: 'from_function'
157+
debug_sync ON - current signals: 'from_myvar,from_function'
158158
SET DEBUG_SYNC= 'now SIGNAL something';
159159
SHOW VARIABLES LIKE 'DEBUG_SYNC';
160160
Variable_name Value
161-
debug_sync ON - current signal: 'something'
161+
debug_sync ON - current signals: 'something,from_function,from_myvar'
162162
SET DEBUG_SYNC= 'now WAIT_FOR nothing TIMEOUT 0';
163163
Warnings:
164164
Warning #### debug sync point wait timed out
165165
SET DEBUG_SYNC= 'now SIGNAL nothing';
166166
SHOW VARIABLES LIKE 'DEBUG_SYNC';
167167
Variable_name Value
168-
debug_sync ON - current signal: 'nothing'
168+
debug_sync ON - current signals: 'something,from_function,nothing,from_myvar'
169169
SET DEBUG_SYNC= 'now WAIT_FOR nothing TIMEOUT 0';
170170
SET DEBUG_SYNC= 'now SIGNAL something EXECUTE 0';
171171
SHOW VARIABLES LIKE 'DEBUG_SYNC';
172172
Variable_name Value
173-
debug_sync ON - current signal: 'nothing'
173+
debug_sync ON - current signals: 'something,from_function,from_myvar'
174174
SET DEBUG_SYNC= 'now WAIT_FOR anotherthing TIMEOUT 0 EXECUTE 0';
175175
SET DEBUG_SYNC= 'now HIT_LIMIT 1';
176176
ERROR HY000: debug sync point hit limit reached
177177
SET DEBUG_SYNC= 'RESET';
178178
SHOW VARIABLES LIKE 'DEBUG_SYNC';
179179
Variable_name Value
180-
debug_sync ON - current signal: ''
180+
debug_sync ON - current signals: ''
181181
SET DEBUG_SYNC= 'p1abcd SIGNAL s1 EXECUTE 2';
182182
SET DEBUG_SYNC= 'p2abc SIGNAL s2 EXECUTE 2';
183183
SET DEBUG_SYNC= 'p9abcdef SIGNAL s9 EXECUTE 2';
@@ -190,23 +190,30 @@ SET DEBUG_SYNC= 'p3abcdef SIGNAL s3 EXECUTE 2';
190190
SET DEBUG_SYNC= 'p4a TEST';
191191
SHOW VARIABLES LIKE 'DEBUG_SYNC';
192192
Variable_name Value
193-
debug_sync ON - current signal: 's4'
193+
debug_sync ON - current signals: 's4'
194194
SET DEBUG_SYNC= 'p1abcd TEST';
195195
SHOW VARIABLES LIKE 'DEBUG_SYNC';
196196
Variable_name Value
197-
debug_sync ON - current signal: 's1'
197+
debug_sync ON - current signals: 's4,s1'
198198
SET DEBUG_SYNC= 'p7 TEST';
199199
SHOW VARIABLES LIKE 'DEBUG_SYNC';
200200
Variable_name Value
201-
debug_sync ON - current signal: 's7'
201+
debug_sync ON - current signals: 's1,s7,s4'
202202
SET DEBUG_SYNC= 'p9abcdef TEST';
203203
SHOW VARIABLES LIKE 'DEBUG_SYNC';
204204
Variable_name Value
205-
debug_sync ON - current signal: 's9'
205+
debug_sync ON - current signals: 's1,s7,s4,s9'
206206
SET DEBUG_SYNC= 'p3abcdef TEST';
207207
SHOW VARIABLES LIKE 'DEBUG_SYNC';
208208
Variable_name Value
209-
debug_sync ON - current signal: 's3'
209+
debug_sync ON - current signals: 's1,s3,s4,s9,s7'
210+
SET DEBUG_SYNC= 'now WAIT_FOR s9';
211+
SET DEBUG_SYNC= 'now WAIT_FOR s1';
212+
SET DEBUG_SYNC= 'now WAIT_FOR s4';
213+
SET DEBUG_SYNC= 'now WAIT_FOR s7';
214+
SHOW VARIABLES LIKE 'DEBUG_SYNC';
215+
Variable_name Value
216+
debug_sync ON - current signals: 's3'
210217
SET DEBUG_SYNC= 'p1abcd CLEAR';
211218
SET DEBUG_SYNC= 'p2abc CLEAR';
212219
SET DEBUG_SYNC= 'p5abcde CLEAR';
@@ -219,19 +226,19 @@ SET DEBUG_SYNC= 'p7 CLEAR';
219226
SET DEBUG_SYNC= 'p1abcd TEST';
220227
SHOW VARIABLES LIKE 'DEBUG_SYNC';
221228
Variable_name Value
222-
debug_sync ON - current signal: 's3'
229+
debug_sync ON - current signals: 's3'
223230
SET DEBUG_SYNC= 'p7 TEST';
224231
SHOW VARIABLES LIKE 'DEBUG_SYNC';
225232
Variable_name Value
226-
debug_sync ON - current signal: 's3'
233+
debug_sync ON - current signals: 's3'
227234
SET DEBUG_SYNC= 'p9abcdef TEST';
228235
SHOW VARIABLES LIKE 'DEBUG_SYNC';
229236
Variable_name Value
230-
debug_sync ON - current signal: 's3'
237+
debug_sync ON - current signals: 's3'
231238
SET DEBUG_SYNC= 'RESET';
232239
SHOW VARIABLES LIKE 'DEBUG_SYNC';
233240
Variable_name Value
234-
debug_sync ON - current signal: ''
241+
debug_sync ON - current signals: ''
235242
CREATE USER mysqltest_1@localhost;
236243
GRANT SUPER ON *.* TO mysqltest_1@localhost;
237244
connect con1,localhost,mysqltest_1,,;
@@ -292,4 +299,24 @@ disconnect con1;
292299
disconnect con2;
293300
connection default;
294301
DROP TABLE t1;
302+
#
303+
# Test NO_CLEAR_EVENT flag. The signal should still be visible after
304+
# the wait has completed succesfully.
305+
#
306+
SET DEBUG_SYNC= 'now SIGNAL s1';
307+
SHOW VARIABLES LIKE 'DEBUG_SYNC';
308+
Variable_name Value
309+
debug_sync ON - current signals: 's1'
310+
SET DEBUG_SYNC= 'now WAIT_FOR s1 NO_CLEAR_EVENT';
311+
SHOW VARIABLES LIKE 'DEBUG_SYNC';
312+
Variable_name Value
313+
debug_sync ON - current signals: 's1'
314+
SET DEBUG_SYNC= 'now WAIT_FOR s1';
315+
SHOW VARIABLES LIKE 'DEBUG_SYNC';
316+
Variable_name Value
317+
debug_sync ON - current signals: ''
318+
SET DEBUG_SYNC= 'now SIGNAL s1,s2,s5,s7';
319+
SHOW VARIABLES LIKE 'DEBUG_SYNC';
320+
Variable_name Value
321+
debug_sync ON - current signals: 's2,s7,s1,s5'
295322
SET DEBUG_SYNC= 'RESET';

mysql-test/main/debug_sync.test

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,16 @@ SET DEBUG_SYNC= 'p9abcdef TEST';
298298
SHOW VARIABLES LIKE 'DEBUG_SYNC';
299299
SET DEBUG_SYNC= 'p3abcdef TEST';
300300
SHOW VARIABLES LIKE 'DEBUG_SYNC';
301+
302+
#
303+
# Wait for all signals currently active except s3.
304+
#
305+
SET DEBUG_SYNC= 'now WAIT_FOR s9';
306+
SET DEBUG_SYNC= 'now WAIT_FOR s1';
307+
SET DEBUG_SYNC= 'now WAIT_FOR s4';
308+
SET DEBUG_SYNC= 'now WAIT_FOR s7';
309+
SHOW VARIABLES LIKE 'DEBUG_SYNC';
310+
301311
#
302312
# Clear the actions.
303313
#
@@ -320,7 +330,7 @@ SHOW VARIABLES LIKE 'DEBUG_SYNC';
320330
SET DEBUG_SYNC= 'p9abcdef TEST';
321331
SHOW VARIABLES LIKE 'DEBUG_SYNC';
322332
#
323-
# Now cleanup. Actions are clear already, but signal needs to be cleared.
333+
# Now cleanup. Actions are clear already, but s3 signal needs to be cleared.
324334
#
325335
SET DEBUG_SYNC= 'RESET';
326336
SHOW VARIABLES LIKE 'DEBUG_SYNC';
@@ -418,10 +428,24 @@ disconnect con2;
418428
connection default;
419429
DROP TABLE t1;
420430

431+
--echo #
432+
--echo # Test NO_CLEAR_EVENT flag. The signal should still be visible after
433+
--echo # the wait has completed succesfully.
434+
--echo #
435+
SET DEBUG_SYNC= 'now SIGNAL s1';
436+
SHOW VARIABLES LIKE 'DEBUG_SYNC';
437+
SET DEBUG_SYNC= 'now WAIT_FOR s1 NO_CLEAR_EVENT';
438+
SHOW VARIABLES LIKE 'DEBUG_SYNC';
439+
SET DEBUG_SYNC= 'now WAIT_FOR s1';
440+
SHOW VARIABLES LIKE 'DEBUG_SYNC';
441+
442+
SET DEBUG_SYNC= 'now SIGNAL s1,s2,s5,s7';
443+
SHOW VARIABLES LIKE 'DEBUG_SYNC';
444+
445+
421446
#
422447
# Cleanup after test case.
423-
# Otherwise signal would contain 'flushed' here,
424-
# which could confuse the next test.
448+
# Otherwise signal would confuse the next test.
425449
#
426450
SET DEBUG_SYNC= 'RESET';
427451

mysql-test/mariadb-test-run.pl

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ BEGIN
145145
my $start_only;
146146
my $file_wsrep_provider;
147147
my $num_saved_cores= 0; # Number of core files saved in vardir/log/ so far.
148+
my $test_name_for_report;
148149

149150
our @global_suppressions;
150151

@@ -515,13 +516,13 @@ sub main {
515516
}
516517

517518
if ( not @$completed ) {
518-
my $test_name= mtr_grab_file($path_testlog);
519-
$test_name =~ s/^CURRENT_TEST:\s//;
520-
chomp($test_name);
521-
my $tinfo = My::Test->new(name => $test_name);
522-
$tinfo->{result}= 'MTR_RES_FAILED';
523-
$tinfo->{comment}=' ';
524-
mtr_report_test($tinfo);
519+
if ($test_name_for_report)
520+
{
521+
my $tinfo = My::Test->new(name => $test_name_for_report);
522+
$tinfo->{result}= 'MTR_RES_FAILED';
523+
$tinfo->{comment}=' ';
524+
mtr_report_test($tinfo);
525+
}
525526
mtr_error("Test suite aborted");
526527
}
527528

@@ -3740,8 +3741,8 @@ ($)
37403741
sub run_testcase ($$) {
37413742
my ($tinfo, $server_socket)= @_;
37423743
my $print_freq=20;
3743-
3744-
mtr_verbose("Running test:", $tinfo->{name});
3744+
$test_name_for_report= $tinfo->{name};
3745+
mtr_verbose("Running test:", $test_name_for_report);
37453746
$ENV{'MTR_TEST_NAME'} = $tinfo->{name};
37463747
resfile_report_test($tinfo) if $opt_resfile;
37473748

@@ -5130,12 +5131,10 @@ ($$)
51305131
if (!$rc)
51315132
{
51325133
# Report failure about the last test case before exit
5133-
my $test_name= mtr_grab_file($path_current_testlog);
5134-
$test_name =~ s/^CURRENT_TEST:\s//;
5135-
my $tinfo = My::Test->new(name => $test_name);
5134+
my $tinfo = My::Test->new(name => $test_name_for_report);
51365135
$tinfo->{result}= 'MTR_RES_FAILED';
51375136
$tinfo->{failures}= 1;
5138-
$tinfo->{logfile}=get_log_from_proc($mysqld->{'proc'}, $tinfo->{name});
5137+
$tinfo->{logfile}=get_log_from_proc($mysqld->{'proc'}, $test_name_for_report);
51395138
report_option('verbose', 1);
51405139
mtr_report_test($tinfo);
51415140
}

mysql-test/suite/innodb/r/mdev-14846.result

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,12 @@ pk f1 f2 f3
3131
3 t q 1
3232
5 z t NULL
3333
SET DEBUG_SYNC='now SIGNAL default_dml';
34+
SET DEBUG_SYNC='now SIGNAL con2_dml';
3435
connection default;
3536
SET DEBUG_SYNC='now WAIT_FOR default_dml';
3637
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';
3738
connect con2,localhost,root,,test;
38-
set debug_sync='now WAIT_FOR default_dml';
39+
set debug_sync='now WAIT_FOR con2_dml';
3940
SET DEBUG_SYNC='now SIGNAL con1_dml2';
4041
disconnect con2;
4142
connection con1;

mysql-test/suite/innodb/t/mdev-14846.test

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,15 @@ SET DEBUG_SYNC='now WAIT_FOR con1_dml';
3535
begin;
3636
SELECT * FROM t1 for update; # Holds x lock of all records in the table t1
3737
SET DEBUG_SYNC='now SIGNAL default_dml';
38+
SET DEBUG_SYNC='now SIGNAL con2_dml';
3839

3940
--connection default
4041
SET DEBUG_SYNC='now WAIT_FOR default_dml';
4142
--send 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'
4243
# It holds the lock of all record in t3 and tries to acquire record lock for the table t1.
4344

4445
--connect (con2,localhost,root,,test)
45-
set debug_sync='now WAIT_FOR default_dml';
46+
set debug_sync='now WAIT_FOR con2_dml';
4647
let $wait_condition=
4748
select count(*) > 0 from information_schema.innodb_lock_waits;
4849
--source include/wait_condition.inc

mysql-test/suite/stress/r/deadlock_drop_table.result

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@ a b c
1919
1 NULL NULL
2020
set debug_sync='now SIGNAL go';
2121
set debug_sync='now WAIT_FOR parked2';
22-
set debug_sync='before_wait_for_refs SIGNAL waiting WAIT_FOR go2';
22+
set debug_sync='before_wait_for_refs SIGNAL waiting WAIT_FOR go3';
2323
drop table t1;;
2424
connection con2;
2525
set debug_sync='now WAIT_FOR waiting';
2626
set debug_sync='now SIGNAL go2';
27+
set debug_sync='now SIGNAL go3';
2728
connection default;
2829
connection con1;
2930
connection default;

mysql-test/suite/stress/t/deadlock_drop_table.test

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,12 @@ set debug_sync='now WAIT_FOR parked';
2020
select * from t1;
2121
set debug_sync='now SIGNAL go';
2222
set debug_sync='now WAIT_FOR parked2';
23-
set debug_sync='before_wait_for_refs SIGNAL waiting WAIT_FOR go2';
23+
set debug_sync='before_wait_for_refs SIGNAL waiting WAIT_FOR go3';
2424
--send drop table t1;
2525
--connection con2
2626
set debug_sync='now WAIT_FOR waiting';
2727
set debug_sync='now SIGNAL go2';
28-
29-
# Write out show processlist if the debug sync point times out
30-
let $wait_condition= select count(*)=0 from information_schema.processlist where state like "%debug%";
31-
source include/wait_condition.inc;
28+
set debug_sync='now SIGNAL go3';
3229

3330
--connection default
3431
--reap

mysql-test/suite/sys_vars/r/debug_sync_basic.result

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ select @@global.debug_sync;
22
ERROR HY000: Variable 'debug_sync' is a SESSION variable
33
select @@session.debug_sync;
44
@@session.debug_sync
5-
ON - current signal: ''
5+
ON - current signals: ''
66
show global variables like "debug_sync";
77
Variable_name Value
88
show session variables like "debug_sync";
99
Variable_name Value
10-
debug_sync ON - current signal: ''
10+
debug_sync ON - current signals: ''
1111
select * from information_schema.global_variables where variable_name="debug_sync";
1212
VARIABLE_NAME VARIABLE_VALUE
1313
select * from information_schema.session_variables where variable_name="debug_sync";
1414
VARIABLE_NAME VARIABLE_VALUE
15-
DEBUG_SYNC ON - current signal: ''
15+
DEBUG_SYNC ON - current signals: ''
1616
set @@session.debug_sync=1;
1717
ERROR 42000: Incorrect argument type to variable 'debug_sync'
1818
set @@session.debug_sync=1.1;

0 commit comments

Comments
 (0)