Debian Codegraph @

mysql-test/suite/binlog/t/binlog_group_commit_sync_delay_error.test

raw
1 # ==== Purpose ====
2 #
3 # This test will set a value for binlog_group_commit_sync_delay
4 # which will be a non multiple of delta(the waiting time is
5 # broken into smaller chunks called as delta), and execute some
6 # transactions after that.
7 #
8 # The test verifies that server does not hang when a non multiple of 10
9 # is assigned to binlog_group_commit_sync_delay variable.
10 #
11 # Related bugs and Worklogs
12 #
13 # Bug#28091735:COMMIT WILL HANG IF BINLOG_GROUP_COMMIT_SYNC_DELAY
14 # IS NOT A MULTIPLE OF 10
15
16 # this is binlog format agnostic
17 --source include/have_binlog_format_row.inc
18
19 --let $bgcd_saved = `SELECT @@GLOBAL.binlog_group_commit_sync_delay`
20 --let $bgcc_saved = `SELECT @@GLOBAL.binlog_group_commit_sync_no_delay_count`
21
22 CREATE TABLE t(s INT);
23
24 # Set the delay to a non multiple of delta, in this case
25 # delta will be 3, MAX(1, wait_time * .1) and so it will not be
26 # a multiple of the waiting time which is 32
27
28 SET GLOBAL binlog_group_commit_sync_delay = 32;
29 SET GLOBAL binlog_group_commit_sync_no_delay_count = 0;
30
31 BEGIN;
32 INSERT INTO t VALUES(10);
33 COMMIT; # Hangs here without the fix
34
35 #cleanup
36
37 --eval SET GLOBAL binlog_group_commit_sync_delay = $bgcd_saved
38 --eval SET GLOBAL binlog_group_commit_sync_no_delay_count = $bgcc_saved
39 DROP TABLE t;
40