mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Bug#17642 mysqlbinlog: Restore from row-based binlog fails
Problem: mysqlbinlog_base64 failed sporadically. Reason: Missing "flush logs" before running $MYSQL_BINLOG, which could start dumping the log file before server has finished writting into it. Fix: - implementing --force-if-open option to "mysqlbinlog" - adding --disable-force-if-open to make $MYSQL_BINLOG fail on non-closed log files, to garantee that nobody will forget "flush logs" in the future. - adding "flush logs" into all affected tests.
This commit is contained in:
parent
bd8cf7a134
commit
ba6529d7dd
@@ -133,6 +133,7 @@ flush logs;
|
||||
# resulted binlog, parly consisting of multi-byte utf8 chars,
|
||||
# must be digestable for both client and server. In 4.1 the client
|
||||
# should use default-character-set same as the server.
|
||||
flush logs;
|
||||
--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000006 | $MYSQL
|
||||
select * from t5 /* must be (1),(1) */;
|
||||
|
||||
@@ -155,8 +156,8 @@ call p1();
|
||||
drop procedure p1;
|
||||
--error 1305
|
||||
call p1();
|
||||
--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000007
|
||||
--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000007 | $MYSQL
|
||||
--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000008
|
||||
--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000008 | $MYSQL
|
||||
call p1();
|
||||
drop procedure p1;
|
||||
|
||||
@@ -164,3 +165,13 @@ drop procedure p1;
|
||||
drop table t1, t2, t03, t04, t3, t4, t5;
|
||||
|
||||
# End of 5.0 tests
|
||||
|
||||
#
|
||||
# Test --disable-force-if-open and --force-if-open
|
||||
#
|
||||
flush logs;
|
||||
--error 1
|
||||
--exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000010 >/dev/null 2>/dev/null
|
||||
--exec $MYSQL_BINLOG --force-if-open $MYSQLTEST_VARDIR/log/master-bin.000010 >/dev/null 2>/dev/null
|
||||
|
||||
# End of 5.1 tests
|
||||
|
||||
Reference in New Issue
Block a user