1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

test cleanup: remove Format_description_log_event size dependency

1. use include/show_binlog_events.inc instead of SHOW BINLOG EVENTS
2. use include/show_relaylog_eventc.inc too
3. in all other places where a number might appear in the result
   file, include binlog_start_pos.inc, calculate the position
   like pos=`select $binlog_start_pos + 100`; and use
   replace_result $pos <pos>
This commit is contained in:
Sergei Golubchik
2015-08-21 23:20:35 +02:00
parent 8aa473c4b9
commit 55d7871f98
25 changed files with 221 additions and 180 deletions

View File

@ -1,6 +1,7 @@
--source include/have_innodb.inc
--source include/have_log_bin.inc
--source include/have_binlog_format_mixed_or_statement.inc
--source include/binlog_start_pos.inc
RESET MASTER;
@ -16,7 +17,10 @@ connection default;
--echo # Connection default
CREATE TABLE t1 (a INT, b VARCHAR(100), PRIMARY KEY (a,b)) ENGINE=innodb;
let pos=`select $binlog_start_pos + 238`;
--replace_result $pos <pos>
SHOW MASTER STATUS;
--replace_result $pos <pos>
SHOW STATUS LIKE 'binlog_snapshot_%';
BEGIN;
INSERT INTO t1 VALUES (0, "");
@ -56,7 +60,11 @@ COMMIT;
connection default;
--echo # Connection default
SELECT * FROM t1 ORDER BY a,b;
let pos=`select $binlog_start_pos + 740`;
--replace_result $pos <pos>
SHOW STATUS LIKE 'binlog_snapshot_%';
let pos=`select $binlog_start_pos + 1092`;
--replace_result $pos <pos>
SHOW MASTER STATUS;
SELECT * FROM t2 ORDER BY a;
@ -77,14 +85,19 @@ FLUSH LOGS;
connection default;
--echo # Connection default
SELECT * FROM t1 ORDER BY a,b;
let pos=`select $binlog_start_pos + 740`;
--replace_result $pos <pos>
SHOW STATUS LIKE 'binlog_snapshot_%';
let pos=`select $binlog_start_pos + 119`;
--replace_result $pos <pos>
SHOW MASTER STATUS;
COMMIT;
--replace_result $pos <pos>
SHOW STATUS LIKE 'binlog_snapshot_%';
--replace_result $pos <pos>
SHOW MASTER STATUS;
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
SHOW BINLOG EVENTS;
source include/show_binlog_events.inc;
--echo *** MDEV-7310: last_commit_pos_offset set to wrong value after binlog rotate in group commit ***