Debian Codegraph @

mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test

raw
1 # Mixed DDL-DML (CREATE ... SELECT ...) statements can only be
2 # replicated properly in statement-based replication.
3 # Currently statement based due to bug 12345
4 --source include/have_binlog_format_mixed_or_statement.inc
5
6 source include/master-slave.inc;
7
8 # Test replication of auto_increment
9
10 create table t1 (n int auto_increment primary key);
11 set insert_id = 2000;
12 insert into t1 values (NULL),(NULL),(NULL);
13 sync_slave_with_master;
14 select * from t1;
15 connection master;
16 --replace_result $SLAVE_MYPORT 9999
17 show slave hosts;
18 drop table t1;
19 sync_slave_with_master;
20 stop slave;
21 --source include/wait_for_slave_to_stop.inc
22 connection master;
23
24 # Test replication of timestamp
25
26 create table t2(id int auto_increment primary key, created datetime);
27 SET TIME_ZONE= '+03:00';
28 set timestamp=12345;
29 insert into t2 set created=now();
30 select * from t2;
31
32 # Test replication of CREATE .. LIKE (Bug #2557)
33
34 create table t3 like t2;
35 create temporary table t4 like t2;
36 create table t5 select * from t4;
37 save_master_pos;
38 connection slave;
39 start slave;
40 --source include/wait_for_slave_to_start.inc
41 sync_with_master;
42 select * from t2;
43 show create table t3;
44 show create table t5;
45 connection master;
46 drop table t2,t3,t5;
47 drop temporary table t4;
48 sync_slave_with_master;
49
50 # End of 4.1 tests
51 --source include/rpl_end.inc