Skip to content
/ server Public

MDEV-39013: Fix flaky main.tmp_space_usage test#4765

Open
varundeepsaini wants to merge 1 commit intoMariaDB:11.8from
varundeepsaini:MDEV-39013-fix-flaky-tmp-space-usage
Open

MDEV-39013: Fix flaky main.tmp_space_usage test#4765
varundeepsaini wants to merge 1 commit intoMariaDB:11.8from
varundeepsaini:MDEV-39013-fix-flaky-tmp-space-usage

Conversation

@varundeepsaini
Copy link
Contributor

@varundeepsaini varundeepsaini commented Mar 9, 2026

Summary

  • 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 (observed diff: exactly 16384 bytes = one InnoDB page).
  • 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.

Test plan

  • main.tmp_space_usage passes locally (500/500 runs)

@gkodinov gkodinov added the External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements. label Mar 10, 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.

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>
@varundeepsaini varundeepsaini force-pushed the MDEV-39013-fix-flaky-tmp-space-usage branch from 76f7e7f to feca392 Compare March 10, 2026 13:52
@varundeepsaini varundeepsaini changed the base branch from 11.5 to 11.8 March 10, 2026 13:53
@varundeepsaini varundeepsaini requested a review from gkodinov March 12, 2026 19:48
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.

LGTM. Please stand by for the final review.

@gkodinov gkodinov requested a review from svoj March 13, 2026 09:03
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.

3 participants