MDEV-39013: Fix flaky main.tmp_space_usage test#4765
Open
varundeepsaini wants to merge 1 commit intoMariaDB:11.8from
Open
MDEV-39013: Fix flaky main.tmp_space_usage test#4765varundeepsaini wants to merge 1 commit intoMariaDB:11.8from
varundeepsaini wants to merge 1 commit intoMariaDB:11.8from
Conversation
2 tasks
gkodinov
requested changes
Mar 10, 2026
Member
gkodinov
left a comment
There was a problem hiding this comment.
Thank you for your contribution! This is a preliminary review.
Mostly LGTM, but please rebase on 11.8
Reading information_schema.session_status with tmp_memory_table_size=0 forces the query's internal temp table to disk, which changes tmp_space_used as a side effect of reading it. By the time connection c1 reads the value from processlist, it sees the inflated value. Fix by temporarily setting tmp_memory_table_size high before the session_status read, same pattern already used earlier in the test (lines 72-77) for the same reason. Signed-off-by: Varun Deep Saini <varun.23bcs10048@ms.sst.scaler.com>
76f7e7f to
feca392
Compare
gkodinov
approved these changes
Mar 13, 2026
Member
gkodinov
left a comment
There was a problem hiding this comment.
LGTM. Please stand by for the final review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
information_schema.session_statuswithtmp_memory_table_size=0forces the query's internal temp table to disk, which changestmp_space_usedas a side effect of reading it. By the time connection c1 reads the value fromprocesslist, it sees the inflated value (observed diff: exactly 16384 bytes = one InnoDB page).tmp_memory_table_sizehigh before thesession_statusread — same pattern already used earlier in the test (lines 72-77) for the same reason.Test plan
main.tmp_space_usagepasses locally (500/500 runs)