diff options
author | Michael Widenius <monty@askmonty.org> | 2013-03-01 18:09:06 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2013-03-01 18:09:06 +0200 |
commit | 4cace76d4d3d75cf94762497937479c475d12167 (patch) | |
tree | 9c7bad491bb0762dfb460bdd9dc9c58b840a3e49 /mysql-test/suite | |
parent | 492c3b09d2b3c11ebb043276ff4b245d54d99fd0 (diff) | |
parent | 8ed283d882e7147b1caa3f90f708720c94446024 (diff) | |
download | mariadb-git-4cace76d4d3d75cf94762497937479c475d12167.tar.gz |
Automatic merge
Diffstat (limited to 'mysql-test/suite')
-rw-r--r-- | mysql-test/suite/rpl/r/replace.result | 22 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/replace.test | 24 |
2 files changed, 46 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/r/replace.result b/mysql-test/suite/rpl/r/replace.result new file mode 100644 index 00000000000..855c54ef8fa --- /dev/null +++ b/mysql-test/suite/rpl/r/replace.result @@ -0,0 +1,22 @@ +include/master-slave.inc +[connection master] +drop table if exists t1; +Warnings: +Note 1051 Unknown table '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; +pr_id pr_page pr_type test +136 1 one 0 +137 2 two 0 +replace into t1 (pr_page, pr_type,test) values(1,"one",2); +select * from t1; +pr_id pr_page pr_type test +138 1 one 2 +137 2 two 0 +select * from t1; +pr_id pr_page pr_type test +138 1 one 2 +137 2 two 0 +drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/replace.test b/mysql-test/suite/rpl/t/replace.test new file mode 100644 index 00000000000..36afda0d927 --- /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 |