1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-29 00:08:14 +03:00
Files
mariadb/mysql-test/r
Andrei Elkin feac078f15 MDEV-16372 ER_BASE64_DECODE_ERROR upon replaying binary log via mysqlbinlog --verbose
(This commit is exclusively for 10.1 branch, do not merge it to upper ones)

In case of a pattern of non-STMT_END-marked Rows-log-event (A) followed by
a STMT_END marked one (B) mysqlbinlog mixes up the base64 encoded rows events
with their pseudo sql representation produced by the verbose option:
      BINLOG '
        base64 encoded data for A
        ### verbose section for A
        base64 encoded data for B
        ### verbose section for B
      '/*!*/;
In effect the produced BINLOG '...' query is not valid and is rejected with the error.
Examples of this way malformed BINLOG could have been found in binlog_row_annotate.result
that gets corrected with the patch.

The issue is fixed with introduction an auxiliary IO_CACHE to hold on the verbose
comments until the terminal STMT_END event is found. The new cache is emptied
out after two pre-existing ones are done at that time.
The correctly produced output now for the above case is as the following:
      BINLOG '
        base64 encoded data for A
        base64 encoded data for B
      '/*!*/;
        ### verbose section for A
        ### verbose section for B

Thanks to Alexey Midenkov for the problem recognition and attempt to tackle,
Venkatesh Duggirala who produced a patch for the upstream whose
idea is exploited here, as well as to MDEV-23077 reporter LukeXwang who
also contributed a piece of a patch aiming at this issue.

Extra: mysqlbinlog_row_minimal refined to not produce mutable numeric values into the result file.
2020-08-31 18:45:14 +03:00
..
2019-03-12 13:10:49 +01:00
2018-05-07 17:19:35 +02:00
2018-11-15 17:20:26 +01:00
2017-10-22 13:03:41 +02:00
2018-09-10 16:47:44 +04:00
2016-05-30 16:56:29 +04:00
2016-12-11 09:53:42 +01:00
2019-07-25 13:27:11 +02:00
2019-10-11 15:19:55 +03:00
2017-10-22 13:03:41 +02:00
2015-10-12 00:37:58 +02:00
2017-10-22 13:03:41 +02:00
2017-12-20 13:30:05 +02:00
2019-04-27 11:28:50 +02:00
2019-04-27 11:28:50 +02:00
2019-04-26 14:02:37 +02:00
2020-01-03 22:54:28 +05:30
2016-06-28 22:01:55 +02:00
2020-04-01 10:24:36 +03:00
2017-09-21 22:02:21 +02:00
2019-06-20 12:26:01 +03:00
2019-06-20 12:26:01 +03:00
2019-08-20 07:31:44 +03:00
2016-12-11 09:53:42 +01:00
2018-06-12 18:55:27 +03:00
2019-03-01 15:52:06 +01:00
2017-08-08 10:18:43 +02:00
2016-06-21 14:11:02 +02:00
2019-10-11 15:19:55 +03:00
2019-06-12 22:54:46 +02:00
2019-04-24 11:15:38 +02:00
2017-04-28 20:19:32 +02:00
2019-03-27 11:56:08 +02:00
2018-06-10 17:16:27 +03:00
2017-06-30 13:28:39 +02:00
2016-11-02 08:20:15 +04:00
2018-04-07 17:11:22 +03:00
2019-07-26 13:33:51 +02:00
2019-07-25 13:27:11 +02:00
2019-07-25 13:27:11 +02:00
2020-04-01 10:24:36 +03:00
2020-04-14 15:43:12 +03:00
2020-04-14 15:43:12 +03:00
2018-12-29 23:44:45 +01:00
2019-07-01 13:15:20 +03:00
2016-06-02 15:19:52 +03:00
2019-10-11 15:19:55 +03:00
2018-04-24 09:26:40 +03:00
2015-08-04 23:40:25 +02:00
2018-04-29 00:38:10 +02:00
2016-08-25 12:40:09 +02:00
2017-10-22 13:03:41 +02:00
2019-02-02 13:00:15 +02:00
2017-04-28 20:19:32 +02:00
2019-07-25 13:27:11 +02:00
2017-03-09 08:53:08 +02:00
2017-10-22 13:03:41 +02:00
2016-09-27 09:21:19 +02:00
2019-01-17 06:40:24 +02:00
2019-07-25 13:27:11 +02:00
2019-04-26 14:02:37 +02:00
2019-07-25 13:27:11 +02:00