List:Commits« Previous MessageNext Message »
From:Tatjana A Nuernberg Date:February 12 2007 1:13pm
Subject:bk commit into 5.0 tree (tnurnberg:1.2408) BUG#22540
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of tnurnberg. When tnurnberg does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-02-12 14:13:05+01:00, tnurnberg@stripped +3 -0
  Bug #22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB
  
  fix output for SHOW BINLOG EVENTS so that end_log_pos is given correctly
  even within transactions. this is a purely cosmetic change and not required
  for correct operation.

  mysql-test/r/binlog.result@stripped, 2007-02-12 14:12:58+01:00, tnurnberg@stripped +39 -5
    Bug #22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB
    
    show that end_log_pos in SHOW BINLOG EVENTS is correct even in transactions.
    also remove bdb dependency.

  mysql-test/t/binlog.test@stripped, 2007-02-12 14:12:58+01:00, tnurnberg@stripped +29 -4
    Bug #22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB
    
    show that end_log_pos in SHOW BINLOG EVENTS is correct even in transactions.
    also remove bdb dependency.

  sql/sql_repl.cc@stripped, 2007-02-12 14:12:58+01:00, tnurnberg@stripped +6 -1
    Bug #22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB
    
    fix output for SHOW BINLOG EVENTS so that end_log_pos is given correctly even within
    transactions. do this by keeping track of non-transaction offsets and add them to
    transaction offsets as needed.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	tnurnberg
# Host:	sin.azundris.com
# Root:	/home/tnurnberg/22540/50-22540

--- 1.156/sql/sql_repl.cc	2007-01-29 14:32:08 +01:00
+++ 1.157/sql/sql_repl.cc	2007-02-12 14:12:58 +01:00
@@ -1376,9 +1376,14 @@
       goto err;
     }
 
-    for (event_count = 0;
+    for (event_count = 0, my_off_t prvs_pos = 0;
 	 (ev = Log_event::read_log_event(&log,(pthread_mutex_t*)0,description_event)); )
     {
+      if (ev->log_pos < prvs_pos)
+        ev->log_pos += prvs_pos;
+      else
+        prvs_pos = ev->log_pos;
+
       if (event_count >= limit_start &&
 	  ev->net_send(protocol, linfo.log_file_name, pos))
       {

--- 1.6/mysql-test/r/binlog.result	2006-05-12 18:58:42 +02:00
+++ 1.7/mysql-test/r/binlog.result	2007-02-12 14:12:58 +01:00
@@ -1,6 +1,6 @@
 drop table if exists t1, t2;
 reset master;
-create table t1 (a int) engine=bdb;
+create table t1 (a int) engine=innodb;
 create table t2 (a int) engine=innodb;
 begin;
 insert t1 values (5);
@@ -10,14 +10,14 @@
 commit;
 show binlog events from 98;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	1	#	use `test`; create table t1 (a int) engine=bdb
+master-bin.000001	#	Query	1	#	use `test`; create table t1 (a int) engine=innodb
 master-bin.000001	#	Query	1	#	use `test`; create table t2 (a int) engine=innodb
 master-bin.000001	#	Query	1	#	use `test`; BEGIN
 master-bin.000001	#	Query	1	#	use `test`; insert t1 values (5)
-master-bin.000001	#	Query	1	#	use `test`; COMMIT
+master-bin.000001	#	Xid	1	#	COMMIT /* XID */
 master-bin.000001	#	Query	1	#	use `test`; BEGIN
 master-bin.000001	#	Query	1	#	use `test`; insert t2 values (5)
-master-bin.000001	#	Xid	1	#	COMMIT /* xid=12 */
+master-bin.000001	#	Xid	1	#	COMMIT /* XID */
 drop table t1,t2;
 reset master;
 create table t1 (n int) engine=innodb;
@@ -128,8 +128,42 @@
 master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(3 + 4)
 master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(2 + 4)
 master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(1 + 4)
-master-bin.000001	#	Xid	1	#	COMMIT /* xid=19 */
+master-bin.000001	#	Xid	1	#	COMMIT /* XID */
 master-bin.000001	#	Rotate	1	#	master-bin.000002;pos=4
 show binlog events in 'master-bin.000002' from 98;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000002	#	Query	1	#	use `test`; drop table t1
+reset master;
+create table t1(n int) engine=innodb;
+begin;
+insert into t1 values (1);
+insert into t1 values (2);
+insert into t1 values (3);
+commit;
+drop table t1;
+show binlog events from 0;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	4	Format_desc	1	98	Server version, Binlog ver: 4
+master-bin.000001	98	Query	1	197	use `test`; create table t1(n int) engine=innodb
+master-bin.000001	197	Query	1	265	use `test`; BEGIN
+master-bin.000001	265	Query	1	353	use `test`; insert into t1 values (1)
+master-bin.000001	353	Query	1	441	use `test`; insert into t1 values (2)
+master-bin.000001	441	Query	1	529	use `test`; insert into t1 values (3)
+master-bin.000001	529	Xid	1	556	COMMIT /* XID */
+master-bin.000001	556	Query	1	632	use `test`; drop table t1
+reset master;
+create table t1(n int) engine=myisam;
+begin;
+insert into t1 values (4);
+insert into t1 values (5);
+insert into t1 values (6);
+commit;
+drop table t1;
+show binlog events from 0;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	4	Format_desc	1	98	Server version, Binlog ver: 4
+master-bin.000001	98	Query	1	197	use `test`; create table t1(n int) engine=myisam
+master-bin.000001	197	Query	1	285	use `test`; insert into t1 values (4)
+master-bin.000001	285	Query	1	373	use `test`; insert into t1 values (5)
+master-bin.000001	373	Query	1	461	use `test`; insert into t1 values (6)
+master-bin.000001	461	Query	1	537	use `test`; drop table t1

--- 1.7/mysql-test/t/binlog.test	2006-05-12 18:58:52 +02:00
+++ 1.8/mysql-test/t/binlog.test	2007-02-12 14:12:58 +01:00
@@ -2,7 +2,7 @@
 # misc binlogging tests that do not require a slave running
 #
 -- source include/not_embedded.inc
--- source include/have_bdb.inc
+# -- source include/have_bdb.inc
 -- source include/have_innodb.inc
 
 --disable_warnings
@@ -10,7 +10,7 @@
 --enable_warnings
 reset master;
 
-create table t1 (a int) engine=bdb;
+create table t1 (a int) engine=innodb;
 create table t2 (a int) engine=innodb;
 begin;
 insert t1 values (5);
@@ -19,7 +19,7 @@
 insert t2 values (5);
 commit;
 # first COMMIT must be Query_log_event, second - Xid_log_event
---replace_result "xid=21" "xid=12"
+--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
 --replace_column 2 # 5 #
 show binlog events from 98;
 drop table t1,t2;
@@ -41,9 +41,34 @@
 --enable_query_log
 commit;
 drop table t1;
---replace_result "xid=32" "xid=19"
+--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
 --replace_column 2 # 5 #
 show binlog events in 'master-bin.000001' from 98;
+--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
 --replace_column 2 # 5 #
 show binlog events in 'master-bin.000002' from 98;
 
+#
+# Bug#22540 - Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB
+#
+reset master;
+create table t1(n int) engine=innodb;
+begin;
+insert into t1 values (1);
+insert into t1 values (2);
+insert into t1 values (3);
+commit;
+drop table t1;
+--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
+show binlog events from 0;
+
+reset master;
+create table t1(n int) engine=myisam;
+begin;
+insert into t1 values (4);
+insert into t1 values (5);
+insert into t1 values (6);
+commit;
+drop table t1;
+--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
+show binlog events from 0;
Thread
bk commit into 5.0 tree (tnurnberg:1.2408) BUG#22540Tatjana A Nuernberg12 Feb