Debian Codegraph @

mysql-test/suite/group_replication/r/gr_replica_generate_invisible_primary_key.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 ############################################################
8 # 1. Set sql_generate_invisible_primary_key to true on member 2
9 [connection server1]
10 include/save_sysvars.inc [ "GLOBAL.sql_generate_invisible_primary_key" ]
11 [connection server2]
12 include/save_sysvars.inc [ "GLOBAL.sql_generate_invisible_primary_key" ]
13 SET GLOBAL sql_generate_invisible_primary_key=true;
14
15 ############################################################
16 # 2. Create a table with no primary key
17 # Start both members
18 # Check the second server that recovered still has only 1 column on its table
19 [connection server1]
20 CREATE TABLE test.t1 (c1 INT);
21 include/start_and_bootstrap_group_replication.inc
22 [connection server2]
23 include/start_group_replication.inc
24 include/assert.inc [The table only contains one column]
25
26 ############################################################
27 # 3. Set sql_generate_invisible_primary_key to true on server 1 and to false on server 2
28 # Create a table with no primary key on server 2
29 # Check that server 1 that replicated it still has only 1 column on its table
30 [connection server1]
31 SET GLOBAL sql_generate_invisible_primary_key=true;
32 [connection server2]
33 SET GLOBAL sql_generate_invisible_primary_key=false;
34 CREATE TABLE test.t2 (c1 INT);
35 include/rpl_sync.inc
36 [connection server1]
37 include/assert.inc [The table only contains one column]
38
39 ############################################################
40 # 4. Cleanup
41 #
42 [connection server1]
43 include/restore_sysvars.inc
44 [connection server2]
45 include/restore_sysvars.inc
46 DROP TABLE t1;
47 DROP TABLE t2;
48 include/group_replication_end.inc