Debian Codegraph @

mysql-test/suite/ndb_rpl/t/ndb_rpl_skip_ddl.test

raw
1 --source include/have_ndb.inc
2 --source include/have_binlog_format_mixed_or_row.inc
3 --source suite/ndb_rpl/ndb_master-slave.inc
4
5
6 --source include/rpl_connection_slave.inc
7 show variables like 'replica_parallel_workers';
8 show variables like 'replica_skip_errors';
9
10 create database extra;
11 use test;
12 create table t1 (a int primary key, rb int) engine=ndb;
13 create table t3 (a int primary key, b int, c int) engine=ndb;
14 create table t4 (a int primary key, b int) engine=ndb;
15 create table t5 (a int primary key, b int, key yale (b)) engine=ndb;
16
17 --source include/rpl_connection_master.inc
18 --echo #Create database (already exists on replica)
19 create database extra;
20
21 drop database extra;
22
23 --echo #Drop database (does not exist on replica)
24 set sql_log_bin=0;
25 create database surplus;
26 set sql_log_bin=1;
27 drop database surplus;
28
29
30 use test;
31
32 --echo #Create table which already exists on replica
33 create table t1 (a int primary key, sb int) engine=ndb;
34
35 --echo #Drop table which does not exist on replica
36 set sql_log_bin=0;
37 create table t2 (a int primary key, sb int) engine=ndb;
38 set sql_log_bin=1;
39 drop table t2;
40
41 --echo #Add column to table which already exists on replica table
42 set sql_log_bin=0;
43 create table t3 (a int primary key, b int) engine=ndb;
44 set sql_log_bin=1;
45 alter table t3 add column c int;
46
47 --echo #Drop column which does not exist on replica table
48 set sql_log_bin=0;
49 create table t4 (a int primary key, b int, c int) engine=ndb;
50 set sql_log_bin=1;
51 alter table t4 drop column c;
52
53 --echo #Add index to table which already exists on replica table
54 set sql_log_bin=0;
55 create table t5 (a int primary key, b int, key chubb (b)) engine=ndb;
56 set sql_log_bin=1;
57 alter table t5 add index yale(b);
58
59 --echo #Drop index from table which does not exist on replica table
60 alter table t5 drop index chubb;
61
62 --source include/sync_slave_sql_with_master.inc
63
64 --source include/rpl_connection_slave.inc
65 show tables;
66 show create table t1;
67 show create table t3;
68 show create table t4;
69 show create table t5;
70
71 --source include/rpl_connection_master.inc
72 drop table t1;
73 drop table t3;
74 drop table t4;
75 drop table t5;
76
77 # Cleanup Replication
78 --source include/rpl_end.inc