Skip to content
/ server Public

MDEV-28911: Add --init-command option to mysqldump#4723

Open
HNOONa-0 wants to merge 1 commit intoMariaDB:mainfrom
HNOONa-0:MDEV-28911
Open

MDEV-28911: Add --init-command option to mysqldump#4723
HNOONa-0 wants to merge 1 commit intoMariaDB:mainfrom
HNOONa-0:MDEV-28911

Conversation

@HNOONa-0
Copy link
Contributor

@HNOONa-0 HNOONa-0 commented Mar 2, 2026

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

Description

A quick note on the implementation: I set it up so the command runs before mariadb-dump initializes its own default session settings. I originally thought it made more sense to put it after (so users could override the tool's internal defaults), but looking at the rest of the codebase, doing it before seems to be the established pattern. I decided to stick with the existing convention to keep things consistent. I also added a small MTR test file to verify the flag works as expected. Do you agree with this order of execution?

Right now, only the last init-command option will run. Is it desirable to allow users to specify multiple init commands?

Release Notes

Add --init-command option to mysqldump

How can this PR be tested?

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.

@grooverdan grooverdan added the External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements. label Mar 2, 2026
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.

2 participants