diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2015-06-24 07:16:08 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2015-06-24 07:16:08 +0300 |
commit | 2e4984c185ddcd2da789017cd147338846ff409a (patch) | |
tree | 0293831900c860600efbaa747ea886d9d1cbf5bd /mysql-test/suite/innodb/t/binlog_consistent.test | |
parent | 792b53e80806df893ee62c9a1c1bd117114c8c6d (diff) | |
parent | a6087e7dc1ef3561d8189c8db15e9591d0f9b520 (diff) | |
download | mariadb-git-10.0-FusionIO.tar.gz |
Merge tag 'mariadb-10.0.20' into 10.0-FusionIO10.0-FusionIO
Conflicts:
storage/innobase/os/os0file.cc
storage/xtradb/os/os0file.cc
storage/xtradb/srv/srv0start.cc
Diffstat (limited to 'mysql-test/suite/innodb/t/binlog_consistent.test')
-rw-r--r-- | mysql-test/suite/innodb/t/binlog_consistent.test | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/mysql-test/suite/innodb/t/binlog_consistent.test b/mysql-test/suite/innodb/t/binlog_consistent.test index 20023871093..a97bef4cf38 100644 --- a/mysql-test/suite/innodb/t/binlog_consistent.test +++ b/mysql-test/suite/innodb/t/binlog_consistent.test @@ -86,4 +86,36 @@ SHOW MASTER STATUS; --replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/ SHOW BINLOG EVENTS; -DROP TABLE t1,t2; + +--echo *** MDEV-7310: last_commit_pos_offset set to wrong value after binlog rotate in group commit *** + +SET @old_size= @@GLOBAL.max_binlog_size; +SET GLOBAL max_binlog_size=4096; + +CREATE TABLE t3 (a INT PRIMARY KEY, b VARBINARY(8192)) ENGINE=MyISAM; +INSERT INTO t3 VALUES (10, ''); +--let $bigdata= `SELECT REPEAT('a', 5000)` +eval INSERT INTO t3 VALUES (11, '$bigdata'); + +# The bug was that binlog_snapshot_file pointed to the new file after binlog +# rotation, but binlog_snapshot_position was the offset in the old file before +# binlog rotation. So the position was invalid. +# So here, we check that the values are consistent with SHOW MASTER STATUS, +# which uses a different code path and did not have the bug. + +--source include/wait_for_binlog_checkpoint.inc +--let $snap_file= query_get_value(SHOW STATUS LIKE 'binlog_snapshot_file', Value, 1) +--let $snap_pos= query_get_value(SHOW STATUS LIKE 'binlog_snapshot_position', Value, 1) + +--let $master_file= query_get_value(SHOW MASTER STATUS, File, 1) +--let $master_pos= query_get_value(SHOW MASTER STATUS, Position, 1) + +--disable_query_log +eval SET @errmsg= 'ERROR: ($snap_file, $snap_pos) != ($master_file, $master_pos)'; +eval SELECT IF('$snap_file' = '$master_file' AND $snap_pos = $master_pos, 'OK', @errmsg) AS test_result; +--enable_query_log + +SET GLOBAL max_binlog_size=@old_size; + + +DROP TABLE t1,t2, t3; |