Skip to content
/ server Public

MDEV-38497 Remove all slave related configurations on RESET SLAVE ALL#4641

Draft
deo002 wants to merge 1 commit intoMariaDB:12.3from
deo002:fix/reset_slave_all
Draft

MDEV-38497 Remove all slave related configurations on RESET SLAVE ALL#4641
deo002 wants to merge 1 commit intoMariaDB:12.3from
deo002:fix/reset_slave_all

Conversation

@deo002
Copy link
Contributor

@deo002 deo002 commented Feb 11, 2026

  • The Jira issue number for this PR is: MDEV-38497

Description

RESET SLAVE ALL on the default unnamed slave does not all clear of its configurations from the server. So, certain configurations get carried onto the subsequent CHANGE MASTER.

This PR fixes it with a proper clean up of all the config options.

Basing the PR against the correct MariaDB version

  • This is a new feature or a refactoring, and the PR is based against the main branch.
  • This is a bug fix, and the PR is based against the earliest maintained branch in which the bug can be reproduced.

PR quality check

  • I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
  • For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.

@deo002 deo002 force-pushed the fix/reset_slave_all branch from 41c2e7f to ce7d020 Compare February 11, 2026 18:32
Fix RESET SLAVE ALL to fully clear replica configuration of the
default unnamed slave, including SSL options, so subsequent
CHANGE MASTER starts from a clean state.

Signed-off-by: Dearsh Oberoi <oberoidearsh@gmail.com>
@deo002 deo002 force-pushed the fix/reset_slave_all branch from ce7d020 to 3bbf843 Compare February 11, 2026 19:23
@deo002 deo002 marked this pull request as draft February 11, 2026 19:56
@gkodinov gkodinov added the External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements. label Feb 12, 2026
Copy link
Contributor

@ParadoxV5 ParadoxV5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello~ Thanks for taking this on. Here’s some early feedback before I go on break.

Comment on lines +198 to +200
mi->master_ssl_ca= nullptr; mi->master_ssl_capath= nullptr; mi->master_ssl_cert= nullptr;
mi->master_ssl_cipher= nullptr; mi->master_ssl_key= nullptr; mi->master_ssl_crl= nullptr;
mi->master_ssl_crlpath= nullptr;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should fix the earlier LTS versions as well.

In either case, this section is unique to a refactor on 12.3.

Comment on lines +186 to +188
init_ssl_config(this);
init_connection_config(this);
init_group_counters_config(this);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The project isn’t just about adding clears to RESET SLAVE, but also checking which one is done where and whether they could’ve been the same.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought I saw RESET SLAVE already tested somewhere.
Maybe it didn’t cover RESET SLAVE ALL well.

Comment on lines +7 to +13
--source include/master-slave.inc

connection slave;

STOP REPLICA;
--source include/wait_for_slave_io_to_stop.inc
--source include/wait_for_slave_sql_to_stop.inc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There’s stop_slave.inc.
Though master-slave.inc has a parameter that skips starting the slave.

But really, since this test doesn’t require a master server or any actual replication work, it could be directly in the main suite.

# Cleanup
RESET REPLICA ALL;

# --source include/rpl_end.inc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Please use SLAVE over REPLICA to match the other tests for the time being.
  • Perhaps the second RESET is for clearing the MASTER_HOST='localhost' part.
    But MTR is okay if you leave certain configurations set to their defaults.
  • Interesting that the CI kept working with rpl_end.inc commented out.
    Well, at least until this rpl.rpl_slave_status you reported on Zulip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements.

Development

Successfully merging this pull request may close these issues.

3 participants