Debian Codegraph @

mysql-test/suite/group_replication/r/gr_dependent_ddl_dml_same_server.result

raw
1 include/group_replication.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 server1]
6
7 #1. Create table, insert some data
8
9 [connection server1]
10 CREATE TABLE t1 (a INT PRIMARY KEY);
11 INSERT INTO t1 (a) VALUES (10),(20);
12 include/rpl_sync.inc
13
14 #2. Execute dependent DDL and DML (one after the other)
15 # in different sessions, on same member
16
17 BEGIN;
18 INSERT INTO t1 (a) values (30);
19 UPDATE t1 set a= 1 where a= 10;
20 DELETE FROM t1 WHERE a= 20;
21 UPDATE t1 set a= 3 where a= 30;
22 COMMIT;
23 [connection server_1]
24 ALTER TABLE t1 add column b varchar(10) DEFAULT 'empty';
25 include/rpl_sync.inc
26 SELECT * FROM t1;
27 a b
28 1 empty
29 3 empty
30 # 2.3 Check that t1 on Server1, Server2 has same data
31 include/diff_tables.inc [server1:test.t1, server2:test.t1]
32
33 # 3. Execute dependent DDL and DML (concurrently)
34 # in different sessions, on same member
35
36 [connection server1]
37 BEGIN;
38 INSERT INTO t1 (a,b) values (2, 'two');
39 UPDATE t1 set b= 'one' WHERE a= 1;
40 UPDATE t1 set b= 'three' WHERE a=3;
41 [connection server_1]
42 SELECT * FROM t1;
43 a b
44 1 empty
45 3 empty
46 ALTER TABLE t1 DROP b;
47 [connection server1]
48 COMMIT;
49 [connection server_1]
50 SELECT * FROM t1;
51 a
52 1
53 2
54 3
55 include/rpl_sync.inc
56 # 3.3 Check that t1 on Server1, Server2 has same data
57 include/diff_tables.inc [server1:test.t1, server2:test.t1]
58 [connection server1]
59 DROP TABLE t1;
60 include/group_replication_end.inc