Skip to content
/ server Public

Fix ER_OUTOFMEMORY format to use %zu and size_t (MDEV-39138)#4840

Open
Harsh8084 wants to merge 1 commit intoMariaDB:mainfrom
Harsh8084:fix-MDEV-39138-v2
Open

Fix ER_OUTOFMEMORY format to use %zu and size_t (MDEV-39138)#4840
Harsh8084 wants to merge 1 commit intoMariaDB:mainfrom
Harsh8084:fix-MDEV-39138-v2

Conversation

@Harsh8084
Copy link
Copy Markdown

Updated the error message format and all related call sites to use %zu (size_t format) and size_t arguments, ensuring proper handling of large memory values without overflow risk.

Changes Made
Error Message Format

Changed ER_OUTOFMEMORY format from %d to %zu across all language variants.
Fixed a malformed Georgian translation line (missing closing quote).

Source Code Updates
Removed (int) casts and ensured size_t arguments in my_error(ER_OUTOFMEMORY, ...) calls.
Files: handler.cc, item_jsonfunc.cc, item_strfunc.cc, session_tracker.cc, set_var.cc.

@Harsh8084 Harsh8084 changed the base branch from main to 10.6 March 23, 2026 14:08
- Replace incorrect %d with %zu for size_t
- Update all callers to pass size_t correctly
- Update errmsg-utf8.txt
- Adjust test results accordingly
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 24, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
10 out of 13 committers have signed the CLA.

✅ DaveGosselin-MariaDB
✅ bnestere
✅ MohamedM216
✅ ChandanaRamakrishna
✅ varundeepsaini
✅ Harsh8084
✅ kevdn
✅ svoj
✅ tonychen2001
✅ ParadoxV5
❌ vuvova
❌ abarkov
❌ montywi
You have signed the CLA already but the status is still pending? Let us recheck it.

@Harsh8084 Harsh8084 changed the base branch from 10.6 to main March 24, 2026 05:31
@gkodinov gkodinov added the External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements. label Mar 24, 2026
Copy link
Copy Markdown
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.

How is this one different from #4850? Please close the one you do not need.

And please, going forward, do not keep more than 1 PR open per MDEV! It makes is much harder for me to process these.

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