Repository navigation
fix: reject empty regexp patterns - #25372
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? |
Merge Queue Status
This pull request spent 3 hours 8 minutes 43 seconds in the queue, with no time running CI. Waiting for
All conditions
ReasonThe merge conditions cannot be satisfied due to failing checks Failing checks:
HintYou may have to fix your CI before adding the pull request to the queue again. Requeued — the merge queue status continues in this comment ↓. |
Merge Queue Status
This pull request spent 2 hours 23 minutes 4 seconds in the queue, with no time running CI. Waiting for
All conditions
ReasonThe merge conditions cannot be satisfied due to failing checks Failing checks:
HintYou may have to fix your CI before adding the pull request to the queue again. Requeued — the merge queue status continues in this comment ↓. |
Merge Queue Status
This pull request spent 34 minutes 9 seconds in the queue, with no time running CI. Waiting for
All conditions
ReasonThe merge conditions cannot be satisfied due to failing checks Failing checks:
HintYou may have to fix your CI before adding the pull request to the queue again. Requeued — the merge queue status continues in this comment ↓. |
Merge Queue Status
This pull request spent 12 seconds in the queue, including 1 second running CI. Required conditions to merge
|
What type of PR is this?
Which issue(s) this PR fixes:
issue #25242
What this PR does / why we need it:
MatrixOne accepted empty patterns for
REGEXP,RLIKE, andREGEXP_LIKEbecause Go's regular expression engine treats an empty pattern as a valid zero-width match.This change adds predicate-specific empty-pattern checks that return MySQL-compatible error 3685 (
HY000). It coversREGEXP,RLIKE,NOT REGEXP, and both the two-argument and three-argument forms ofREGEXP_LIKE, while leaving the shared matcher used by other regular expression functions unchanged. NULL and valid-pattern behavior remain unchanged.The change also adds focused execution tests and BVT coverage for all affected forms.
Testing
makego build ./pkg/common/moerr ./pkg/sql/plan/functiongo vet ./pkg/common/moerr ./pkg/sql/plan/functiongo test -count=1 ./pkg/common/moerrgo test -count=1 ./pkg/sql/plan/functionmo-tester: 67/67 cases passed