Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MDEV:8146 - scripts/mysql_system_tables_fix.sql to use alter table add/drop if not exists/if exists #3028

Open
wants to merge 1 commit into
base: 11.5
Choose a base branch
from

Conversation

gulshanpr
Copy link
Contributor

@gulshanpr gulshanpr commented Jan 30, 2024

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

Description

Added additional checks in scripts/mysql_system_tables_fix.sql to reduce error in log file, update includes IF EXISTS/IF NOT EXISTS for DROP/ADD statements

How can this PR be tested?

This PR updated ADD COLUMN to ADD COLUMN IF NOT EXISTS and same for DROP.

Basing the PR against the correct MariaDB version

  • This is a bug fix and the PR is based against the earliest maintained branch in which the bug can be reproduced.
  • This is a new feature and the PR is based against the latest MariaDB development branch.

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
Copy link
Member

Thanks for the PR - can you rebase this on to the latest 11.4 ((assuming origin is MariaDB/server repo -> git fetch origin; git rebase --onto origin/11.4 HEAD^) and resolve the mysql_system_tables_fix.sql conflict and remove the MDEV-32611 commit. Force push to the same branch when complete.

@gulshanpr gulshanpr force-pushed the MDEV-8146-scripts/mysql_system_tables_fix.sql-to-use-alter-table-add/drop-if-exists/if-not-exists branch 3 times, most recently from 42baf6f to 9ec1a2e Compare January 30, 2024 16:32
@gulshanpr gulshanpr changed the title MDEV:8146 - scripts/mysql system tables fix.sql to use alter table add/drop if exists/if not exists MDEV:8146 - scripts/mysql_system_tables_fix.sql to use alter table add/drop if not exists/if exists Jan 30, 2024
@gulshanpr
Copy link
Contributor Author

@grooverdan Do I need to include test for this PR?, I think it is straight-forward.

@grooverdan
Copy link
Member

@grooverdan Do I need to include test for this PR?, I think it is straight-forward.

The existing code is executed in tests. No need to add anything.

@grooverdan
Copy link
Member

Check the error output in any of the failing tests above, there's a few syntax errors. Hopefully should be obvious from the error. I saw at least one that had the IF NOT EXITS before KEY.

Copy link
Member

@grooverdan grooverdan left a comment

Choose a reason for hiding this comment

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

looks good. We'll rebase and squash to a 11.5 branch one exists.

…/drop..if not exists

Updated mariadb_system_tables_fix.sql to include
checks using IF NOT EXISTS.

Review: Daniel Black
@grooverdan grooverdan force-pushed the MDEV-8146-scripts/mysql_system_tables_fix.sql-to-use-alter-table-add/drop-if-exists/if-not-exists branch from 7114905 to 94d1f0c Compare February 29, 2024 10:01
@CLAassistant
Copy link

CLAassistant commented Feb 29, 2024

CLA assistant check
All committers have signed the CLA.

@grooverdan grooverdan changed the base branch from 11.4 to 11.5 February 29, 2024 10:29
Copy link
Contributor

@LinuxJedi LinuxJedi left a comment

Choose a reason for hiding this comment

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

Yep, should have been there long ago.

@grooverdan grooverdan added this to the 11.6 milestone May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants