Debian Codegraph @

mysql-test/suite/rpl/r/rpl_gipk_on_source_only.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 ##################################################
8 # 1. Enable the generation of GIPKs in the source
9 # Create a table with no primary key
10 [connection master]
11 SET SESSION sql_generate_invisible_primary_key = ON;
12 include/disable_binlog.inc
13 CREATE TABLE t1(f1 INT, f2 INT);
14 include/restore_binlog.inc
15 include/assert.inc [The table contains 3 columns]
16 include/assert.inc [The table contains a generated invisilble primary key]
17
18 ##################################################
19 # 2. Create the same table on the replica
20 [connection slave]
21 CREATE TABLE t1(f1 INT, f2 INT);
22
23 ##################################################
24 # 3. Insert some values on the table
25 # Check they are replicated correctly
26 [connection master]
27 INSERT INTO t1 VALUES (1, 10);
28 INSERT INTO t1 VALUES (5, 50);
29 include/sync_slave_sql_with_master.inc
30 [connection slave]
31 include/assert.inc [The table t1 contains the 2 inserted rows]
32
33 ##################################################
34 # 4. Update and delete rows in the table
35 # Check changes are replicated correctly
36 [connection master]
37 UPDATE t1 SET t1.f2 = 100 WHERE t1.f1=5;
38 DELETE FROM t1 WHERE t1.f1=1;
39 include/sync_slave_sql_with_master.inc
40 include/assert.inc [The table t1 contains 1 row]
41 include/assert.inc [The table t1 was updated]
42
43 ##################################################
44 # 5. Cleanup
45 [connection master]
46 SET SESSION sql_generate_invisible_primary_key = OFF;
47 DROP TABLE t1;
48 include/rpl_end.inc