config root man

Current Path : /home/usr.opt/mysql57/mysql-test/suite/ndb_rpl/r/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : /home/usr.opt/mysql57/mysql-test/suite/ndb_rpl/r/ndb_rpl_circular.result

include/rpl_init.inc [topology=1->2->1]
Warnings:
Note	####	Sending passwords in plain text without SSL/TLS is extremely insecure.
Note	####	Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
Warnings:
Note	####	Sending passwords in plain text without SSL/TLS is extremely insecure.
Note	####	Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
include/rpl_connect.inc [creating master]
include/rpl_connect.inc [creating slave]
CREATE TABLE t1 (a int key, b int) ENGINE=ndb;
SHOW TABLES;
Tables_in_test
t1
INSERT INTO t1 VALUES (1,2);
INSERT INTO t1 VALUES (2,3);
SELECT * FROM t1 ORDER BY a;
a	b
1	2
2	3
include/check_slave_no_error.inc
include/check_slave_is_running.inc
Slave Binlog contains all ops as log_slave_updates is on
show variables like 'server_id';
Variable_name	Value
server_id	2
show variables like 'log_bin';
Variable_name	Value
log_bin	ON
show variables like 'log_slave_updates';
Variable_name	Value
log_slave_updates	ON
include/show_binlog_events.inc
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
slave-bin.000001	#	Query	#	#	use `test`; CREATE TABLE t1 (a int key, b int) ENGINE=ndb
slave-bin.000001	#	Query	#	#	BEGIN
slave-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
slave-bin.000001	#	Table_map	#	#	table_id: # (mysql.ndb_apply_status)
slave-bin.000001	#	Write_rows	#	#	table_id: #
slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
slave-bin.000001	#	Query	#	#	COMMIT
slave-bin.000001	#	Query	#	#	BEGIN
slave-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
slave-bin.000001	#	Table_map	#	#	table_id: # (mysql.ndb_apply_status)
slave-bin.000001	#	Write_rows	#	#	table_id: #
slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
slave-bin.000001	#	Query	#	#	COMMIT
include/check_slave_is_running.inc
SELECT * FROM t1 ORDER BY a;
a	b
1	2
2	3
include/check_slave_is_running.inc
Master Binlog contains only Master ops as log_slave_updates is off
show variables like 'server_id';
Variable_name	Value
server_id	1
show variables like 'log_bin';
Variable_name	Value
log_bin	ON
show variables like 'log_slave_updates';
Variable_name	Value
log_slave_updates	OFF
include/show_binlog_events.inc
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Query	#	#	BEGIN
master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
master-bin.000001	#	Table_map	#	#	table_id: # (mysql.ndb_apply_status)
master-bin.000001	#	Write_rows	#	#	table_id: #
master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
master-bin.000001	#	Query	#	#	COMMIT
STOP SLAVE;
DROP TABLE t1;
start slave;
create table t1 (a int primary key, b int) engine=ndb;
show variables like '%log_orig%';
Variable_name	Value
ndb_log_orig	ON
'Master' has only slave's serverid entry 
select server_id, log_name from mysql.ndb_apply_status order by server_id;
server_id	log_name
2	slave-bin.000001
set global ndb_log_apply_status=On;
show variables like 'ndb_log_apply_status';
Variable_name	Value
ndb_log_apply_status	ON
'Slave' has only Master's serverid entry
select server_id, log_name from mysql.ndb_apply_status order by server_id;
server_id	log_name
1	master-bin.000001
'Slave' has following ndb_binlog_index entries
select inserts, updates, deletes, schemaops, orig_server_id from mysql.ndb_binlog_index order by position;
inserts	updates	deletes	schemaops	orig_server_id
1	0	0	0	1
1	0	0	0	2
set global ndb_log_apply_status=On;
show variables like 'ndb_log_apply_status';
Variable_name	Value
ndb_log_apply_status	ON
stop slave;
insert into t1 values (1,1);
'Slave' still has only Master's serverid entry
select server_id, log_name from mysql.ndb_apply_status order by server_id;
server_id	log_name
1	master-bin.000001
'Slave' has following ndb_binlog_index entries
select inserts, updates, deletes, schemaops, orig_server_id from mysql.ndb_binlog_index order by position;
inserts	updates	deletes	schemaops	orig_server_id
1	0	0	0	1
1	0	0	0	2
0	0	0	0	2
1	0	0	0	1
'Master' still has only Slave's serverid entry
select server_id, log_name from mysql.ndb_apply_status order by server_id;
server_id	log_name
2	slave-bin.000001
start slave;
'Master' now has own serverid entry as well.
select server_id, log_name from mysql.ndb_apply_status order by server_id;
server_id	log_name
1	master-bin.000001
2	slave-bin.000001
'Slave' still only has 'Master''s serverid entry
select server_id, log_name from mysql.ndb_apply_status order by server_id;
server_id	log_name
1	master-bin.000001
Now create event originating at Slave
insert into t1 values (2,2);
'Slave' now also has its own serverid entry
select server_id, log_name from mysql.ndb_apply_status order by server_id;
server_id	log_name
1	master-bin.000001
2	slave-bin.000001
stop slave;
set global ndb_log_apply_status=off;
set global ndb_log_apply_status=off;
stop slave;
drop table t1;
drop table t1;
include/rpl_end.inc

Man Man