rpl_row_log.result 5.69 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
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;
reset master;
reset slave;
reset master;
11
create table t1(n int not null auto_increment primary key)ENGINE=MyISAM;
12 13
insert into t1 values (NULL);
drop table t1;
14
create table t1 (word char(20) not null)ENGINE=MyISAM;
15
load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines;
16 17 18 19 20 21
select count(*) from t1;
count(*)
69
show binlog events;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Format_desc	1	#	Server ver: VERSION, Binlog ver: 4
22
master-bin.000001	#	Query	1	#	use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
23 24
master-bin.000001	#	Table_map	1	#	table_id: # (test.t1)
master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
25
master-bin.000001	#	Query	1	#	use `test`; drop table t1
26
master-bin.000001	#	Query	1	#	use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
27 28
master-bin.000001	#	Table_map	1	#	table_id: # (test.t1)
master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
29
show binlog events from 106 limit 1;
30
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
31
master-bin.000001	#	Query	1	#	use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
32
show binlog events from 106 limit 2;
33
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
34
master-bin.000001	#	Query	1	#	use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
35
master-bin.000001	#	Table_map	1	#	table_id: # (test.t1)
36
show binlog events from 106 limit 2,1;
37
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
38
master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
39
flush logs;
40
create table t3 (a int)ENGINE=MyISAM;
41
start slave;
42 43 44 45

let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%' ;

--source include/wait_slave_status.inc
46 47
flush logs;
stop slave;
48 49
create table t2 (n int)ENGINE=MyISAM;
insert into t2 values (1);
50
show binlog events from <binlog_start>;
51
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
52 53 54 55 56 57 58 59
master-bin.000001	#	Query	#	#	use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
master-bin.000001	#	Query	#	#	use `test`; drop table t1
master-bin.000001	#	Query	#	#	use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
master-bin.000001	#	Rotate	#	#	master-bin.000002;pos=4
60 61 62
show binlog events in 'master-bin.000002';
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000002	#	Format_desc	1	#	Server ver: VERSION, Binlog ver: 4
63 64 65
master-bin.000002	#	Query	1	#	use `test`; create table t3 (a int)ENGINE=MyISAM
master-bin.000002	#	Query	1	#	use `test`; create table t2 (n int)ENGINE=MyISAM
master-bin.000002	#	Table_map	1	#	table_id: # (test.t2)
66
master-bin.000002	#	Write_rows	1	#	table_id: # flags: STMT_END_F
67 68
show binary logs;
Log_name	File_size
69 70
master-bin.000001	1260
master-bin.000002	377
71 72 73
start slave;
show binary logs;
Log_name	File_size
74 75
slave-bin.000001	1358
slave-bin.000002	278
76 77 78
show binlog events in 'slave-bin.000001' from 4;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
slave-bin.000001	#	Format_desc	2	#	Server ver: VERSION, Binlog ver: 4
79
slave-bin.000001	#	Query	1	#	use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
80 81
slave-bin.000001	#	Table_map	1	#	table_id: # (test.t1)
slave-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
82
slave-bin.000001	#	Query	1	#	use `test`; drop table t1
83
slave-bin.000001	#	Query	1	#	use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
84 85
slave-bin.000001	#	Table_map	1	#	table_id: # (test.t1)
slave-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
86
slave-bin.000001	#	Query	1	#	use `test`; create table t3 (a int)ENGINE=MyISAM
87 88 89 90
slave-bin.000001	#	Rotate	2	#	slave-bin.000002;pos=4
show binlog events in 'slave-bin.000002' from 4;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
slave-bin.000002	#	Format_desc	2	#	Server ver: VERSION, Binlog ver: 4
91 92
slave-bin.000002	#	Query	1	#	use `test`; create table t2 (n int)ENGINE=MyISAM
slave-bin.000002	#	Table_map	1	#	table_id: # (test.t2)
93
slave-bin.000002	#	Write_rows	1	#	table_id: # flags: STMT_END_F
94 95
show slave status;
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
96
#	127.0.0.1	root	MASTER_PORT	1	master-bin.000002	377	#	#	master-bin.000002	Yes	Yes				#			0		0	377	#	None		0	No						#
97 98
show binlog events in 'slave-bin.000005' from 4;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
99 100 101
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
102 103 104 105 106
create table t1(a int auto_increment primary key, b int);
insert into t1 values (NULL, 1);
reset master;
set insert_id=5;
insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id());
107
show binlog events from <binlog_start>;
108
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
109 110
master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
111 112 113 114 115 116
select * from t1;
a	b
1	1
5	1
6	1
drop table t1;