1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

MDEV-8426 mysqlbinlog: "Corrupted replication event was detected.

Not printing the value" with binlog-row-image=minimal"

Merged Rows_log_event::print_verbose_one_row() and log_event_print_value()
with MySQL 5.7
Added flush after writing of Table_map_log_event() to fix wrong order of
lines in output. This causes a lot of changes in some test results.
This commit is contained in:
Monty
2015-11-10 13:40:15 +02:00
parent 78771189e7
commit 2f63e2e2a0
10 changed files with 1387 additions and 968 deletions

View File

@@ -0,0 +1,33 @@
#
# Test for minimal row format
#
--source include/have_log_bin.inc
--source include/have_binlog_format_row.inc
#
# MDEV-8426
# mysqlbinlog: "Corrupted replication event was detected. Not printing the
# value" with binlog-row-image=minimal
#
CREATE TABLE t1 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 TINYINT, f4 MEDIUMINT, f5 BIGINT, f6 INT, f7 INT, f8 char(1));
CREATE TABLE t2 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 INT, f4 INT, f5 MEDIUMINT, f6 INT, f7 INT, f8 char(1));
INSERT INTO t1 VALUES (10, 1, 2, 3, 4, 5, 6, 7, "");
INSERT INTO t1 VALUES (11, 1, 2, 3, 4, 5, 6, 7, NULL);
INSERT INTO t1 VALUES (12, 1, 2, 3, NULL, 5, 6, 7, "A");
INSERT INTO t1 VALUES (13, 1, 2, 3, 0, 5, 6, 7, "A");
INSERT INTO t2 SELECT * FROM t1;
UPDATE t2 SET f4=5 WHERE f4>0 or f4 is NULL;
DELETE FROM t1;
DELETE FROM t2;
--let $binlog = query_get_value(SHOW MASTER STATUS, File, 1)
--let $datadir = `SELECT @@datadir`
FLUSH BINARY LOGS;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--replace_regex /\d\d\d\d\d\d \d\d:\d\d:\d\d/<date>/ /Start:.*at startup/Start: xxx/ /SET TIMESTAMP=\d*/SET TIMESTAMP=X/
--exec $MYSQL_BINLOG --verbose --verbose --base64-output=DECODE-ROWS $datadir/$binlog
DROP TABLE t1,t2;