Visitar URL original
MDEV-29315 Add non-ambiguous alias for 'ALL' in RESET SLAVE ALL by mehul-raj5 · Pull Request #6131 · MariaDB/server · GitHub
Skip to content

MDEV-29315 Add non-ambiguous alias for 'ALL' in RESET SLAVE ALL - #6131

Open
mehul-raj5 wants to merge 1 commit into
MariaDB:mainfrom
mehul-raj5:MDEV-29315
Open

mehul-raj5 wants to merge 1 commit into
MariaDB:mainfrom
mehul-raj5:MDEV-29315

Conversation

@mehul-raj5

Copy link
Copy Markdown

Description

The ALL in RESET SLAVE ['connection_name'] ALL resets a single replica connection, but it reads as if it applied to all replica connections, as ALL does in SHOW ALL SLAVES STATUS and START/STOP ALL SLAVES.

Add FULL as an alias for ALL in RESET SLAVE/REPLICA:

  RESET {SLAVE | REPLICA} ['connection_name'] [ALL | FULL]
    [FOR CHANNEL 'connection_name']

FULL sets the same flag as ALL, so the behaviour is identical: a named connection is removed, and the default connection has its connection settings cleared. ALL is kept for backward compatibility.

FULL is an existing keyword, so no new token is added and statement digests are unchanged.

RESET SLAVE 'm1' FULL;                  -- named connection is removed
RESET REPLICA FULL FOR CHANNEL 'm1';    -- same, other syntax forms
RESET SLAVE FULL;                       -- default connection settings cleared

Copyright

This contribution is made under the MariaDB Contributor Agreement (MCA).

ALL in RESET SLAVE ['connection_name'] ALL resets a single replica
connection, but reads as if it applied to all of them, as ALL does
in SHOW ALL SLAVES STATUS. Add FULL as an alias for ALL. It sets
the same flag, so the behaviour is identical, and ALL keeps working.

multi_source.reset_slave fails without this change.
@CLAassistant

CLAassistant commented Nov 12, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@gkodinov gkodinov added the External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements. label Nov 12, 2026
@gkodinov gkodinov self-assigned this Nov 12, 2026

@gkodinov gkodinov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for your contribution! This is a preliminary review.

LGTM. Please stand by for the final review.

@gkodinov
gkodinov requested a review from bnestere November 12, 2026 09:16
@gkodinov gkodinov assigned bnestere and unassigned gkodinov Nov 12, 2026
Comment thread sql/sql_yacc.yy
Comment on lines 15911 to +15912
| ALL { Lex->reset_slave_info.all= true; }
| FULL { Lex->reset_slave_info.all= true; }

@ParadoxV5 ParadoxV5 Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is

Suggested change
| ALL { Lex->reset_slave_info.all= true; }
| FULL { Lex->reset_slave_info.all= true; }
| (ALL|FULL) { Lex->reset_slave_info.all= true; }

valid syntax?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks for the suggestion! but BISON doesn't accept ( | ) type grouping inside a rule, it will fail with an invalid character error because of ' ( '. The current syntax already handles this rule because both set the .all to be true so they behave the same.

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.

5 participants