Commit 3f95d153 authored by tomas@poseidon.bredbandsbolaget.se's avatar tomas@poseidon.bredbandsbolaget.se
Browse files

correction of merge

parent f9a38a9e
Loading
Loading
Loading
Loading
+17 −4
Original line number Diff line number Diff line
@@ -50,17 +50,30 @@ insert into t1 values (1,2);
--echo

connection master;
# here is actually a bug, since there is no begin statement, the
# query is autocommitted, and end_pos shows end of the insert and not
# end of the commit
--echo # Now check that that is in the apply_status table is consistant
--echo # with what is in the binlog
--echo
--echo # since insert is done with transactional engine, expect a BEGIN
--echo # at <start_pos>
--echo
--replace_result $start_pos <start_pos>
--replace_column 5 #
--eval show binlog events from $start_pos limit 1

--echo
--echo # Now the insert, one step after
--echo
--replace_result $start_pos <start_pos>
--replace_column 5 #
--eval show binlog events from $start_pos limit 1,1

--echo
--echo # and the COMMIT should be at <end_pos>
--echo
--replace_result $start_pos <start_pos> $end_pos <end_pos>
--replace_column 2 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
--eval show binlog events from $start_pos limit 1,1
--eval show binlog events from $start_pos limit 2,1

--echo

+6 −3
Original line number Diff line number Diff line
@@ -137,8 +137,11 @@ our $opt_suites_default= "main,binlog,rpl,rpl_ndb,ndb"; # Default suites to run
our @extra_suites=
(
 ["mysql-5.1-new-ndb",         "ndb_team"],
 ["mysql-5.1-new-ndb-merge",   "ndb_team"],
 ["mysql-5.1-telco-6.2",       "ndb_team"],
 ["mysql-5.1-telco-6.2-merge", "ndb_team"],
 ["mysql-5.1-telco-6.3",       "ndb_team"],
 ["mysql-6.0-ndb",             "ndb_team"],
);


+2 −6
Original line number Diff line number Diff line
@@ -454,9 +454,7 @@ f1 f2 f3 f4
update t31 set f5=555555555555555 where f3=6;
update t31 set f2=2 where f3=2;
update t31 set f1=NULL where f3=1;
update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3;
Warnings:
Warning	1048	Column 'f3' cannot be null
update t31 set f3=0, f27=NULL, f35='f35 new value' where f3=3;

** Delete from Master **

@@ -1595,9 +1593,7 @@ f1 f2 f3 f4
update t31 set f5=555555555555555 where f3=6;
update t31 set f2=2 where f3=2;
update t31 set f1=NULL where f3=1;
update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3;
Warnings:
Warning	1048	Column 'f3' cannot be null
update t31 set f3=0, f27=NULL, f35='f35 new value' where f3=3;

** Delete from Master **

+16 −2
Original line number Diff line number Diff line
@@ -20,13 +20,27 @@ from mysql.ndb_apply_status;
@log_name:=log_name	@start_pos:=start_pos	@end_pos:=end_pos
<log_name>	<start_pos>	<end_pos>

# Now check that that is in the apply_status table is consistant
# with what is in the binlog

# since insert is done with transactional engine, expect a BEGIN
# at <start_pos>

show binlog events from <start_pos> limit 1;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	<start_pos>	Query	1	#	use `test`; insert into t1 values (1,2)
master-bin.000001	<start_pos>	Query	1	#	use `test`; BEGIN

# Now the insert, one step after

show binlog events from <start_pos> limit 1,1;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Xid	1	445	COMMIT /* XID */
master-bin.000001	397	Query	1	#	use `test`; insert into t1 values (1,2)

# and the COMMIT should be at <end_pos>

show binlog events from <start_pos> limit 2,1;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Xid	1	<end_pos>	COMMIT /* XID */

begin;
insert into t1 values (2,3);