summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/rpl/t/replace.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/rpl/t/replace.test')
-rw-r--r--mysql-test/suite/rpl/t/replace.test24
1 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/t/replace.test b/mysql-test/suite/rpl/t/replace.test
new file mode 100644
index 00000000..36afda0d
--- /dev/null
+++ b/mysql-test/suite/rpl/t/replace.test
@@ -0,0 +1,24 @@
+#
+# Test of REPLACE with replication
+#
+
+source include/master-slave.inc;
+
+#
+# Test of doing replace on unique key on table with auto_increment
+#
+
+drop table if exists t1;
+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;
+insert into t1 (pr_page, pr_type, test) values(1,"one",0),(2,"two",0);
+select * from t1;
+replace into t1 (pr_page, pr_type,test) values(1,"one",2);
+select * from t1;
+sync_slave_with_master;
+connection slave;
+select * from t1;
+connection master;
+drop table t1;
+
+# End of 5.5 tests
+--source include/rpl_end.inc