rpl_ndb_log.result 8.03 KB
Newer Older
1 2 3 4 5 6
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;
7
include/stop_slave.inc
8 9
reset master;
reset slave;
10
start slave;
11 12 13 14
create table t1(n int not null auto_increment primary key)ENGINE=NDB;
insert into t1 values (NULL);
drop table t1;
create table t1 (word char(20) not null)ENGINE=NDB;
unknown's avatar
unknown committed
15
load data infile 'LOAD_FILE' into table t1 ignore 1 lines;
16 17 18
select count(*) from t1;
count(*)
69
19
show binlog events from <binlog_start>;
20
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
21 22 23 24 25 26 27
master-bin.000001	#	Query	#	#	use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB
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
28
master-bin.000001	#	Query	#	#	use `test`; DROP TABLE `t1` /* generated by server */
29 30 31 32 33 34 35 36
master-bin.000001	#	Query	#	#	use `test`; create table t1 (word char(20) not null)ENGINE=NDB
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
show binlog events from <binlog_start> limit 1;
37
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
38 39
master-bin.000001	#	Query	#	#	use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB
show binlog events from <binlog_start> limit 2;
40
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
41 42
master-bin.000001	#	Query	#	#	use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB
master-bin.000001	#	Query	#	#	BEGIN
unknown's avatar
unknown committed
43
show binlog events from <binlog_start> limit 1,4;
44
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
unknown's avatar
unknown committed
45
master-bin.000001	#	Query	#	#	BEGIN
46
master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
unknown's avatar
unknown committed
47 48
master-bin.000001	#	Table_map	#	#	table_id: # (mysql.ndb_apply_status)
master-bin.000001	#	Write_rows	#	#	table_id: #
49
flush logs;
unknown's avatar
unknown committed
50
create table t3 (a int)ENGINE=NDB;
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 116 117 118 119 120 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 192
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
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
193
flush logs;
194 195
include/stop_slave.inc
include/start_slave.inc
unknown's avatar
unknown committed
196 197
create table t2 (n int)ENGINE=NDB;
insert into t2 values (1);
unknown's avatar
unknown committed
198
show binlog events from <binlog_start>;
199
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
unknown's avatar
unknown committed
200 201 202 203 204 205 206
master-bin.000001	#	Query	#	#	use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB
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
207
master-bin.000001	#	Query	#	#	use `test`; DROP TABLE `t1` /* generated by server */
unknown's avatar
unknown committed
208 209 210 211 212 213 214 215
master-bin.000001	#	Query	#	#	use `test`; create table t1 (word char(20) not null)ENGINE=NDB
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
master-bin.000001	#	Rotate	#	#	master-bin.000002;pos=4
216
show binlog events in 'master-bin.000002' from <binlog_start>;
217
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
218 219 220 221 222 223 224 225
master-bin.000002	#	Query	#	#	use `test`; create table t3 (a int)ENGINE=NDB
master-bin.000002	#	Query	#	#	use `test`; create table t2 (n int)ENGINE=NDB
master-bin.000002	#	Query	#	#	BEGIN
master-bin.000002	#	Table_map	#	#	table_id: # (test.t2)
master-bin.000002	#	Table_map	#	#	table_id: # (mysql.ndb_apply_status)
master-bin.000002	#	Write_rows	#	#	table_id: #
master-bin.000002	#	Write_rows	#	#	table_id: # flags: STMT_END_F
master-bin.000002	#	Query	#	#	COMMIT
226 227
show binary logs;
Log_name	File_size
228 229
master-bin.000001	#
master-bin.000002	#
230 231
show binary logs;
Log_name	File_size
232 233
slave-bin.000001	#
slave-bin.000002	#
234
show binlog events from <binlog_start>;
235
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
236 237 238 239 240 241 242
slave-bin.000001	#	Query	#	#	use `test`; create table t1(n int not null auto_increment primary key)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
243
slave-bin.000001	#	Query	#	#	use `test`; DROP TABLE `t1` /* generated by server */
244 245 246 247 248 249 250 251 252 253
slave-bin.000001	#	Query	#	#	use `test`; create table t1 (word char(20) not null)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	#	#	use `test`; create table t3 (a int)ENGINE=NDB
slave-bin.000001	#	Rotate	#	#	slave-bin.000002;pos=4
show binlog events in 'slave-bin.000002' from <binlog_start>;
254
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
255 256 257 258 259 260 261 262
slave-bin.000002	#	Query	#	#	use `test`; create table t2 (n int)ENGINE=NDB
slave-bin.000002	#	Query	#	#	BEGIN
slave-bin.000002	#	Table_map	#	#	table_id: # (test.t2)
slave-bin.000002	#	Table_map	#	#	table_id: # (mysql.ndb_apply_status)
slave-bin.000002	#	Write_rows	#	#	table_id: #
slave-bin.000002	#	Write_rows	#	#	table_id: # flags: STMT_END_F
slave-bin.000002	#	Query	#	#	COMMIT
Checking that both slave threads are running.
263 264
show binlog events in 'slave-bin.000005' from 4;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
unknown's avatar
unknown committed
265 266 267
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
268 269 270 271 272 273
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;
unknown's avatar
unknown committed
274 275 276 277
create table t1(a int auto_increment primary key, b int);
insert into t1 values (NULL, 1);
set insert_id=5;
insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id());
unknown's avatar
unknown committed
278
show binlog events from <binlog_start>;
unknown's avatar
unknown committed
279
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
280
master-bin.000001	#	Query	#	#	use `test`; create table t1(a int auto_increment primary key, b int)
281
master-bin.000001	#	Query	#	#	BEGIN
282 283
master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
284 285
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Query	#	#	BEGIN
unknown's avatar
unknown committed
286 287
master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
288
master-bin.000001	#	Query	#	#	COMMIT
unknown's avatar
unknown committed
289 290 291 292 293 294
select * from t1;
a	b
1	1
5	1
6	1
drop table t1;