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
6source include/master-slave.inc;
7
8# Test replication of auto_increment
9
10create table t1 (n int auto_increment primary key);
11set insert_id = 2000;
12insert into t1 values (NULL),(NULL),(NULL);
13sync_slave_with_master;
14select * from t1;
15connection master;
16--replace_result $SLAVE_MYPORT 9999
17show slave hosts;
18drop table t1;
19sync_slave_with_master;
20stop slave;
21--source include/wait_for_slave_to_stop.inc
22connection master;
23
24# Test replication of timestamp
25
26create table t2(id int auto_increment primary key, created datetime);
27SET TIME_ZONE= '+03:00';
28set timestamp=12345;
29insert into t2 set created=now();
30select * from t2;
31
32# Test replication of CREATE .. LIKE (Bug #2557)
33
34create table t3 like t2;
35create temporary table t4 like t2;
36create table t5 select * from t4;
37save_master_pos;
38connection slave;
39start slave;
40--source include/wait_for_slave_to_start.inc
41sync_with_master;
42select * from t2;
43show create table t3;
44show create table t5;
45connection master;
46drop table t2,t3,t5;
47drop temporary table t4;
48sync_slave_with_master;
49
50# End of 4.1 tests
51--source include/rpl_end.inc
52