mirror of
https://github.com/MariaDB/server.git
synced 2025-01-23 23:34:34 +01:00
ecba786861
info on how to connect to the slave for the clients that connect to the master, but would like to know where the slaves are include/mysql_com.h: register slaves mysql-test/mysql-test-run.sh: parameters to test slave registration mysql-test/r/rpl000002.result: test of slave registration mysql-test/t/rpl000002.test: test slave registration sql/mysql_priv.h: slave registration sql/mysqld.cc: slave registration sql/slave.cc: slave registration sql/slave.h: slave registration sql/sql_lex.h: slave registration sql/sql_parse.cc: slave registration sql/sql_repl.cc: slave registration sql/sql_repl.h: slave registration sql/sql_yacc.yy: slave registration
35 lines
761 B
Text
35 lines
761 B
Text
source include/master-slave.inc;
|
|
connection master;
|
|
use test;
|
|
drop table if exists t1;
|
|
create table t1 (n int auto_increment primary key);
|
|
set insert_id = 2000;
|
|
insert into t1 values (NULL),(NULL),(NULL);
|
|
save_master_pos;
|
|
connection slave;
|
|
use test;
|
|
sync_with_master;
|
|
select * from t1;
|
|
connection master;
|
|
show slave hosts;
|
|
drop table t1;
|
|
save_master_pos;
|
|
connection slave;
|
|
sync_with_master;
|
|
slave stop;
|
|
connection master;
|
|
drop table if exists t2;
|
|
create table t2(id int auto_increment primary key, created datetime);
|
|
set timestamp=12345;
|
|
insert into t2 set created=now();
|
|
select * from t2;
|
|
save_master_pos;
|
|
connection slave;
|
|
slave start;
|
|
sync_with_master;
|
|
select * from t2;
|
|
connection master;
|
|
drop table t2;
|
|
save_master_pos;
|
|
connection slave;
|
|
sync_with_master;
|