mariadb/mysql-test/suite/binlog/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
..
binlog_base64_flag.result MDEV-10963 Fragmented BINLOG query 2019-01-24 20:44:50 +02:00
binlog_bug23533.result
binlog_bug36391.result
binlog_checkpoint.result MDEV-7402 'reset master' hangs, waits for signalled COND_xid_list 2015-01-19 14:32:28 +01:00
binlog_checksum.result Merge 10.0-base -> 10.0 (GTID). 2013-04-17 15:17:01 +02:00
binlog_commit_wait.result MDEV-7802: group commit status variable addition 2015-04-29 11:29:25 +02:00
binlog_database.result Don't write DROP TEMPORARY TABLE to binary log 2015-10-05 17:14:13 +02:00
binlog_delete_and_flush_index.result Merge 10.0-base -> 10.0 (GTID). 2013-04-17 15:17:01 +02:00
binlog_dmls_on_tmp_tables_readonly.result Merge branch '10.0' into 10.1 2016-08-25 12:40:09 +02:00
binlog_drop_if_exists.result Merge 10.0-base -> 10.0 (GTID). 2013-04-17 15:17:01 +02:00
binlog_flush_binlogs_delete_domain.result MDEV-14431 binlog.binlog_flush_binlogs_delete_domain failed in buildbot 2018-10-16 12:42:57 +03:00
binlog_format_switch_in_tmp_table.result
binlog_grant.result MDEV-6066: Merge new defaults from 5.6 and 5.7 (defaults changed, QC can be stopped with no-zero size) 2015-09-04 10:33:56 +02:00
binlog_gtid_delete_domain_debug.result never add new error messages to old GA releases! 2017-11-19 14:43:17 +01:00
binlog_implicit_commit.result MDEV-5115 RBR from MySQL 5.6 to MariaDB 10.0 does not work 2013-12-09 12:37:45 +01:00
binlog_incident.result
binlog_index.result Merge branch '5.5' into 10.0 2016-12-09 16:33:48 +01:00
binlog_innodb.result MDEV-5115 RBR from MySQL 5.6 to MariaDB 10.0 does not work 2013-12-09 12:37:45 +01:00
binlog_innodb_row.result Don't write DROP TEMPORARY TABLE to binary log 2015-10-05 17:14:13 +02:00
binlog_innodb_stm.result MDEV-18466 Unsafe to log updates on tables referenced by foreign keys with triggers in statement format 2019-03-27 22:51:37 +01:00
binlog_invalid_read_in_rotate.result MDEV-18046: Assortment of crashes, assertion failures and ASAN errors in mysql_show_binlog_events 2020-01-07 18:27:05 +05:30
binlog_ioerr.result MDEV-26: Global transaction ID 2013-03-26 10:35:34 +01:00
binlog_killed.result Merge 10.0-base -> 10.0 (GTID). 2013-04-17 15:17:01 +02:00
binlog_killed_simulate.result Merge 10.0-base -> 10.0 (GTID). 2013-04-17 15:17:01 +02:00
binlog_max_binlog_stmt_cache_size.result Mdev-4774- Fix tests cases 2017-01-31 10:12:22 +05:30
binlog_max_extension.result
binlog_mdev342.result MDEV-5115 RBR from MySQL 5.6 to MariaDB 10.0 does not work 2013-12-09 12:37:45 +01:00
binlog_mdev717.result MDEV-19265 Server should throw warning if event is created and event_scheduler = OFF 2019-04-28 12:49:59 +02:00
binlog_mixed_cache_stat.result
binlog_mixed_load_data.result MDEV-5115 RBR from MySQL 5.6 to MariaDB 10.0 does not work 2013-12-09 12:37:45 +01:00
binlog_mysqlbinlog-cp932.result BUG#14659685 - main.mysqlbinlog_row_myisam and 2012-10-30 10:40:07 +05:30
binlog_mysqlbinlog2.result Merge 10.0 into 10.1 2019-03-27 11:56:08 +02:00
binlog_mysqlbinlog_base64.result BUG#14659685 - main.mysqlbinlog_row_myisam and 2012-10-30 10:40:07 +05:30
binlog_mysqlbinlog_row.result MDEV-8426 mysqlbinlog: "Corrupted replication event was detected. 2015-11-10 13:46:57 +02:00
binlog_mysqlbinlog_row_frag.result MDEV-22520 Assertion gathered_length == thd->lex->comment.length failed in binlog_defragment 2020-05-18 15:14:16 +03:00
binlog_mysqlbinlog_row_innodb.result MDEV-8426 mysqlbinlog: "Corrupted replication event was detected. 2015-11-10 13:46:57 +02:00
binlog_mysqlbinlog_row_myisam.result MDEV-8426 mysqlbinlog: "Corrupted replication event was detected. 2015-11-10 13:46:57 +02:00
binlog_mysqlbinlog_row_trans.result MDEV-8426 mysqlbinlog: "Corrupted replication event was detected. 2015-11-10 13:46:57 +02:00
binlog_mysqlbinlog_stop_never.result MDEV-11154: Write_on_release_cache(log_event.cc) function will not write "COMMIT", if use "mysqlbinlog ... | mysql ..." 2019-07-15 13:30:10 +05:30
binlog_no_uniqfile_crash.result MDEV-22451: SIGSEGV in __memmove_avx_unaligned_erms/memcpy from _my_b_write on CREATE after RESET MASTER 2020-05-20 17:42:28 +05:30
binlog_old_versions.result MDEV-34 delete storage/ndb and sql/*ndb* (and collateral changes) 2014-10-11 18:53:06 +02:00
binlog_parallel_replication_marks_row.result MDEV-20091 DROP TEMPORARY table is logged despite no CREATE was logged 2019-07-25 11:38:45 +05:30
binlog_parallel_replication_marks_stm_mix.result MDEV-13248 binlog.binlog_parallel_replication_marks_row fails in buildbot 2017-07-06 00:45:43 +03:00
binlog_query_filter_rules.result
binlog_reset_master.result
binlog_row_annotate.result MDEV-16372 ER_BASE64_DECODE_ERROR upon replaying binary log via mysqlbinlog --verbose 2020-08-31 18:45:14 +03:00
binlog_row_binlog.result Merge branch '10.0' into 10.1 2016-05-04 15:23:26 +02:00
binlog_row_cache_stat.result
binlog_row_ctype_cp932.result Ensure that fields declared with NOT NULL doesn't have DEFAULT values if not specified and if not timestamp or auto_increment 2015-08-18 11:18:57 +03:00
binlog_row_ctype_ucs.result MDEV-6066: Merge new defaults from 5.6 and 5.7 (defaults changed, QC can be stopped with no-zero size) 2015-09-04 10:33:56 +02:00
binlog_row_drop_tbl.result MDEV-5115 RBR from MySQL 5.6 to MariaDB 10.0 does not work 2013-12-09 12:37:45 +01:00
binlog_row_drop_tmp_tbl.result MDEV-20188: binlog.binlog_stm_drop_tmp_tbl fails in buildbot with Unknown table on exec 2019-08-26 14:03:51 +05:30
binlog_row_insert_select.result MDEV-5115 RBR from MySQL 5.6 to MariaDB 10.0 does not work 2013-12-09 12:37:45 +01:00
binlog_row_mix_innodb_myisam.result MDEV-20091 DROP TEMPORARY table is logged despite no CREATE was logged 2019-07-25 11:38:45 +05:30
binlog_row_mysqlbinlog_db_filter.result
binlog_row_mysqlbinlog_options.result MDEV-8426 mysqlbinlog: "Corrupted replication event was detected. 2015-11-10 13:46:57 +02:00
binlog_row_mysqlbinlog_verbose.result
binlog_server_id.result Merge 10.0-base -> 10.0 (GTID). 2013-04-17 15:17:01 +02:00
binlog_sf.result
binlog_show_binlog_event_random_pos.result MDEV-18046: Assortment of crashes, assertion failures and ASAN errors in mysql_show_binlog_events 2020-01-07 18:27:05 +05:30
binlog_spurious_ddl_errors.result Description 2013-01-18 12:32:37 +05:30
binlog_sql_mode.result MDEV-19265 Server should throw warning if event is created and event_scheduler = OFF 2019-04-28 12:49:59 +02:00
binlog_start_comment.result
binlog_statement_insert_delayed.result Merge 10.0-base -> 10.0 (GTID). 2013-04-17 15:17:01 +02:00
binlog_stm_binlog.result MDEV-6247: Merge 10.0-galera to 10.1. 2014-08-26 15:43:46 +03:00
binlog_stm_blackhole.result Merge 10.0-base -> 10.0 (GTID). 2013-04-17 15:17:01 +02:00
binlog_stm_cache_stat.result
binlog_stm_ctype_cp932.result Ensure that fields declared with NOT NULL doesn't have DEFAULT values if not specified and if not timestamp or auto_increment 2015-08-18 11:18:57 +03:00
binlog_stm_ctype_ucs.result MDEV-6066: Merge new defaults from 5.6 and 5.7 (defaults changed, QC can be stopped with no-zero size) 2015-09-04 10:33:56 +02:00
binlog_stm_do_db.result Merge 10.0-base -> 10.0 (GTID). 2013-04-17 15:17:01 +02:00
binlog_stm_drop_tbl.result Merge 10.0-base -> 10.0 (GTID). 2013-04-17 15:17:01 +02:00
binlog_stm_drop_tmp_tbl.result MDEV-20188: binlog.binlog_stm_drop_tmp_tbl fails in buildbot with Unknown table on exec 2019-08-26 14:03:51 +05:30
binlog_stm_insert_select.result Merge 10.0-base -> 10.0 (GTID). 2013-04-17 15:17:01 +02:00
binlog_stm_mix_innodb_myisam.result Merge commit '96badb16af' into 10.0 2015-08-03 23:09:43 +03:00
binlog_stm_ps.result Merge 10.0-base -> 10.0 (GTID). 2013-04-17 15:17:01 +02:00
binlog_stm_row.result MDEV-5115 RBR from MySQL 5.6 to MariaDB 10.0 does not work 2013-12-09 12:37:45 +01:00
binlog_stm_unsafe_warning.result print binlog unsafe errors at log_warnings level 1, not 2. 2014-09-18 15:24:30 +02:00
binlog_stm_user_variables.result Merge 10.0-base -> 10.0 (GTID). 2013-04-17 15:17:01 +02:00
binlog_switch_inside_trans.result Bug #15868071 USING SET GLOBAL SQL_LOG_BIN SHOULD NOT BE ALLOWED 2014-09-24 09:44:48 +08:00
binlog_tmp_table.result
binlog_tmp_table_row.result MDEV-9266 Creating index on temporaray table breaks replication 2018-07-18 17:13:24 +05:30
binlog_truncate_innodb.result
binlog_truncate_kill.result 5.5.38 merge 2014-06-06 00:07:27 +02:00
binlog_truncate_myisam.result MDEV-5115 RBR from MySQL 5.6 to MariaDB 10.0 does not work 2013-12-09 12:37:45 +01:00
binlog_unsafe.result MDEV-17614: Re-record a result 2019-08-12 14:45:53 +03:00
binlog_variables_log_bin.result MDEV-7110 : Add missing MySQL variable log_bin_basename and log_bin_index 2015-06-09 13:38:29 -04:00
binlog_variables_log_bin_index.result MDEV-7110 : Add missing MySQL variable log_bin_basename and log_bin_index 2015-06-09 13:38:29 -04:00
binlog_variables_relay_log.result MDEV-7110 : Add missing MySQL variable log_bin_basename and log_bin_index 2015-06-09 13:38:29 -04:00
binlog_variables_relay_log_index.result MDEV-7110 : Add missing MySQL variable log_bin_basename and log_bin_index 2015-06-09 13:38:29 -04:00
binlog_write_error.result
binlog_xa_recover.result MDEV-5115 RBR from MySQL 5.6 to MariaDB 10.0 does not work 2013-12-09 12:37:45 +01:00
load_data_stm_view.result 5.5 merge 2014-11-19 17:23:39 +01:00
mysqladmin.result MDEV-12612 mysqladmin --local flush... to use FLUSH LOCAL 2017-05-24 11:59:04 +02:00
temptable_uservar_disconnect-7938.result MDEV-7938 MariaDB Crashes Suddenly while writing binlogs 2015-04-27 15:42:12 +02:00