MDEV-39853 Preserve rows with ignorable prefixes in UCA range scans #5771
All Vouch review confidence checks passed
Residual risk 0.03 = Change Risk (0.27) × (1 − Review Confidence (0.90)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.27 · 34 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.91 · 3 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.213
Real PR Conversation Timeline
6 items
please simplify the regression test: no SET, no CREATE DATABASE unless required.
mtr already does that. No need for tests that do not add to test coverage.
please remove the redundant tests here that do not contribute to test coverage.
Changes Requested
Thank you for your contribution! This is a preliminary review.
Approved
LGTM. Thanks! Please stand by for the final review.
gkodinov
DerZc
A prefix index under a UCA collation can contain only ignorable characters. The prefix then sorts below a lower bound even when the complete value satisfies the predicate, so both
>and>=range scans can omit valid rows.Keep the lower range open for partial UCA keys and check the complete value against the predicate. Add two comparisons on a stored generated column using only two input rows: one equal to the bound and one beginning with the ignorable U+065B character. Their expected counts are 1 and 2.
Bug report: https://jira.mariadb.org/browse/MDEV-39853
Validation
On current
11.4atf49e838d367f2154b3edb43effa99ff9eb0d8602:main.ctype_utf8mb4match.322658cdbaseline confirm the expected counts on both MyISAM and InnoDB.main.ctype_utf8mb4,main.ctype_utf8,main.select,main.view,main.range,main.range_mrr_icp,main.innodb_icp,main.myisam_icp.main.ctype_utf8mb4andmain.ctype_utf8also pass with the prepared-statement protocol.