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

more MDEV-35429 my_snprintf fixes for 10.5+ #3749

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

Conversation

ParadoxV5
Copy link
Contributor

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

Description

How can this PR be tested? (& Release Notes)

  • Innobase os0file.cc: N/A: This only impacts platforms whose long long is longer than 64bits.
  • MyISAM mi_check.c: IIRC, %u and %lu are different on Linux.

PR quality check

  • 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.
  • 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.

* Innobase `os0file.cc`: use `PRIu64` over `llu`
  * These came after I prepared #3485.
* MyISAM `mi_check.c`: in impossible block length warning
  * I missed this one in #3485 (and #3360 too?).
block_info.block_len+ (uint) (block_info.filepos-pos),
llstr(pos,llbuff));
"Found block with impossible length %lu at %s; Skipped",
block_info.block_len + (unsigned long) (block_info.filepos-pos),
Copy link
Contributor Author

@ParadoxV5 ParadoxV5 Jan 10, 2025

Choose a reason for hiding this comment

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

MI_BLOCK_INFO::filepos and local var pos are both my_off_t which can be as large as unsigned long long, yet the old code casted to uint.

Here I cast to unsigned long to match MI_BLOCK_INFO::block_len (and #3748 and its surrounding code too).

ParadoxV5 added a commit to ParadoxV5/MariaDB-server that referenced this pull request Jan 10, 2025
* MariaDB#3746
* MariaDB#3747
* MariaDB#3748
* MariaDB#3749

This commit should not be merged, but skipping it before the
above PRs merge to the `main` branch will brick CIs on `main`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants