Commit 68e1f851 authored by unknown's avatar unknown

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.
parent 0b0cef48
......@@ -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;
......
......@@ -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;
......
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment