mariadb/mysql-test/suite/rpl/include
Brandon Nesterenko 555c12a541 MDEV-21087/MDEV-21433: ER_SLAVE_INCIDENT arrives at slave without failure specifics
Problem:
=======

This patch addresses two issues:

 1. An incident event can be incorrectly reported for transactions
which are rolled back successfully. That is, an incident event
should only be generated for failed “non-transactional transactions”
(i.e., those which modify non-transactional tables) because they
cannot be rolled back.

 2. When the mariadb slave (error) stops at receiving the incident
event there's no description of what led to it. Neither in the event
nor in the master's error log.

Solution:
========

Before reporting an incident event for a transaction, first validate
that it is “non-transactional” (i.e. cannot be safely rolled back).
To determine if a transaction is non-transactional,
  lex->stmt_accessed_table(LEX::STMT_WRITES_NON_TRANS_TABLE)
is used because it is set previously in
THD::decide_logging_format().

Additionally, when an incident event is written, write an error
message to the server’s error log to indicate the underlying issue.

Reviewed by:
===========
Andrei Elkin <andrei.elkin@mariadb.com>
2022-07-25 16:26:53 -06:00
..
check_type.inc Merge 10.2 into 10.3 2018-10-17 19:37:05 +03:00
create_recursive_construct.inc Merge branch '10.2' into 10.3 2019-03-17 13:06:41 +01:00
delayed_slave_wait_on_query.inc Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
hrtime.inc MDEV-3929 Add system variable explicit_defaults_for_timestamp for compatibility with MySQL 2015-09-22 14:01:54 +04:00
multisource.inc Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_auto_increment.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_auto_increment_insert_view.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_auto_increment_invoke_trigger.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_autoinc_func_invokes_trigger.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_binlog_errors.inc MDEV-22451: SIGSEGV in __memmove_avx_unaligned_erms/memcpy from _my_b_write on CREATE after RESET MASTER 2020-05-20 21:02:39 +05:30
rpl_binlog_max_cache_size.test MDEV-21087/MDEV-21433: ER_SLAVE_INCIDENT arrives at slave without failure specifics 2022-07-25 16:26:53 -06:00
rpl_blackhole.test Merge branch '10.2' into 10.3 2019-06-14 07:36:47 +02:00
rpl_blackhole_basic.test Merge branch '10.2' into 10.3 2019-06-14 07:36:47 +02:00
rpl_cant_read_event_incident.inc Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_charset.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_checksum.inc Merge branch '10.2' into 10.3 2020-01-17 00:46:40 +03:00
rpl_checksum_cache.inc Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_commit_after_flush.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_conflicts.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_corruption.inc Merge 10.2 into 10.3 2020-03-30 11:12:56 +03:00
rpl_ddl.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_deadlock.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_delete_no_where.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_drop_create_temp_table.inc Merge branch '10.2' into 10.3 2021-11-05 19:58:32 +01:00
rpl_drop_create_temp_table.test Merge branch '10.2' into 10.3 2021-11-05 19:58:32 +01:00
rpl_EE_err.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_extra_col_master.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_extra_col_slave.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_failed_optimize.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_flsh_tbls.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_get_master_version_and_clock.test Merge 10.2 into 10.3 2020-03-30 11:12:56 +03:00
rpl_gtid_basic.inc Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_implicit_commit_binlog.test Merge branch '10.2' into 10.3 2018-05-11 13:15:10 +02:00
rpl_incident.inc Merge branch '10.2' into 10.3 2020-01-17 00:46:40 +03:00
rpl_init_slave_errors.inc Merge branch '10.2' into 10.3 2020-01-17 00:46:40 +03:00
rpl_innodb.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_innodb_rows_counters.inc MDEV-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04:00
rpl_insert_delayed.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_insert_id.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_insert_id_pk.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_insert_ignore.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_loaddata.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_loaddata_local.inc Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_loadfile.inc Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_loadfile.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_log.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_lower_case_table_names.test Merge 10.2 into 10.3 2018-11-06 09:40:39 +02:00
rpl_max_relay_size.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_mixed_check_db.inc MDEV-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04:00
rpl_mixed_check_event.inc MDEV-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04:00
rpl_mixed_check_select.inc MDEV-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04:00
rpl_mixed_check_table.inc MDEV-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04:00
rpl_mixed_check_user.inc MDEV-16238 root/localhost authn prioritizes authentication_string over Password 2018-06-21 10:15:27 +02:00
rpl_mixed_check_view.inc MDEV-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04:00
rpl_mixed_clear_tables.inc copy from test-extra-5.1 to main tree 2007-02-06 13:35:54 +01:00
rpl_mixed_ddl.inc MDEV-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04:00
rpl_mixed_dml.inc MDEV-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04:00
rpl_mixed_show_binlog_format.inc copy from test-extra-5.1 to main tree 2007-02-06 13:35:54 +01:00
rpl_mixing_engines.inc Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_mixing_engines.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_multi_query.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_multi_update.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_multi_update2.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_multi_update3.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_not_null.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_packet.inc Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_parallel.inc Merge branch '10.2' into 10.3 2022-05-03 10:59:54 +02:00
rpl_parallel_ignored_errors.inc MDEV-21360 save/restore debud_dbug instead of total reset at the end of the test 2020-01-21 11:22:47 +01:00
rpl_parallel_show_binlog_events_purge_logs.inc Merge 10.2 into 10.3 2020-05-04 22:06:00 +03:00
rpl_partition.inc MDEV-4864 - Merge tests for EXCHANGE PARTITION feature 2013-09-27 16:58:49 +04:00
rpl_partition.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_record_compare.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_relayrotate.inc Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_relayrotate.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_reset_slave.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_reset_slave_all_check.inc MDEV-25284: Assertion `info->type == READ_CACHE || info->type == WRITE_CACHE' failed 2021-10-18 10:43:51 -06:00
rpl_row_001.test Merge 10.2 into 10.3 2018-07-26 09:19:52 +03:00
rpl_row_annotate.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_row_basic.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_row_blob.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_row_delayed_ins.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_row_func003.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_row_img.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_row_img_blobs.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_row_img_sequence.inc MDEV-28487: sequences not respect value of binlog_row_image with select nextval(seq_gen) 2022-07-13 09:03:32 -06:00
rpl_row_sp002.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_row_sp003.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_row_sp006.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_row_sp007.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_row_tabledefs.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_row_UUID.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_semi_sync.inc Merge branch '10.2' into 10.3 2020-12-23 19:28:02 +01:00
rpl_set_null.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_set_statement.inc MDEV-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04:00
rpl_show_binlog_events.inc Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_show_log_events_with_varying_options.inc Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_show_relaylog_events.inc Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_skip_replication.inc Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_special_charset.inc Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_sporadic_master.inc Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_ssl.inc Merge branch '10.2' into 10.3 2022-05-03 10:59:54 +02:00
rpl_start_stop_slave.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_stm_create_if_not_exists.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_stm_EE_err2.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_stm_relay_ign_space.inc Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_stop_middle_group.test Merge 10.2 into 10.3 2020-03-30 11:12:56 +03:00
rpl_stop_slave.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_sv_relay_space.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_switch_stm_row_mixed.inc Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_sync_test.inc Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_temporal_format_default_to_default.inc Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_test_framework.inc Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_tmp_table_and_DDL.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_trig004.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_truncate.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_truncate_helper.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
rpl_typeconv.inc MDEV-15821 Row format replication from LONGBLOB COMPRESSED to LONGBLOB does not work 2018-04-10 15:34:20 +04:00
type_conversions.test Merge 10.2 into 10.3 2018-10-17 19:37:05 +03:00