Repository navigation
fix(sql): honor escape parity in LIKE fast paths - #29976
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
mo-bot review · Commit: Assessment: approve Reviewed the complete four-file delta and its callers. The fix correctly handles odd/even escape runs and two-byte patterns within the existing LIKE/ILIKE fast paths. It adds no allocations or per-row classification. Tests cover meaningful boundaries and public SQL behavior. No actionable defects introduced by this PR remain. Model: Session: Validation:
Limitations:
|
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: c3c435873505c957a3e4adc6938fb3b27ffbf190
Assessment: approve
Reviewed the complete four-file delta and its callers. The fix correctly handles odd/even escape runs and two-byte patterns within the existing LIKE/ILIKE fast paths. It adds no allocations or per-row classification. Tests cover meaningful boundaries and public SQL behavior. No actionable defects introduced by this PR remain.
Model: gpt-6-astra / xhigh
Session: 01a12d8f-7dea-77c2-a565-38d45b5564e4 · slot 0 · generation 0
Validation:
-
Traced SQL binding, LIKE/ILIKE dispatch, escape removal, general matching, UTF-8 handling, NULL propagation, and unchanged explicit-ESCAPE/binary routing.
-
Reviewed all 68 unit subcases, fixture cleanup, and the standalone BVT’s direct, negated, and repeated prepared-query assertions.
-
Reused frozen exact-head successful UT, SCA, coverage, PROXY BVT, and PESSIMISTIC BVT evidence, supplemented by the author’s reported MySQL comparison and repeated strict BVT passes.
-
Independent standalone probe compared extracted base/head fast paths against a rune-based oracle: 704,800 comparisons, 1,230 corrected results, and zero new mismatches.
-
Exact HEAD, clean checkout, diff whitespace, and Go formatting checks passed. Audit and probe artifacts are retained in the attempt directory.
Limitations:
-
The probe uses stubbed vector adapters, not production SQL execution. No local native tests or throughput benchmarks were run.
-
The probe also reproduced preexisting multi-segment ILIKE case-folding mismatches, such as value 'A' with pattern '%a%%', at both base and head; these are outside this delta.
-
Frozen evidence supplies suite-level CI conclusions and the PR’s issue description, without individual CI logs or a separate issue #29951 snapshot.
Merge Queue Status
This pull request spent 19 minutes 32 seconds in the queue, with no time running CI. ReasonPull request #29976 has been dequeued Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.
HintYou should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. Waiting for any of
All conditions
Tick the box to put this pull request back in the merge queue (same as
|
What type of PR is this?
Which issue(s) this PR fixes:
issue #29951
What this PR does / why we need it:
The constant-pattern LIKE/ILIKE fast path treats a trailing
%or_as escaped whenever its preceding byte is a backslash. This misclassifies an escaped backslash followed by a wildcard and can return false where the general matcher and MySQL return true.\%and\_patterns correctly match literal wildcard characters.Validation
Local validation used Go 1.27.1 on darwin/arm64 with
GOEXPERIMENT=simdand the repository CGo test wrapper.pkg/sql/plan/functionunit suite passed with-count=1.mo-servicebuilt successfully.operator/like_escape_parity.sqlpassed strict result and metadata comparison twice on the same clean standalone instance: 27/27 each time, no skipped statements; test-owned service cleanup completed.Validation evidence was reused after syncing to
02a2823c20: incoming upstream changes were confined to join/correlated-subquery behavior and truncate tests, did not intersect the function unit-test dependency closure, and are not exercised by this scalar-only BVT. No full-repository SCA, multi-CN, or CI-green claim is made.QA handoff
User-visible MySQL compatibility fix. Verify escaped backslashes before trailing
%/_, literal wildcard controls, and repeated prepared text parameters on the deployed build. Automated coverage includes the unit regression and standalone BVT above.