| 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 |
--source include/not_group_replication_plugin.inc |
| 6 |
|
| 7 |
source include/master-slave.inc; |
| 8 |
|
| 9 |
# Test replication of auto_increment |
| 10 |
|
| 11 |
|
| 12 |
#Get default engine value WL#6921 |
| 13 |
--let $DEFAULT_ENGINE = `select @@global.default_storage_engine` |
| 14 |
create table t1 (n int auto_increment primary key); |
| 15 |
set insert_id = 2000; |
| 16 |
insert into t1 values (NULL),(NULL),(NULL); |
| 17 |
--source include/sync_slave_sql_with_master.inc |
| 18 |
select * from t1; |
| 19 |
connection master; |
| 20 |
--source include/show_slave_hosts.inc |
| 21 |
drop table t1; |
| 22 |
--source include/sync_slave_sql_with_master.inc |
| 23 |
stop slave; |
| 24 |
--source include/wait_for_slave_to_stop.inc |
| 25 |
connection master; |
| 26 |
|
| 27 |
# Test replication of timestamp |
| 28 |
|
| 29 |
create table t2(id int auto_increment primary key, created datetime); |
| 30 |
set timestamp=12345; |
| 31 |
insert into t2 set created=now(); |
| 32 |
select * from t2; |
| 33 |
|
| 34 |
# Test replication of CREATE .. LIKE (Bug #2557) |
| 35 |
|
| 36 |
create table t3 like t2; |
| 37 |
create temporary table t4 like t2; |
| 38 |
create table t5 select * from t4; |
| 39 |
save_master_pos; |
| 40 |
connection slave; |
| 41 |
start slave; |
| 42 |
--source include/wait_for_slave_to_start.inc |
| 43 |
sync_with_master; |
| 44 |
select * from t2; |
| 45 |
#Replace default engine value with static engine string WL#6921 |
| 46 |
--replace_result $DEFAULT_ENGINE ENGINE |
| 47 |
show create table t3; |
| 48 |
--replace_result $DEFAULT_ENGINE ENGINE |
| 49 |
show create table t5; |
| 50 |
connection master; |
| 51 |
drop table t2,t3,t5; |
| 52 |
drop temporary table if exists t4; |
| 53 |
--source include/sync_slave_sql_with_master.inc |
| 54 |
|
| 55 |
# End of 4.1 tests |
| 56 |
--source include/rpl_end.inc |