diff options
author | unknown <tnurnberg@sin.intern.azundris.com> | 2007-07-02 07:13:40 +0200 |
---|---|---|
committer | unknown <tnurnberg@sin.intern.azundris.com> | 2007-07-02 07:13:40 +0200 |
commit | 68e1f851ed1d41923da17b5bfafdd2ad4d94f24a (patch) | |
tree | 9f25f74747626e7fcb9c4fb1e1a336f08e189a60 | |
parent | 0b0cef486d6a35894ce21d7d4242205880700fad (diff) | |
download | mariadb-git-68e1f851ed1d41923da17b5bfafdd2ad4d94f24a.tar.gz |
Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB
minor fixes to appease pushbuild.
mysql-test/r/binlog.result:
Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB
make test portable so it will work on servers with
funny names.
mysql-test/t/binlog.test:
Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB
make test portable so it will work on servers with
funny names.
sql/log.cc:
Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB
change type to uchar * so it's the same as in 5.1.
-rw-r--r-- | mysql-test/r/binlog.result | 4 | ||||
-rw-r--r-- | mysql-test/t/binlog.test | 1 | ||||
-rw-r--r-- | sql/log.cc | 4 |
3 files changed, 5 insertions, 4 deletions
diff --git a/mysql-test/r/binlog.result b/mysql-test/r/binlog.result index 77b015a4688..aa5c6e88d65 100644 --- a/mysql-test/r/binlog.result +++ b/mysql-test/r/binlog.result @@ -256,7 +256,7 @@ reset master; create table t1 (a int) engine=innodb; 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 ver: 5.0.46-debug-log, Binlog ver: 4 +master-bin.000001 4 Format_desc 1 98 Server version, Binlog ver: 4 master-bin.000001 98 Query 1 198 use `test`; create table t1 (a int) engine=innodb master-bin.000001 198 Query 1 266 use `test`; BEGIN master-bin.000001 266 Query 1 357 use `test`; insert into t1 values( 400 ) @@ -659,7 +659,7 @@ master-bin.000001 36202 Query 1 36291 use `test`; insert into t1 values( 4 ) master-bin.000001 36291 Query 1 36380 use `test`; insert into t1 values( 3 ) master-bin.000001 36380 Query 1 36469 use `test`; insert into t1 values( 2 ) master-bin.000001 36469 Query 1 36558 use `test`; insert into t1 values( 1 ) -master-bin.000001 36558 Xid 1 36585 COMMIT /* xid=186 */ +master-bin.000001 36558 Xid 1 36585 COMMIT /* XID */ master-bin.000001 36585 Rotate 1 36629 master-bin.000002;pos=4 drop table t1; set global binlog_cache_size=@bcs; diff --git a/mysql-test/t/binlog.test b/mysql-test/t/binlog.test index d5479a45226..b9996a2b380 100644 --- a/mysql-test/t/binlog.test +++ b/mysql-test/t/binlog.test @@ -159,6 +159,7 @@ while ($1) commit; enable_query_log; +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/ show binlog events from 0; drop table t1; diff --git a/sql/log.cc b/sql/log.cc index 289d98e63d3..bcaf352f620 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -1951,14 +1951,14 @@ bool MYSQL_LOG::write(THD *thd, IO_CACHE *cache, Log_event *commit_event) { /* we've got a full event-header, and it came in one piece */ - char *log_pos= (char *)cache->read_pos + hdr_offs + LOG_POS_OFFSET; + uchar *log_pos= (uchar *)cache->read_pos + hdr_offs + LOG_POS_OFFSET; /* fix end_log_pos */ val= uint4korr(log_pos) + group; int4store(log_pos, val); /* next event header at ... */ - log_pos= (char *)cache->read_pos + hdr_offs + EVENT_LEN_OFFSET; + log_pos= (uchar *)cache->read_pos + hdr_offs + EVENT_LEN_OFFSET; hdr_offs += uint4korr(log_pos); } |