2000-12-07 15:54:59 +01:00
|
|
|
source include/master-slave.inc;
|
2003-01-06 00:48:59 +01:00
|
|
|
|
2004-02-17 00:35:17 +01:00
|
|
|
# Test replication of auto_increment
|
|
|
|
|
2001-01-03 01:15:48 +01:00
|
|
|
create table t1 (n int auto_increment primary key);
|
2000-11-18 07:35:40 +01:00
|
|
|
set insert_id = 2000;
|
2001-01-03 01:15:48 +01:00
|
|
|
insert into t1 values (NULL),(NULL),(NULL);
|
2002-10-25 01:46:14 +02:00
|
|
|
sync_slave_with_master;
|
2001-02-15 05:23:20 +01:00
|
|
|
select * from t1;
|
2001-01-17 13:47:33 +01:00
|
|
|
connection master;
|
2002-08-08 02:12:02 +02:00
|
|
|
--replace_result $SLAVE_MYPORT 9999
|
2001-05-31 02:50:56 +02:00
|
|
|
show slave hosts;
|
2001-01-03 01:15:48 +01:00
|
|
|
drop table t1;
|
2002-10-25 01:46:14 +02:00
|
|
|
sync_slave_with_master;
|
|
|
|
stop slave;
|
2001-02-15 05:23:20 +01:00
|
|
|
connection master;
|
2004-02-17 00:35:17 +01:00
|
|
|
|
|
|
|
# Test replication of timestamp
|
|
|
|
|
2001-02-15 05:23:20 +01:00
|
|
|
create table t2(id int auto_increment primary key, created datetime);
|
|
|
|
set timestamp=12345;
|
|
|
|
insert into t2 set created=now();
|
|
|
|
select * from t2;
|
2004-02-17 00:35:17 +01:00
|
|
|
|
|
|
|
# Test replication of CREATE .. LIKE (Bug #2557)
|
|
|
|
|
|
|
|
create table t3 like t2;
|
|
|
|
create temporary table t4 like t2;
|
|
|
|
create table t5 select * from t4;
|
2001-02-15 05:23:20 +01:00
|
|
|
save_master_pos;
|
|
|
|
connection slave;
|
2002-10-25 01:46:14 +02:00
|
|
|
start slave;
|
2001-02-15 05:23:20 +01:00
|
|
|
sync_with_master;
|
|
|
|
select * from t2;
|
2004-02-17 00:35:17 +01:00
|
|
|
show create table t3;
|
|
|
|
show create table t5;
|
2001-02-15 05:23:20 +01:00
|
|
|
connection master;
|
2004-02-17 00:35:17 +01:00
|
|
|
drop table t2,t3,t5;
|
2002-10-25 01:46:14 +02:00
|
|
|
sync_slave_with_master;
|