Commit 2f63e2e2 authored by Monty's avatar Monty

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.
parent 78771189
This diff is collapsed.
......@@ -175,8 +175,8 @@ c2 VARCHAR(20)
BEGIN
/*!*/;
# at #
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
......@@ -191,8 +191,8 @@ BEGIN
### @1=3 /* INT meta=0 nullable=1 is_null=0 */
### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
# at #
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F
### UPDATE `test`.`t1`
### WHERE
......@@ -216,8 +216,8 @@ BEGIN
### @1=13 /* INT meta=0 nullable=1 is_null=0 */
### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
# at #
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F
### DELETE FROM `test`.`t1`
### WHERE
......@@ -248,8 +248,8 @@ TRUNCATE TABLE t1
BEGIN
/*!*/;
# at #
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
### INSERT INTO `test`.`t2`
### SET
......@@ -274,8 +274,8 @@ COMMIT
BEGIN
/*!*/;
# at #
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F
### UPDATE `test`.`t2`
### WHERE
......@@ -309,8 +309,8 @@ COMMIT
BEGIN
/*!*/;
# at #
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F
### DELETE FROM `test`.`t2`
### WHERE
......@@ -327,8 +327,8 @@ COMMIT
BEGIN
/*!*/;
# at #
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
......@@ -343,8 +343,8 @@ BEGIN
### @1=3 /* INT meta=0 nullable=1 is_null=0 */
### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
# at #
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F
### UPDATE `test`.`t1`
### WHERE
......@@ -368,8 +368,8 @@ BEGIN
### @1=13 /* INT meta=0 nullable=1 is_null=0 */
### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
# at #
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F
### DELETE FROM `test`.`t1`
### WHERE
......@@ -400,8 +400,8 @@ TRUNCATE TABLE t2
BEGIN
/*!*/;
# at #
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
### INSERT INTO `test`.`t2`
### SET
......@@ -426,8 +426,8 @@ COMMIT
BEGIN
/*!*/;
# at #
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F
### UPDATE `test`.`t2`
### WHERE
......@@ -461,8 +461,8 @@ COMMIT
BEGIN
/*!*/;
# at #
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F
### DELETE FROM `test`.`t2`
### WHERE
......
......@@ -65,8 +65,8 @@ CREATE TABLE t1 (a INT, b INT)
BEGIN
/*!*/;
# at #
# at #
#010909 4:46:40 server id # end_log_pos # Table_map: `new_test1`.`t1` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F
### INSERT INTO `new_test1`.`t1`
### SET
......@@ -96,8 +96,8 @@ CREATE TABLE t2 (a INT)
BEGIN
/*!*/;
# at #
# at #
#010909 4:46:40 server id # end_log_pos # Table_map: `test2`.`t2` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F
### INSERT INTO `test2`.`t2`
### SET
......@@ -116,8 +116,8 @@ COMMIT
BEGIN
/*!*/;
# at #
# at #
#010909 4:46:40 server id # end_log_pos # Table_map: `new_test1`.`t1` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Delete_rows: table id # flags: STMT_END_F
### DELETE FROM `new_test1`.`t1`
### WHERE
......@@ -143,8 +143,8 @@ CREATE TABLE t3 (a INT)
BEGIN
/*!*/;
# at #
# at #
#010909 4:46:40 server id # end_log_pos # Table_map: `new_test3`.`t3` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F
### INSERT INTO `new_test3`.`t3`
### SET
......@@ -163,8 +163,8 @@ COMMIT
BEGIN
/*!*/;
# at #
# at #
#010909 4:46:40 server id # end_log_pos # Table_map: `new_test1`.`t1` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F
### INSERT INTO `new_test1`.`t1`
### SET
......@@ -181,8 +181,8 @@ COMMIT
BEGIN
/*!*/;
# at #
# at #
#010909 4:46:40 server id # end_log_pos # Table_map: `new_test1`.`t1` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F
### INSERT INTO `new_test1`.`t1`
### SET
......@@ -215,8 +215,8 @@ COMMIT
BEGIN
/*!*/;
# at #
# at #
#010909 4:46:40 server id # end_log_pos # Table_map: `new_test3`.`t3` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Delete_rows: table id # flags: STMT_END_F
### DELETE FROM `new_test3`.`t3`
### WHERE
......@@ -277,8 +277,8 @@ CREATE TABLE t1 (a INT, b INT)
BEGIN
/*!*/;
# at #
# at #
#010909 4:46:40 server id # end_log_pos # Table_map: `new_test1`.`t1` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F
### INSERT INTO `new_test1`.`t1`
### SET
......@@ -308,8 +308,8 @@ CREATE TABLE t2 (a INT)
BEGIN
/*!*/;
# at #
# at #
#010909 4:46:40 server id # end_log_pos # Table_map: `test2`.`t2` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F
### INSERT INTO `test2`.`t2`
### SET
......@@ -328,8 +328,8 @@ COMMIT
BEGIN
/*!*/;
# at #
# at #
#010909 4:46:40 server id # end_log_pos # Table_map: `new_test1`.`t1` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Delete_rows: table id # flags: STMT_END_F
### DELETE FROM `new_test1`.`t1`
### WHERE
......@@ -355,8 +355,8 @@ CREATE TABLE t3 (a INT)
BEGIN
/*!*/;
# at #
# at #
#010909 4:46:40 server id # end_log_pos # Table_map: `new_test3`.`t3` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F
### INSERT INTO `new_test3`.`t3`
### SET
......@@ -375,8 +375,8 @@ COMMIT
BEGIN
/*!*/;
# at #
# at #
#010909 4:46:40 server id # end_log_pos # Table_map: `new_test1`.`t1` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F
### INSERT INTO `new_test1`.`t1`
### SET
......@@ -393,8 +393,8 @@ COMMIT
BEGIN
/*!*/;
# at #
# at #
#010909 4:46:40 server id # end_log_pos # Table_map: `new_test1`.`t1` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F
### INSERT INTO `new_test1`.`t1`
### SET
......@@ -427,8 +427,8 @@ COMMIT
BEGIN
/*!*/;
# at #
# at #
#010909 4:46:40 server id # end_log_pos # Table_map: `new_test3`.`t3` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Delete_rows: table id # flags: STMT_END_F
### DELETE FROM `new_test3`.`t3`
### WHERE
......
#
# 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;
This diff is collapsed.
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