MDEV-39193 Preserve matches when string range bounds are truncated #5773
All Vouch review confidence checks passed
Residual risk 0.03 = Change Risk (0.31) × (1 − Review Confidence (0.90)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.31 · 39 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.91 · 2 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.221
Real PR Conversation Timeline
5 items
simplify the test case please: no CREATE DATABASE, no SET etc.
find out what provides extra coverage. trim the ones that don't.
Changes Requested
Thank you for your contribution! This is a preliminary review.
Approved
LGTM. Thanks! Please stand by for the final review.
gkodinov
DerZc
Storing a range bound in a short string field can silently truncate it.
Under
utf8mb4_0900_ai_ci,ßcompares equal toss, but storingssin
VARCHAR(1)leavess. Using that shorter upper key can excludematching rows.
Reject an upper range bound when the stored value compares below the
original value. The focused regression uses one indexed InnoDB row and
two queries:
BETWEENcovers the inclusive upper bound, and<coversthe exclusive upper bound. It needs no database creation or session
settings. Existing unordered
BETWEENoutputs in the UTF-8 tests aresorted because the safe fallback can change scan order.
Bug report: https://jira.mariadb.org/browse/MDEV-39193
Validation
On
11.4at322658cd442333a13b46521d1acca67d1e8366cb:main.ctype_utf8mb4only at the two newqueries: each returns 0 instead of the expected 1.
main.ctype_utf8passes with the sorted existing output.
main.ctype_utf8mb4,main.ctype_utf8andmain.selectpass.main.ctype_utf8mb4andmain.ctype_utf8pass.