Debian Codegraph @

mysql-test/suite/rpl_gtid/r/rpl_explicit_modify_gtid_table.result

raw
1 include/master-slave.inc
2 Warnings:
3 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
5 [connection master]
6 #
7 # Verify that explicit insert into mysql.gtid_executed
8 # is causing a warning.
9 #
10 INSERT INTO mysql.gtid_executed VALUES ('aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', 1, 1);
11 Warnings:
12 Warning 3129 Please do not modify the gtid_executed table. This is a mysql internal system table to store GTIDs for committed transactions. Modifying it can lead to an inconsistent GTID state.
13 #
14 # Verify that explicit update to mysql.gtid_executed
15 # is causing a warning.
16 #
17 UPDATE mysql.gtid_executed SET interval_end = 2 WHERE source_uuid = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa';
18 Warnings:
19 Warning 3129 Please do not modify the gtid_executed table. This is a mysql internal system table to store GTIDs for committed transactions. Modifying it can lead to an inconsistent GTID state.
20 #
21 # Verify that explicit select from mysql.gtid_executed
22 # with 'FOR UPDATE' is causing a warning.
23 #
24 SELECT * FROM mysql.gtid_executed WHERE source_uuid = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa' FOR UPDATE;
25 source_uuid interval_start interval_end
26 aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa 1 2
27 Warnings:
28 Warning 3129 Please do not modify the gtid_executed table. This is a mysql internal system table to store GTIDs for committed transactions. Modifying it can lead to an inconsistent GTID state.
29 #
30 # Verify that explicit delete from mysql.gtid_executed
31 # is causing a warning.
32 #
33 DELETE FROM mysql.gtid_executed WHERE source_uuid = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa';
34 Warnings:
35 Warning 3129 Please do not modify the gtid_executed table. This is a mysql internal system table to store GTIDs for committed transactions. Modifying it can lead to an inconsistent GTID state.
36 #
37 # Verify that no warning on explicit select from mysql.gtid_executed
38 #
39 SELECT * FROM mysql.gtid_executed WHERE source_uuid = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa';
40 source_uuid interval_start interval_end
41 include/sync_slave_sql_with_master.inc
42 call mtr.add_suppression("You need to use --log-bin to make "
43 "--binlog-format work");
44 call mtr.add_suppression("The transaction owned GTID is already in the "
45 "gtid_executed table, which is caused by an "
46 "explicit modifying from user client.");
47 INSERT INTO mysql.gtid_executed VALUES ('aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', 1, 1);
48 Warnings:
49 Warning 3129 Please do not modify the gtid_executed table. This is a mysql internal system table to store GTIDs for committed transactions. Modifying it can lead to an inconsistent GTID state.
50 #
51 # Verify that the GTID is inserted into table, but
52 # is not inserted into GLOBAL.GTID_EXECUTED.
53 #
54 SELECT * FROM mysql.gtid_executed;
55 source_uuid interval_start interval_end
56 aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa 1 1
57 SELECT @@GLOBAL.GTID_EXECUTED;
58 @@GLOBAL.GTID_EXECUTED
59
60 #
61 # Verify that the duplicate error is ignored, the transaction
62 # is committed successfully, the GTID is inserted into
63 # GLOBAL.GTID_EXECUTED, and log a warning in error log.
64 #
65 SET GTID_NEXT = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1';
66 CREATE TABLE t1 (a INT);
67 SELECT @@GLOBAL.GTID_EXECUTED;
68 @@GLOBAL.GTID_EXECUTED
69 aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1
70 SET GTID_NEXT = 'AUTOMATIC';
71 FLUSH LOGS;
72 include/assert_grep.inc [Found the expected warning "The transaction owned GTID is already in the gtid_executed table, which is caused by an explicit modifying from user client" in slave's error log.]
73 SET GTID_NEXT = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:2';
74 DROP TABLE t1;
75 SELECT @@GLOBAL.GTID_EXECUTED;
76 @@GLOBAL.GTID_EXECUTED
77 aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-2
78 [connection master]
79 include/rpl_end.inc