mariadb/mysql-test/suite/binlog/r
Andrei Elkin 6112a0f93d MDEV-16372 ER_BASE64_DECODE_ERROR upon replaying binary log via mysqlbinlog --verbose
(This commit is exclusively for 10.2 branch. Do not merge it to 10.3)

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:37:44 +03:00
..
binlog_base64_flag.result fix the typo OPTION_NO_CHECK_CONSTRAINT_CHECKS 2019-03-12 09:51:42 +01:00
binlog_bug23533.result MDEV-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04:00
binlog_bug36391.result
binlog_checkpoint.result MDEV-7635: Part 1 2017-02-10 06:30:42 -05:00
binlog_checksum.result
binlog_commit_wait.result MDEV-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04:00
binlog_database.result MDEV-7635: Part 1 2017-02-10 06:30:42 -05:00
binlog_delete_and_flush_index.result
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
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-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04: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-7635: Part 1 2017-02-10 06:30:42 -05:00
binlog_incident.result
binlog_index.result MDEV-21360 save/restore debud_dbug instead of total reset at the end of the test 2020-01-21 11:22:47 +01:00
binlog_innodb.result MDEV-11937: InnoDB flushes redo log too often 2017-08-07 18:23:55 +02:00
binlog_innodb_row.result MDEV-7635: Part 1 2017-02-10 06:30:42 -05: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-21360 global debug_dbug pre-test value restoration issues 2020-01-15 18:06:24 +01:00
binlog_killed.result MDEV-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04:00
binlog_killed_simulate.result cleanup: binlog.binlog_killed_simulate 2016-12-29 13:23:42 +01: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-7635: Part 1 2017-02-10 06:30:42 -05:00
binlog_mdev717.result Merge branch '10.1' into 10.2 2019-05-04 17:04:55 +02:00
binlog_mixed_cache_stat.result Updated mtr files to support different compiled in options 2019-09-01 19:17:35 +03:00
binlog_mixed_load_data.result MDEV-7635: Part 1 2017-02-10 06:30:42 -05:00
binlog_mysqlbinlog-cp932.result
binlog_mysqlbinlog2.result Updated mtr files to support different compiled in options 2019-09-01 19:17:35 +03:00
binlog_mysqlbinlog_base64.result
binlog_mysqlbinlog_row.result Updated mtr files to support different compiled in options 2019-09-01 19:17:35 +03:00
binlog_mysqlbinlog_row_frag.result Merge 10.1 into 10.2 2020-05-19 10:42:59 +03:00
binlog_mysqlbinlog_row_innodb.result Updated mtr files to support different compiled in options 2019-09-01 19:17:35 +03:00
binlog_mysqlbinlog_row_myisam.result Updated mtr files to support different compiled in options 2019-09-01 19:17:35 +03:00
binlog_mysqlbinlog_row_trans.result Updated mtr files to support different compiled in options 2019-09-01 19:17:35 +03: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 20:49:04 +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 Merge 10.1 into 10.2 2019-07-25 12:14:27 +03:00
binlog_parallel_replication_marks_stm_mix.result Merge 10.1 into 10.2 2017-07-06 20:28:08 +03:00
binlog_query_filter_rules.result
binlog_row_annotate.result MDEV-16372 ER_BASE64_DECODE_ERROR upon replaying binary log via mysqlbinlog --verbose 2020-08-31 18:37:44 +03:00
binlog_row_binlog.result MDEV-7635: Additional test fixes 2017-02-10 06:30:42 -05:00
binlog_row_cache_stat.result Updated mtr files to support different compiled in options 2019-09-01 19:17:35 +03:00
binlog_row_ctype_cp932.result MDEV-7635: Update tests to adapt to the new default sql_mode 2017-02-10 06:30:42 -05:00
binlog_row_ctype_ucs.result Updated mtr files to support different compiled in options 2019-09-01 19:17:35 +03:00
binlog_row_drop_tbl.result MDEV-7635: Part 1 2017-02-10 06:30:42 -05:00
binlog_row_drop_tmp_tbl.result Merge 10.1 into 10.2 2019-08-28 15:23:21 +03:00
binlog_row_insert_select.result MDEV-7635: Part 1 2017-02-10 06:30:42 -05:00
binlog_row_mix_innodb_myisam.result Merge 10.1 into 10.2 2019-07-25 12:14:27 +03:00
binlog_row_mysqlbinlog_db_filter.result
binlog_row_mysqlbinlog_options.result Updated mtr files to support different compiled in options 2019-09-01 19:17:35 +03:00
binlog_row_mysqlbinlog_verbose.result
binlog_server_id.result
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
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
binlog_stm_binlog.result MDEV-7635: Update tests to adapt to the new default sql_mode 2017-02-10 06:30:42 -05:00
binlog_stm_blackhole.result Remove end . from error messages to get them consistent 2016-10-05 01:11:08 +03:00
binlog_stm_cache_stat.result Updated mtr files to support different compiled in options 2019-09-01 19:17:35 +03:00
binlog_stm_ctype_cp932.result MDEV-7635: Update tests to adapt to the new default sql_mode 2017-02-10 06:30:42 -05:00
binlog_stm_ctype_ucs.result Updated mtr files to support different compiled in options 2019-09-01 19:17:35 +03:00
binlog_stm_datetime_ranges_mdev15289.result MDEV-15289 Binding an out-of-range DATETIME value in binary protocol breaks replication 2018-02-16 13:44:24 +04:00
binlog_stm_do_db.result
binlog_stm_drop_tbl.result MDEV-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04:00
binlog_stm_drop_tmp_tbl.result Merge 10.1 into 10.2 2019-08-28 15:23:21 +03:00
binlog_stm_insert_select.result
binlog_stm_mix_innodb_myisam.result Remove end . from error messages to get them consistent 2016-10-05 01:11:08 +03:00
binlog_stm_ps.result MDEV-11360 Dynamic SQL: DEFAULT as a bind parameter 2016-11-27 18:21:18 +04:00
binlog_stm_row.result MDEV-7635: Part 1 2017-02-10 06:30:42 -05:00
binlog_stm_unsafe_warning.result Remove end . from error messages to get them consistent 2016-10-05 01:11:08 +03:00
binlog_stm_user_variables.result MDEV-7635: Update tests to adapt to the new default sql_mode 2017-02-10 06:30:42 -05: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 MDEV-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04:00
binlog_tmp_table_row.result MDEV-9266 Creating index on temporaray table breaks replication 2018-07-18 17:13:24 +05:30
binlog_trigger.result MDEV-6112 multiple triggers per table 2016-10-05 01:11:07 +03:00
binlog_truncate_innodb.result
binlog_truncate_kill.result MDEV-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04:00
binlog_truncate_myisam.result MDEV-7635: Part 1 2017-02-10 06:30:42 -05:00
binlog_unsafe.result Merge 10.1 into 10.2 2019-08-12 18:25:35 +03:00
binlog_variables_log_bin.result test suite for compressed binlog event 2016-10-19 20:20:47 +02:00
binlog_variables_log_bin_index.result test suite for compressed binlog event 2016-10-19 20:20:47 +02: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 MDEV-21360 debug_dbug pre-test value restoration issues 2020-01-15 18:06:24 +01:00
binlog_xa_recover.result MDEV-7635: Part 1 2017-02-10 06:30:42 -05:00
flashback-largebinlog.result Updated mtr files to support different compiled in options 2019-09-01 19:17:35 +03:00
flashback.result Updated mtr files to support different compiled in options 2019-09-01 19:17:35 +03: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-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04:00