[MDEV-32168] slave_error_param condition is never checked from the wait_for_slave_param.inc Created: 2023-09-14  Updated: 2024-01-25  Resolved: 2023-11-16

Status: Closed
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 10.4
Fix Version/s: 10.4.33, 10.5.24, 10.6.17, 10.11.7, 11.0.5, 11.1.4, 11.2.3

Type: Bug Priority: Major
Reporter: Anel Husakovic Assignee: Anel Husakovic
Resolution: Fixed Votes: 0
Labels: None


 Description   

The is the bug that is very old (from 2010).
In the include file wait_for_slave_param.inc there is the check for the slave_error_param.
This value is either set by the test to some condition or in case if empty it is checked by the include file itself

  --let $slave_error_param= 1

Based on this condition later in the same file condition is validated and compared to empty value:

  # Check if an error condition is reached.
  if (!$slave_error_param)
  {
    --let $_show_slave_status_error_value= query_get_value("SHOW SLAVE STATUS", $slave_error_param, 1)
    if ($_show_slave_status_error_value)
    {
      --echo **** ERROR: $slave_error_param = '$_show_slave_status_error_value' while waiting for slave parameter $slave_param $_slave_param_comparison $slave_param_value ****
      --source include/show_rpl_debug_info.inc
      --die Error condition reached in include/wait_for_slave_param.inc
    }
  }

The task consists of :
1. Allow the condition to be checked
2. By fixing the bug validate the tests that are using this paramater, there are about 20+ of them

    binlog_encryption.rpl_parallel
    binlog_encryption.rpl_mixed_binlog_max_cache_size
    binlog_encryption.rpl_mixed_binlog_max_cache_size
    binlog_encryption.rpl_parallel
    binlog_encryption.encrypted_master_switch_to_unencrypted_coords
    binlog_encryption.encrypted_master_switch_to_unencrypted_gtid
    binlog_encryption.rpl_parallel
    binlog_encryption.rpl_parallel_ignored_errors
    binlog_encryption.rpl_parallel
    binlog_encryption.rpl_parallel
    binlog_encryption.rpl_parallel_ignored_errors
    binlog_encryption.encrypted_master_switch_to_unencrypted_coords
    binlog_encryption.rpl_parallel
    binlog_encryption.encrypted_master_switch_to_unencrypted_gtid
    multi_source.gtid_slave_pos
    multi_source.gtid_slave_pos
    rpl.rpl_incompatible_heartbeat rpl.rpl_innodb_mixed_dml rpl.rpl_innodb_mixed_ddl rpl.rpl_mixed_binlog_max_cache_size rpl.rpl_gtid_grouping
    rpl.mdev-31448_kill_ooo_finish_optimistic
    rpl.rpl_mixed_binlog_max_cache_size
    rpl.mdev-31448_kill_ooo_finish_optimistic
    rpl.rpl_domain_id_filter_io_crash
    rpl.rpl_cant_read_event_incident rpl.rpl_connection
    rpl.rpl_domain_id_filter_io_crash
    rpl.rpl_connection
    rpl.rpl_domain_id_filter_restart rpl.rpl_drop_db rpl.rpl_drop rpl.rpl_gtid_errorlog rpl.rpl_grant rpl.rpl_dump_request_retry_warning rpl.rpl_get_lock rpl.rpl_drop_view rpl.rpl_gtid_delete_domain rpl.rpl_function_defaults rpl.rpl_events
    rpl.rpl_gtid_errorlog
    rpl.rpl_domain_id_filter_io_crash
    rpl.rpl_parallel_kill
    rpl.rpl_domain_id_filter_io_crash
    rpl.rpl_foreign_key_innodb rpl.rpl_gtid_errorhandling
    rpl.rpl_parallel_kill
    rpl.rpl_gtid_strict rpl.rpl_mdev382 rpl.rpl_loaddata rpl.rpl_mdev_17614
    rpl.rpl_gtid_errorhandling
    rpl.rpl_mdev_17614
    rpl.rpl_gtid_reconnect rpl.rpl_gtid_startpos rpl.rpl_gtid_sort
    rpl.rpl_gtid_startpos
    rpl_sql_thd_start_errno_cleared

  • This error is reported on Zulip .


 Comments   
Comment by Anel Husakovic [ 2023-09-18 ]

Hi knielsen, I'm working on this bug in PR 2762 and I have problems with 2 test cases (as asked on Zulip).
Can I please get your review?
Best regards,
Anel

Comment by Brandon Nesterenko [ 2023-10-10 ]

Reassigning this to Elkin to sign off.

Comment by Andrei Elkin [ 2023-10-24 ]

Looks good, thanks!

Comment by Anel Husakovic [ 2023-10-30 ]

When merge happens here are changes per versions:
https://github.com/an3l/server/tree/bb-10.5-anel-rpl-fix-assertion
https://github.com/an3l/server/tree/bb-10.6-anel-rpl_fix_assertion
https://github.com/an3l/server/tree/bb-10.9-anel-rpl_fix_assert
https://github.com/an3l/server/tree/bb-10.10-anel-rpl_fix_assertion

Assigning to Brandon to merge specific version.
Thanks everyone.

Comment by Anel Husakovic [ 2023-11-13 ]

Added to upstream updated branches, applying reviews in order to make checks for other workers.
This should be check after merging PR 2762:
https://buildbot.mariadb.net/buildbot/grid?category=main&category=package&branch=bb-10.5-anel-rpl-fix-assertion
https://buildbot.mariadb.net/buildbot/grid?category=main&category=package&branch=bb-10.6-anel-rpl-fix-assertion
https://buildbot.mariadb.net/buildbot/grid?category=main&category=package&branch=bb-10.9-anel-rpl-fix-assertion
https://buildbot.mariadb.net/buildbot/grid?category=main&category=package&branch=bb-10.10-anel-rpl-fix-assertion

Comment by Anel Husakovic [ 2023-11-16 ]

Pushed to 10.4 with commit a7d186a17d35b2651f.
Added branches in the server tree for the proper merges 10.5+
Thanks to the reviewers.

Generated at Thu Feb 08 10:29:21 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.