mariadb/mysql-test/suite
Andrei Elkin caa35f8e25 MDEV-16372 ER_BASE64_DECODE_ERROR upon replaying binary log via mysqlbinlog --verbose
(This commit is for 10.3 and upper branches)

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,
and to 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.
2020-08-31 18:38:57 +03:00
..
archive Merge branch '10.2' into 10.3 2019-09-03 13:17:32 +03:00
binlog MDEV-16372 ER_BASE64_DECODE_ERROR upon replaying binary log via mysqlbinlog --verbose 2020-08-31 18:38:57 +03:00
binlog_encryption MDEV-16372 ER_BASE64_DECODE_ERROR upon replaying binary log via mysqlbinlog --verbose 2020-08-31 18:38:57 +03:00
compat MDEV-19632 Replication aborts with ER_SLAVE_CONVERSION_FAILED upon CREATE ... SELECT in ORACLE mode 2020-08-01 07:43:50 +04:00
csv Fixed errors found by MSAN 2020-07-02 23:50:56 +03:00
encryption MDEV-23511 shutdown_server 10 times out, causing server kill at shutdown 2020-08-21 14:48:53 +03:00
engines Merge branch '10.2' into 10.3 2020-08-03 13:41:29 +02:00
federated MDEV-16937 Strict SQL with system versioned tables causes issues 2020-05-28 22:22:20 +03:00
funcs_1 Merge 10.2 into 10.3 2020-07-02 06:17:51 +03:00
funcs_2 Merge 10.2 into 10.3 2020-07-02 06:17:51 +03:00
galera Merge 10.2 into 10.3 2020-08-26 10:45:47 +03:00
galera_3nodes Merge 10.2 into 10.3 2020-08-26 10:45:47 +03:00
gcol Merge 10.2 into 10.3 2020-07-31 13:51:28 +03:00
handler
heap Merge 10.2 into 10.3 2020-04-15 09:56:03 +03:00
innodb Merge 10.2 into 10.3 2020-08-26 10:45:47 +03:00
innodb_fts Merge 10.2 into 10.3 2020-07-02 06:17:51 +03:00
innodb_gis Merge 10.2 into 10.3 2020-04-28 22:29:13 +03:00
innodb_zip Merge 10.2 into 10.3 2020-04-15 09:56:03 +03:00
jp
json MDEV-19628 JSON with starting double quotes key is not valid. 2019-09-30 14:43:32 +04:00
large_tests
maria Merge branch '10.2' into 10.3 2020-08-03 13:41:29 +02:00
mariabackup Merge 10.2 into 10.3 2020-07-14 22:59:19 +03:00
mtr/t
mtr2
multi_source Merge 10.2 into 10.3 2020-08-21 19:18:34 +03:00
optimizer_unfixed_bugs MDEV-21360 global debug_dbug pre-test value restoration issues 2020-01-15 18:06:24 +01:00
parts Merge branch '10.2' into 10.3 2020-08-03 13:41:29 +02:00
perfschema MDEV-20076: SHOW GRANTS does not quote role names properly 2020-02-05 17:22:26 +01:00
perfschema_stress Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
plugins Merge 10.2 into 10.3 2020-07-31 13:51:28 +03:00
roles Merge 10.2 into 10.3 2020-08-21 19:18:34 +03:00
rpl Merge 10.2 into 10.3 2020-08-21 19:18:34 +03:00
sql_sequence MDEV-16929 Assertion ... in close_thread_tables upon killing connection 2020-07-21 15:12:53 +03:00
storage_engine Merge 10.2 into 10.3 2020-08-21 19:18:34 +03:00
stress MDEV-22339 - Assertion `str_length < len' failed 2020-06-04 23:52:10 +02:00
sys_vars Merge 10.2 into 10.3 2020-08-26 10:45:47 +03:00
unit
vcol Merge branch '10.2' into 10.3 2020-08-03 13:41:29 +02:00
versioning MDEV-16023 Unfortunate error message WARN_VERS_PART_FULL (partition <name> is full) when rotation time for the last interval passed 2020-07-29 14:32:07 +10:00
wsrep Merge 10.2 into 10.3 2020-08-20 09:12:16 +03:00