You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Feature] Issue#16 OMIT MAINTAINING OWNED_GTID SET IF GTID IS AUTO-GENERATED
Description:
------------
Before this patch, the life cycle for a GTID like the following:
Generate a GTID => Add the GTID into owned_gtid => Flush the GTID into binlog
=> Remove the GTID from owned_gtid. Owned_gtid can be treated as an intermediate
set to hold all of the GTIDs of current thread.
After this patch, the life cycle for such a GTID can be like this:
Generate a GTID => Add the GTID into binlog. Of course, if anything
wrong happens, we have to remove the GTID from the binlog. Before this
patch, we can remove the GTID from owned_gtid. Obviously, we shortened
the life cycle of GTID.
In order to support this feature, we introduced a new system variable
"rds_gtid_precommit". If it's on, we will change the life cycle of GTID.
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4
+
Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
5
+
[connection master]
6
+
include/rpl_set_gtid_mode.inc
7
+
CALL mtr.add_suppression('Error writing file*');
8
+
SET @old_gtid_precommit = @@global.rds_gtid_precommit;
9
+
SET GLOBAL rds_gtid_precommit = 0;
10
+
CREATE TABLE t1 (a INT PRIMARY KEY, b INT);
11
+
INSERT INTO t1 VALUES (1,2);
12
+
INSERT INTO t1 VALUES (2,3);
13
+
INSERT INTO t1 VALUES (3,4);
14
+
SET GLOBAL rds_gtid_precommit = 1;
15
+
INSERT INTO t1 VALUES (4,5);
16
+
INSERT INTO t1 VALUES (5,6);
17
+
INSERT INTO t1 VALUES (6,7);
18
+
SET GLOBAL rds_gtid_precommit = 0;
19
+
INSERT INTO t1 VALUES (8,9);
20
+
SELECT * from t1 ORDER BY a;
21
+
a b
22
+
1 2
23
+
2 3
24
+
3 4
25
+
4 5
26
+
5 6
27
+
6 7
28
+
8 9
29
+
SELECT * FROM t1 ORDER BY a;
30
+
a b
31
+
1 2
32
+
2 3
33
+
3 4
34
+
4 5
35
+
5 6
36
+
6 7
37
+
8 9
38
+
SET GLOBAL rds_gtid_precommit = @old_gtid_precommit;
0 commit comments