Skip to content
/ server Public

MDEV-35369: Add is_deprecated column to system_variables table#4698

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

MDEV-35369: Add is_deprecated column to system_variables table#4698
HNOONa-0 wants to merge 1 commit intoMariaDB:mainfrom
HNOONa-0:MDEV-35369

Conversation

@HNOONa-0
Copy link
Contributor

@HNOONa-0 HNOONa-0 commented Feb 25, 2026

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

Description

I added a tinyint(1) column to the system_variables table.
I assume system_variables is a virtual table that does not need any migration scripts but I could be wrong.
The author explicitly stated on JIRA that is_deprecated should be boolean column, however, sql_i_s.h doesn't contain a definition for the boolean datatype, only STiny type is defined so that is what i used. I could add a separate definition and handler for the boolean type if that is desired.
I added the column at the end of the table so that no other changes are necessary inside of fill_sysvars or other areas of code.

here are a couple of queries with is_deprecated filter:
image

Release Notes

Exposed the IS_DEPRECATED column in INFORMATION_SCHEMA.SYSTEM_VARIABLES, enabling automated checks for deprecated configuration settings.

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.

@CLAassistant
Copy link

CLAassistant commented Feb 25, 2026

CLA assistant check
All committers have signed the CLA.

@HNOONa-0 HNOONa-0 force-pushed the MDEV-35369 branch 2 times, most recently from e7b36d8 to 7552693 Compare February 25, 2026 18:08
@HNOONa-0
Copy link
Contributor Author

rebased on main and updated the failed test

@HNOONa-0 HNOONa-0 force-pushed the MDEV-35369 branch 2 times, most recently from 0dc5720 to b7d9e01 Compare February 26, 2026 00:40
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.

I assume system_variables is a virtual table that does not need any migration scripts but I could be wrong.

You are correct. No migration need.

The author explicitly stated on JIRA that is_deprecated should be boolean column, however, sql_i_s.h doesn't contain a definition for the boolean datatype, only STiny type is defined so that is what i used. I could add a separate definition and handler for the boolean type if that is desired.

STiny is ok. Per JIRA, I think the replacement variable would be more useful, however lets get the author to comment there before implementing.

I added the column at the end of the table so that no other changes are necessary inside of fill_sysvars or other areas of code.

Correct.

So in summary:

  • good so far
  • Lets see if JIRA issue author just wants the replacement variable
  • replace_regex shouldn't be there for the tests, most won't need to change
  • re-record tests or adjust the SELECT * to include less fields. I think that just a re-recording of the test case and committing the result should be fine in all of these cases.

@gkodinov gkodinov added the External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements. label Feb 26, 2026
Copy link
Member

@gkodinov gkodinov left a comment

Choose a reason for hiding this comment

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

This is a preliminary review. Please keep working with Daniel on the full review.

The only extra remark I have is that you need to get your commit message to be according to CODING_STANDARDS.md

@HNOONa-0 HNOONa-0 force-pushed the MDEV-35369 branch 2 times, most recently from b691ce2 to 4a93681 Compare February 26, 2026 17:25
@HNOONa-0
Copy link
Contributor Author

Hi @grooverdan, I played with cmake flags and updated test results for all tests that query system_variables. I also added deprecated_replacement variable as per discussion on JIRA. I did not add a separate definition for Boolean variable. Turns out, STiny(1) is an alias for the boolean datatype. I previously assumed that a boolean column is its own dedicated type. PTAL!

@HNOONa-0 HNOONa-0 requested a review from grooverdan February 26, 2026 20:50
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.

Code is good. Thanks for following and adapting to requested changes and JIRA discussion from @hartmut-mariadb.

Can I get you to amend and push a more verbose in the commit message. Explicitly:

[MDEV-35369 Add deprecation columns to i_s.system_variables

Adds columns:
* IS_DEPRECATED, as  a boolean if the value is deprecated
* DEPRECATED_REPLACEMENT, as how the server replaces this variable

Note this may not be merged immediately, there's a QA/testing process to go through for new features. It will be used.

Many thanks for the contribution.

Adds columns:
* IS_DEPRECATED, as  a boolean if the value is deprecated
* DEPRECATED_REPLACEMENT, as how the server replaces this variable
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.

4 participants