Description
In N1QL's current implementation of REGEXP_LIKE, "^" and "$" is added for the exact match:
https://github.com/couchbase/query/blob/master/expression/func_regexp.go#L168
Therefore, certain invalid regular expression pattern strings that should be rejected can be accepted.
Example:
SELECT REGEXP_LIKE('Steven', '*');
Result:
[
]
MySQL raises an error for that.
mysql> SELECT 'Steven' rlike '*';
ERROR 1139 (42000): Got error 'repetition-operator operand invalid' from regexp
Attachments
Issue Links
- blocks
-
MB-22188 4.6.2 Minor Release
- Closed
For Gerrit Dashboard: MB-20677 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
71467,3 | MB-20677 regexp_like accepts invalid patterns | master | query | Status: MERGED | +2 | +1 |
73353,2 | MB-20677 regexp_like accepts invalid patterns | watson++ | query | Status: MERGED | +2 | +1 |