rpl_row_log_innodb.result 7.74 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
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;
create table t1(n int not null auto_increment primary key)ENGINE=InnoDB;
insert into t1 values (NULL);
drop table t1;
create table t1 (word char(20) not null)ENGINE=InnoDB;
jmiller@mysql.com's avatar
jmiller@mysql.com committed
15
load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines;
16 17 18 19 20 21 22
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
master-bin.000001	#	Query	1	#	use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB
23
master-bin.000001	#	Query	1	#	use `test`; BEGIN
24 25
master-bin.000001	#	Table_map	1	#	table_id: # (test.t1)
master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
26 27 28
master-bin.000001	#	Xid	1	#	COMMIT /* XID */
master-bin.000001	#	Query	1	#	use `test`; drop table t1
master-bin.000001	#	Query	1	#	use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB
29
master-bin.000001	#	Query	1	#	use `test`; BEGIN
30 31
master-bin.000001	#	Table_map	1	#	table_id: # (test.t1)
master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
32
master-bin.000001	#	Xid	1	#	COMMIT /* XID */
33
show binlog events from 106 limit 1;
34 35
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Query	1	#	use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB
36
show binlog events from 106 limit 2;
37 38
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Query	1	#	use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB
39
master-bin.000001	#	Query	1	#	use `test`; BEGIN
40
show binlog events from 106 limit 2,1;
41
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
42
master-bin.000001	#	Table_map	1	#	table_id: # (test.t1)
43
flush logs;
44
create table t3 (a int)ENGINE=InnoDB;
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
select * from t1 order by 1 asc;
word
Aarhus
Aaron
Aaron
Ababa
Ababa
aback
aback
abaft
abaft
abandon
abandon
abandoned
abandoned
abandoning
abandoning
abandonment
abandonment
abandons
abandons
abase
abased
abasement
abasements
abases
abash
abashed
abashes
abashing
abasing
abate
abated
abatement
abatements
abater
abates
abating
Abba
abbe
abbey
abbeys
abbot
abbots
Abbott
abbreviate
abbreviated
abbreviates
abbreviating
abbreviation
abbreviations
Abby
abdomen
abdomens
abdominal
abduct
abducted
abduction
abductions
abductor
abductors
abducts
Abe
abed
Abel
Abelian
Abelson
Aberdeen
Abernathy
aberrant
aberration
116
start slave;
117 118 119 120

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
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191
select * from t1 order by 1 asc;
word
Aarhus
Aaron
Aaron
Ababa
Ababa
aback
aback
abaft
abaft
abandon
abandon
abandoned
abandoned
abandoning
abandoning
abandonment
abandonment
abandons
abandons
abase
abased
abasement
abasements
abases
abash
abashed
abashes
abashing
abasing
abate
abated
abatement
abatements
abater
abates
abating
Abba
abbe
abbey
abbeys
abbot
abbots
Abbott
abbreviate
abbreviated
abbreviates
abbreviating
abbreviation
abbreviations
Abby
abdomen
abdomens
abdominal
abduct
abducted
abduction
abductions
abductor
abductors
abducts
Abe
abed
Abel
Abelian
Abelson
Aberdeen
Abernathy
aberrant
aberration
192 193
flush logs;
stop slave;
194 195
create table t2 (n int)ENGINE=InnoDB;
insert into t2 values (1);
196
show binlog events from <binlog_start>;
197
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
198
master-bin.000001	#	Query	#	#	use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB
199
master-bin.000001	#	Query	#	#	use `test`; BEGIN
200 201 202 203 204
master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
master-bin.000001	#	Xid	#	#	COMMIT /* XID */
master-bin.000001	#	Query	#	#	use `test`; drop table t1
master-bin.000001	#	Query	#	#	use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB
205
master-bin.000001	#	Query	#	#	use `test`; BEGIN
206 207 208 209
master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
master-bin.000001	#	Xid	#	#	COMMIT /* XID */
master-bin.000001	#	Rotate	#	#	master-bin.000002;pos=4
210 211 212
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
213 214
master-bin.000002	#	Query	1	#	use `test`; create table t3 (a int)ENGINE=InnoDB
master-bin.000002	#	Query	1	#	use `test`; create table t2 (n int)ENGINE=InnoDB
215
master-bin.000002	#	Query	1	#	use `test`; BEGIN
216
master-bin.000002	#	Table_map	1	#	table_id: # (test.t2)
217
master-bin.000002	#	Write_rows	1	#	table_id: # flags: STMT_END_F
218 219 220
master-bin.000002	#	Xid	1	#	COMMIT /* XID */
show binary logs;
Log_name	File_size
221 222
master-bin.000001	1456
master-bin.000002	474
223 224 225
start slave;
show binary logs;
Log_name	File_size
226 227
slave-bin.000001	1536
slave-bin.000002	366
228 229 230 231
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
slave-bin.000001	#	Query	1	#	use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB
232
slave-bin.000001	#	Query	1	#	BEGIN
233 234
slave-bin.000001	#	Table_map	1	#	table_id: # (test.t1)
slave-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
235 236 237
slave-bin.000001	#	Xid	1	#	COMMIT /* XID */
slave-bin.000001	#	Query	1	#	use `test`; drop table t1
slave-bin.000001	#	Query	1	#	use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB
238
slave-bin.000001	#	Query	1	#	BEGIN
239 240
slave-bin.000001	#	Table_map	1	#	table_id: # (test.t1)
slave-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
241
slave-bin.000001	#	Xid	1	#	COMMIT /* XID */
242
slave-bin.000001	#	Query	1	#	use `test`; create table t3 (a int)ENGINE=InnoDB
243 244 245 246
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
247
slave-bin.000002	#	Query	1	#	use `test`; create table t2 (n int)ENGINE=InnoDB
248
slave-bin.000002	#	Query	1	#	BEGIN
249
slave-bin.000002	#	Table_map	1	#	table_id: # (test.t2)
250
slave-bin.000002	#	Write_rows	1	#	table_id: # flags: STMT_END_F
251
slave-bin.000002	#	Xid	1	#	COMMIT /* XID */
252 253 254 255 256 257 258
SHOW SLAVE STATUS;
Slave_IO_State	#
Master_Host	127.0.0.1
Master_User	root
Master_Port	MASTER_PORT
Connect_Retry	1
Master_Log_File	master-bin.000002
259
Read_Master_Log_Pos	474
260 261 262 263 264 265 266 267 268 269 270 271 272 273
Relay_Log_File	#
Relay_Log_Pos	#
Relay_Master_Log_File	master-bin.000002
Slave_IO_Running	Yes
Slave_SQL_Running	Yes
Replicate_Do_DB	
Replicate_Ignore_DB	
Replicate_Do_Table	
Replicate_Ignore_Table	#
Replicate_Wild_Do_Table	
Replicate_Wild_Ignore_Table	
Last_Errno	0
Last_Error	
Skip_Counter	0
274
Exec_Master_Log_Pos	474
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290
Relay_Log_Space	#
Until_Condition	None
Until_Log_File	
Until_Log_Pos	0
Master_SSL_Allowed	No
Master_SSL_CA_File	
Master_SSL_CA_Path	
Master_SSL_Cert	
Master_SSL_Cipher	
Master_SSL_Key	
Seconds_Behind_Master	#
Master_SSL_Verify_Server_Cert	No
Last_IO_Errno	#
Last_IO_Error	#
Last_SQL_Errno	0
Last_SQL_Error	
291 292
show binlog events in 'slave-bin.000005' from 4;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
293 294 295
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
296 297 298 299 300
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());
301
show binlog events from <binlog_start>;
302
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
303
master-bin.000001	#	Query	#	#	use `test`; BEGIN
304 305
master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
306
master-bin.000001	#	Query	#	#	use `test`; COMMIT
307 308 309 310 311 312
select * from t1;
a	b
1	1
5	1
6	1
drop table t1;