| 1 |
# |
| 2 |
# Test of REPLACE with replication |
| 3 |
# |
| 4 |
|
| 5 |
source include/master-slave.inc; |
| 6 |
|
| 7 |
# |
| 8 |
# Test of doing replace on unique key on table with auto_increment |
| 9 |
# |
| 10 |
|
| 11 |
drop table if exists t1; |
| 12 |
CREATE TABLE t1 (pr_id int(10) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY, pr_page int(11) NOT NULL, pr_type varbinary(60) NOT NULL, test int, UNIQUE KEY pr_pagetype (pr_page,pr_type)) ENGINE=myisam AUTO_INCREMENT=136; |
| 13 |
insert into t1 (pr_page, pr_type, test) values(1,"one",0),(2,"two",0); |
| 14 |
select * from t1; |
| 15 |
replace into t1 (pr_page, pr_type,test) values(1,"one",2); |
| 16 |
select * from t1; |
| 17 |
sync_slave_with_master; |
| 18 |
connection slave; |
| 19 |
select * from t1; |
| 20 |
connection master; |
| 21 |
drop table t1; |
| 22 |
|
| 23 |
# End of 5.5 tests |
| 24 |
--source include/rpl_end.inc |