Commit fb9e8ed5 authored by mkindahl@dl145h.mysql.com's avatar mkindahl@dl145h.mysql.com
Browse files

Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.0

into  dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl-merge
parents f13f6eaf 6c8a0887
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--replace_column 2 #
show binary logs;
+9 −3
Original line number Diff line number Diff line
--let $binlog_start=98
--replace_column 5 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\//
# $binlog_start can be set by caller or take a default value

if (!$binlog_start)
{
  let $binlog_start=98;
}
--replace_result $binlog_start <binlog_start>
--replace_column 2 # 4 # 5 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /file_id=[0-9]+/file_id=#/
--eval show binlog events from $binlog_start
+39 −0
Original line number Diff line number Diff line
flush logs;
flush logs;
flush logs;
show binary logs;
Log_name	File_size
master-bin.000001	#
master-bin.000002	#
master-bin.000003	#
master-bin.000004	#
purge binary logs TO 'master-bin.000004';
Warnings:
Warning	1476	Being purged log MYSQLTEST_VARDIR/log/master-bin.000001 was not found
*** must show a list starting from the 'TO' argument of PURGE ***
show binary logs;
Log_name	File_size
master-bin.000004	#
reset master;
flush logs;
flush logs;
flush logs;
*** must be a warning master-bin.000001 was not found ***
Warnings:
Warning	1476	Being purged log MYSQLTEST_VARDIR/log/master-bin.000001 was not found
*** must show one record, of the active binlog, left in the index file after PURGE ***
show binary logs;
Log_name	File_size
master-bin.000004	#
reset master;
flush logs;
flush logs;
flush logs;
purge binary logs TO 'master-bin.000002';
ERROR HY000: Fatal error during log purge
show warnings;
Level	Code	Message
Error	1377	a problem with deleting MYSQLTEST_VARDIR/log/master-bin.000001; consider examining correspondence of your binlog index file to the actual binlog files
Error	1377	Fatal error during log purge
reset master;
End of tests
+3 −3
Original line number Diff line number Diff line
@@ -16,10 +16,10 @@ create table t2 (a int, b int) ENGINE=MyISAM;
reset master;
load data infile '../std_data_ln/rpl_loaddata.dat' into table t2 /* will be "killed" in the middle */;
ERROR 70100: Query execution was interrupted
show binlog events from 98;
show binlog events from <binlog_start>;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	98	Begin_load_query	1	#	;file_id=1;block_len=12
master-bin.000001	133	Execute_load_query	1	#	use `test`; load data infile '../std_data_ln/rpl_loaddata.dat' into table t2 /* will be "killed" in the middle */ ;file_id=1
master-bin.000001	#	Begin_load_query	#	#	;file_id=#;block_len=12
master-bin.000001	#	Execute_load_query	#	#	use `test`; load data infile '../std_data_ln/rpl_loaddata.dat' into table t2 /* will be "killed" in the middle */ ;file_id=#
select
(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
is not null;
+17 −0
Original line number Diff line number Diff line
@@ -138,3 +138,20 @@ ALTER TABLE t1 DROP INDEX a;
ALTER TABLE t1 ADD PRIMARY KEY(a);
DELETE FROM t1 WHERE a=10;
DROP TABLE t1;
reset master;
create table t1 (a int auto_increment, primary key (a)) engine=blackhole;
insert into t1 values (11), (NULL), (NULL), (NULL);
set insert_id= 3;
insert into t1 values (NULL), (33), (NULL);
set insert_id= 5;
insert into t1 values (55), (NULL);
show binlog events from <binlog_start>;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Query	1	#	use `test`; create table t1 (a int auto_increment, primary key (a)) engine=blackhole
master-bin.000001	#	Intvar	1	#	INSERT_ID=1
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values (11), (NULL), (NULL), (NULL)
master-bin.000001	#	Intvar	1	#	INSERT_ID=3
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values (NULL), (33), (NULL)
master-bin.000001	#	Intvar	1	#	INSERT_ID=5
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values (55), (NULL)
drop table t1;
Loading