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

Delete unused global variables from mysqld.h #3244

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

Conversation

robinnewhouse
Copy link
Contributor

@robinnewhouse robinnewhouse commented May 8, 2024

Description

Several variables declared in mysqld.h appear to be old system variables
that have been left over after deprecation. Delete them using IDE
refactoring to automatically search for other uses. Most cases had no
other uses in the code.

slave_allow_batching had a test that was effectively unused, as the
result was only
-ERROR HY000: Unknown system variable 'slave_allow_batching'
so that was deleted as well.

Build and test still works without issue as expected.

Examples of variables that were deleted and not cleaned up:

  • 0c571f8 removed the last usage of VERS_ALTER_HISTORY_KEEP but did not delete it from the enum.
  • 7c58e97 moved key_memory_quick_index_merge_root (and similar) to mysqld.cc to mysqld.h, but still was not used anywhere.
  • 23d8586 moved key_thread_kill_server along with others to header file, but still was used nowhere. I can't actually find where it was ever used except being defined in a header.

Release Notes

None

How can this PR be tested?

Building the server and running the MTR test suite shows no failures.

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.

Note: As discussed with @LinuxJedi, this is targeting the earliest maintained branch to ease merging upwards, even though it is not necessarily a bugfix.

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 May 8, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@robinnewhouse robinnewhouse force-pushed the delete-unused-variables branch 2 times, most recently from dec9a51 to 106519c Compare May 14, 2024 18:46
@robinnewhouse robinnewhouse changed the base branch from 11.5 to 10.5 May 22, 2024 02:06
@robinnewhouse robinnewhouse force-pushed the delete-unused-variables branch 4 times, most recently from 4d51966 to 966b715 Compare May 22, 2024 23:10
Several variables declared in mysqld.h appear to be old system variables
that have been left over after deprecation. Delete them using IDE
refactoring to automatically search for other uses. Most cases had no
other uses in the code.

slave_allow_batching had a test that was effectively unused, as the
result was only
-ERROR HY000: Unknown system variable 'slave_allow_batching'
so that was deleted as well.

Build and test still works without issue as expected.

All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer Amazon Web
Services.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants