| 1 |
include/master-slave.inc |
| 2 |
[connection master] |
| 3 |
drop table if exists t1; |
| 4 |
Warnings: |
| 5 |
Note 1051 Unknown table 'test.t1' |
| 6 |
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; |
| 7 |
insert into t1 (pr_page, pr_type, test) values(1,"one",0),(2,"two",0); |
| 8 |
select * from t1; |
| 9 |
pr_id pr_page pr_type test |
| 10 |
136 1 one 0 |
| 11 |
137 2 two 0 |
| 12 |
replace into t1 (pr_page, pr_type,test) values(1,"one",2); |
| 13 |
select * from t1; |
| 14 |
pr_id pr_page pr_type test |
| 15 |
138 1 one 2 |
| 16 |
137 2 two 0 |
| 17 |
connection slave; |
| 18 |
connection slave; |
| 19 |
select * from t1; |
| 20 |
pr_id pr_page pr_type test |
| 21 |
138 1 one 2 |
| 22 |
137 2 two 0 |
| 23 |
connection master; |
| 24 |
drop table t1; |
| 25 |
include/rpl_end.inc |