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_slave_restart.result

include/master-slave.inc
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.
[connection master]
CREATE TABLE t1 (c1 CHAR(15), c2 CHAR(15), c3 INT, PRIMARY KEY (c3)) ENGINE = NDB ;
CREATE TABLE t2 (a int key) ENGINE = NDB ;
reset master;
SHOW TABLES;
Tables_in_test
t1
t2
INSERT INTO t1 VALUES ("row1","will go away",1);
SELECT * FROM t1 ORDER BY c3;
c1	c2	c3
row1	will go away	1
SELECT * FROM t1 ORDER BY c3;
c1	c2	c3
row1	will go away	1
SELECT @the_epoch:=MAX(epoch) FROM mysql.ndb_apply_status;
@the_epoch:=MAX(epoch)
<the_epoch>
SELECT * FROM t1 ORDER BY c3;
c1	c2	c3
row1	will go away	1
stop slave;
# restart
set SQL_LOG_BIN=0;
insert into t2 values (1);
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
set SQL_LOG_BIN=1;
start slave;
INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4);
DELETE FROM t1 WHERE c3 = 1;
UPDATE t1 SET c2="should go away" WHERE c3 = 2;
UPDATE t1 SET c2="C" WHERE c3 = 3;
DELETE FROM t1 WHERE c3 = 2;
SELECT * FROM t1 ORDER BY c3;
c1	c2	c3
row3	C	3
row4	D	4
INSERT INTO t1 VALUES ("row5","E",5);
SELECT * FROM t1 ORDER BY c3;
c1	c2	c3
row3	C	3
row4	D	4
row5	E	5
SELECT * FROM t1 ORDER BY c3;
c1	c2	c3
row3	C	3
row4	D	4
row5	E	5
==== clean up ====
DROP TABLE t1;
DROP TABLE t2;
STOP SLAVE;
CHANGE MASTER TO
master_port=<MASTER_PORT>;

Man Man