MDEV-37619 The forced use of THD accessors hurts InnoDB performance #4292
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Let InnoDB access some data members of
THD
directly, instead of invoking non-inline accessor functions. Note:my_thread_id
will be used instead of the potentially narrowerulong
data type.Also, let us remove some functions from
sql_class.cc
that were only being used by InnoDB or RocksDB, for no reason. RocksDB always had access to the internals ofTHD
.Release Notes
The performance of InnoDB was slightly improved.
How can this PR be tested?
The performance impact has been tested in MDEV-37152 as part of #4252.
The modified code should be well exercised by the default regression tests. No change in behaviour is expected.
Basing the PR against the correct MariaDB version
main
branch.I believe that this would benefit the 10.6 branch as well, but there are several other performance fixes that were already omitted from the 10.6 branch.
PR quality check