--source include/master-slave.inc
|
--source include/have_innodb.inc
|
--source include/have_binlog_format_row.inc
|
|
connection slave;
|
show variables like 'slave_skip_errors';
|
CREATE USER u@'%' IDENTIFIED BY 'password';
|
GRANT ALL ON db1.* TO u@'%' IDENTIFIED BY 'password';
|
flush privileges;
|
|
create database db1;
|
CREATE TABLE db1.t1c ( id int primary key, msg varchar(100)) ENGINE=innodb;
|
INSERT INTO db1.t1c VALUES (1, 'initial');
|
|
connection master;
|
|
eval CREATE TABLE test.t1 ( id int primary key, msg varchar(100))
|
ENGINE=CONNECT DEFAULT CHARSET=utf8
|
CONNECTION='mysql://u:password@127.0.0.1:$SLAVE_MYPORT/db1/t1c'
|
TABLE_TYPE=MYSQL;
|
|
select * from test.t1;
|
|
connection master;
|
--sync_slave_with_master
|
|
select * from test.t1;
|
|
connection master;
|
|
insert into test.t1 VALUES(2,'test');
|
select * from test.t1;
|
|
--sync_slave_with_master
|
|
select * from test.t1;
|
select * from db1.t1c;
|