mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 03:17:20 +02:00
MDEV-38046 Make func_regexp_pcre tolerant to PCRE2 offset change
PCRE2 10.47 reports the invalid escape in 'A\q' at offset 3 instead of 2. Update the expected result and add a --replace_regex in the test so the suite passes with both older and newer PCRE2 versions.
This commit is contained in:
parent
ccd9b008c7
commit
eb5712b865
2 changed files with 3 additions and 1 deletions
|
|
@ -791,7 +791,7 @@ SELECT 'AB' RLIKE 'A# this is a comment\nB';
|
|||
1
|
||||
SET default_regex_flags=DEFAULT;
|
||||
SELECT 'Aq' RLIKE 'A\\q';
|
||||
ERROR 42000: Regex error 'unrecognized character follows \ at offset 2'
|
||||
ERROR 42000: Regex error 'unrecognized character follows \ at offset 3'
|
||||
SET default_regex_flags='EXTRA';
|
||||
SELECT 'A' RLIKE 'B';
|
||||
'A' RLIKE 'B'
|
||||
|
|
|
|||
|
|
@ -381,6 +381,8 @@ SELECT 'AB' RLIKE 'A B';
|
|||
SELECT 'AB' RLIKE 'A# this is a comment\nB';
|
||||
SET default_regex_flags=DEFAULT;
|
||||
|
||||
# pcre2 versions differ in the reported error offset for invalid escapes
|
||||
--replace_regex /offset 2/offset 3/
|
||||
--error ER_REGEXP_ERROR
|
||||
SELECT 'Aq' RLIKE 'A\\q';
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue