rpl_until.result 5.3 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
stop slave;
create table t1(n int not null auto_increment primary key);
insert into t1 values (1),(2),(3),(4);
drop table t1;
create table t2(n int not null auto_increment primary key);
insert into t2 values (1),(2);
insert into t2 values (3),(4);
drop table t2;
show binlog events;
16
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
17 18 19 20 21 22 23 24
master-bin.000001	4	Format_desc	1	96	Server ver: VERSION, Binlog ver: 4
master-bin.000001	96	Query	1	211	use `test`; create table t1(n int not null auto_increment primary key)
master-bin.000001	211	Query	1	305	use `test`; insert into t1 values (1),(2),(3),(4)
master-bin.000001	305	Query	1	375	use `test`; drop table t1
master-bin.000001	375	Query	1	490	use `test`; create table t2(n int not null auto_increment primary key)
master-bin.000001	490	Query	1	576	use `test`; insert into t2 values (1),(2)
master-bin.000001	576	Query	1	662	use `test`; insert into t2 values (3),(4)
master-bin.000001	662	Query	1	732	use `test`; drop table t2
25
start slave until master_log_file='master-bin.000001', master_log_pos=304;
26 27 28 29 30 31 32
select * from t1;
n
1
2
3
4
show slave status;
33
Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master
34
#	127.0.0.1	root	MASTER_MYPORT	1	master-bin.000001	732	slave-relay-bin.000004	#	master-bin.000001	Yes	No							0		0	305	#	Master	master-bin.000001	304	No						#
35 36 37 38 39 40 41 42
start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
select * from t1;
n
1
2
3
4
show slave status;
43
Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master
44
#	127.0.0.1	root	MASTER_MYPORT	1	master-bin.000001	732	slave-relay-bin.000004	#	master-bin.000001	Yes	No							0		0	305	#	Master	master-no-such-bin.000001	291	No						#
45
start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=710;
46 47 48 49 50
select * from t2;
n
1
2
show slave status;
51
Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master
52
#	127.0.0.1	root	MASTER_MYPORT	1	master-bin.000001	732	slave-relay-bin.000004	#	master-bin.000001	Yes	No							0		0	576	#	Relay	slave-relay-bin.000004	710	No						#
53 54
start slave;
stop slave;
55
start slave until master_log_file='master-bin.000001', master_log_pos=710;
56
show slave status;
57
Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master
58
#	127.0.0.1	root	MASTER_MYPORT	1	master-bin.000001	732	slave-relay-bin.000004	#	master-bin.000001	Yes	No							0		0	732	#	Master	master-bin.000001	710	No						#
59
start slave until master_log_file='master-bin', master_log_pos=561;
60
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
61
start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12;
62
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
63
start slave until master_log_file='master-bin.000001';
64
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
65
start slave until relay_log_file='slave-relay-bin.000002';
66
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
67
start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561;
68
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
69
start slave sql_thread;
70
start slave until master_log_file='master-bin.000001', master_log_pos=710;
71
Warnings:
monty@mysql.com's avatar
monty@mysql.com committed
72
Note	1254	Slave is already running