Debian Codegraph @

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

raw
1 RESET MASTER;
2 SET @start_global_value = @@global.gtid_mode;
3 SELECT @start_global_value;
4 @start_global_value
5 OFF
6 SET @start_enforce_gtid_consistency= @@global.enforce_gtid_consistency;
7 SET @@global.enforce_gtid_consistency = ON;
8 select @@global.gtid_mode;
9 @@global.gtid_mode
10 OFF
11 select @@session.gtid_mode;
12 ERROR HY000: Variable 'gtid_mode' is a GLOBAL variable
13 set gtid_mode = @start_global_value;
14 ERROR HY000: Variable 'gtid_mode' is a GLOBAL variable and should be set with SET GLOBAL
15 set @@session.gtid_mode = @start_global_value;
16 ERROR HY000: Variable 'gtid_mode' is a GLOBAL variable and should be set with SET GLOBAL
17 show global variables like 'gtid_mode';
18 Variable_name Value
19 gtid_mode OFF
20 show session variables like 'gtid_mode';
21 Variable_name Value
22 gtid_mode OFF
23 select * from performance_schema.global_variables where variable_name='gtid_mode';
24 VARIABLE_NAME VARIABLE_VALUE
25 gtid_mode OFF
26 select * from performance_schema.session_variables where variable_name='gtid_mode';
27 VARIABLE_NAME VARIABLE_VALUE
28 gtid_mode OFF
29 set global gtid_mode = OFF;
30 set global gtid_mode = ON_PERMISSIVE;
31 ERROR HY000: The value of @@GLOBAL.GTID_MODE can only be changed one step at a time: OFF <-> OFF_PERMISSIVE <-> ON_PERMISSIVE <-> ON. Also note that this value must be stepped up or down simultaneously on all servers. See the Manual for instructions.
32 set global gtid_mode = ON;
33 ERROR HY000: The value of @@GLOBAL.GTID_MODE can only be changed one step at a time: OFF <-> OFF_PERMISSIVE <-> ON_PERMISSIVE <-> ON. Also note that this value must be stepped up or down simultaneously on all servers. See the Manual for instructions.
34 set global gtid_mode = OFF_PERMISSIVE;
35 set global gtid_mode = OFF_PERMISSIVE;
36 set global gtid_mode = ON;
37 ERROR HY000: The value of @@GLOBAL.GTID_MODE can only be changed one step at a time: OFF <-> OFF_PERMISSIVE <-> ON_PERMISSIVE <-> ON. Also note that this value must be stepped up or down simultaneously on all servers. See the Manual for instructions.
38 set global gtid_mode = ON_PERMISSIVE;
39 set global gtid_mode = ON_PERMISSIVE;
40 set global gtid_mode = OFF;
41 ERROR HY000: The value of @@GLOBAL.GTID_MODE can only be changed one step at a time: OFF <-> OFF_PERMISSIVE <-> ON_PERMISSIVE <-> ON. Also note that this value must be stepped up or down simultaneously on all servers. See the Manual for instructions.
42 set global gtid_mode = ON;
43 set global gtid_mode = ON;
44 set global gtid_mode = OFF;
45 ERROR HY000: The value of @@GLOBAL.GTID_MODE can only be changed one step at a time: OFF <-> OFF_PERMISSIVE <-> ON_PERMISSIVE <-> ON. Also note that this value must be stepped up or down simultaneously on all servers. See the Manual for instructions.
46 set global gtid_mode = OFF_PERMISSIVE;
47 ERROR HY000: The value of @@GLOBAL.GTID_MODE can only be changed one step at a time: OFF <-> OFF_PERMISSIVE <-> ON_PERMISSIVE <-> ON. Also note that this value must be stepped up or down simultaneously on all servers. See the Manual for instructions.
48 set global gtid_mode = ON_PERMISSIVE;
49 set global gtid_mode = OFF_PERMISSIVE;
50 set global gtid_mode = OFF;
51 set global gtid_mode = NULL;
52 ERROR 42000: Variable 'gtid_mode' can't be set to the value of 'NULL'
53 select @@global.gtid_mode;
54 @@global.gtid_mode
55 OFF
56 set global gtid_mode = default;
57 select @@global.gtid_mode;
58 @@global.gtid_mode
59 OFF
60 set global gtid_mode = OFF_PERMISSIVE;
61 set global gtid_mode = default;
62 select @@global.gtid_mode;
63 @@global.gtid_mode
64 OFF
65 set global gtid_mode = OFF_PERMISSIVE;
66 set global gtid_mode = ON_PERMISSIVE;
67 set global gtid_mode = default;
68 ERROR HY000: The value of @@GLOBAL.GTID_MODE can only be changed one step at a time: OFF <-> OFF_PERMISSIVE <-> ON_PERMISSIVE <-> ON. Also note that this value must be stepped up or down simultaneously on all servers. See the Manual for instructions.
69 select @@global.gtid_mode;
70 @@global.gtid_mode
71 ON_PERMISSIVE
72 set global gtid_mode = ON;
73 set global gtid_mode = default;
74 ERROR HY000: The value of @@GLOBAL.GTID_MODE can only be changed one step at a time: OFF <-> OFF_PERMISSIVE <-> ON_PERMISSIVE <-> ON. Also note that this value must be stepped up or down simultaneously on all servers. See the Manual for instructions.
75 select @@global.gtid_mode;
76 @@global.gtid_mode
77 ON
78 set session gtid_mode = ON;
79 ERROR HY000: Variable 'gtid_mode' is a GLOBAL variable and should be set with SET GLOBAL
80 set global gtid_mode = on_permissive;
81 set global sql_replica_skip_counter = 1;
82 set global gtid_mode = on;
83 Warnings:
84 Warning 4016 The value of sql_replica_skip_counter will only take effect for channels running with ASSIGN_GTIDS_TO_ANONYMOUS_TRANSACTIONS <> OFF.
85 include/assert.inc [A warning will be generated stating "The value of sql_replica_skip_counter will only take effect for channels running with"]
86 set global sql_replica_skip_counter = 0;
87 set global gtid_mode = on;
88 set global gtid_mode = on_permissive;
89 SET @@global.enforce_gtid_consistency = OFF;
90 set global gtid_mode = off_permissive;
91 set global gtid_mode = off;
92 set global gtid_mode = off_permissive;
93 set global gtid_mode = on_permissive;
94 set global gtid_mode = on;
95 ERROR HY000: SET @@GLOBAL.GTID_MODE = ON is not allowed because ENFORCE_GTID_CONSISTENCY is not ON.
96 SET @@global.enforce_gtid_consistency = WARN;
97 set global gtid_mode = off_permissive;
98 set global gtid_mode = off;
99 set global gtid_mode = off_permissive;
100 set global gtid_mode = on_permissive;
101 set global gtid_mode = on;
102 ERROR HY000: SET @@GLOBAL.GTID_MODE = ON is not allowed because ENFORCE_GTID_CONSISTENCY is not ON.
103 RESET MASTER;
104 SET @@GTID_NEXT='11111111-1111-1111-1111-111111111111:1';
105 BEGIN;
106 SET @@global.gtid_purged= '11111111-1111-1111-1111-111111111111:1-2';
107 ERROR HY000: @@GLOBAL.GTID_PURGED cannot be changed: the added gtid set must not overlap with @@GLOBAL.GTID_OWNED
108 SET @@global.gtid_purged= '11111111-1111-1111-1111-111111111111:2-2';
109 SET @@global.gtid_purged= '+11111111-1111-1111-1111-111111111111:1-1';
110 ERROR HY000: @@GLOBAL.GTID_PURGED cannot be changed: the added gtid set must not overlap with @@GLOBAL.GTID_OWNED
111 SET @@global.gtid_purged= '+11111111-1111-1111-1111-111111111111:3-3';
112 SELECT @@global.gtid_purged;
113 @@global.gtid_purged
114 11111111-1111-1111-1111-111111111111:2-3
115 ROLLBACK;
116 CREATE TABLE t1 (a INT);
117 SET AUTOCOMMIT = 0;
118 SET SESSION GTID_NEXT = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1';
119 INSERT INTO t1 VALUES (1);
120 SET GLOBAL GTID_MODE = 'off_permissive';
121 ERROR HY000: The system variable gtid_mode cannot be set when there is an ongoing transaction.
122 COMMIT;
123 SET SESSION GTID_NEXT = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:2';
124 SET GLOBAL GTID_MODE = 'off_permissive';
125 ERROR HY000: Variable gtid_mode cannot be changed by a client that owns a GTID. The client owns aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:2. Ownership is released on COMMIT or ROLLBACK.
126 COMMIT;
127 SET GTID_NEXT = 'ANONYMOUS';
128 SET GLOBAL GTID_MODE = 'off_permissive';
129 ERROR HY000: Variable gtid_mode cannot be changed by a client that owns a GTID. The client owns ANONYMOUS. Ownership is released on COMMIT or ROLLBACK.
130 COMMIT;
131 SET AUTOCOMMIT = 1;
132 SET SESSION GTID_NEXT = 'AUTOMATIC';
133 DROP TABLE t1;
134 SET GLOBAL GTID_MODE ='off_permissive';
135 SET GLOBAL GTID_MODE = 'off';
136 SET @@global.enforce_gtid_consistency = @start_enforce_gtid_consistency;