1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

longer regex error messages

This commit is contained in:
Sergei Golubchik
2019-12-18 17:50:09 +01:00
parent 9dadfdcde5
commit 3b654d54c1
4 changed files with 22 additions and 23 deletions

View File

@ -793,7 +793,7 @@ SELECT 'a\nb' RLIKE '(?-s)a.b';
'a\nb' RLIKE 'a.b'
1
SELECT 'a\nb' RLIKE '(?-s)a.b';
'a\nb' RLIKE '(?-s)a.b'
'a\nb' RLIKE '(?-s)a.b'
0
SET default_regex_flags=DEFAULT;
SELECT REGEXP_SUBSTR('Monday Mon','^((?<DN>Mon|Fri|Sun)day|(?<DN>Tue)sday).*(?P=DN)$');
@ -817,10 +817,10 @@ SELECT 'AB' RLIKE 'A# this is a comment\nB';
'AB' RLIKE 'A B'
1
SELECT 'AB' RLIKE 'A# this is a comment\nB';
'AB' RLIKE 'A# this is a comment\nB'
'AB' RLIKE 'A# this is a comment\nB'
1
SET default_regex_flags=DEFAULT;
SELECT 'Aq' RLIKE 'A\\q';
SELECT 'Aq' RLIKE 'A\\q';
ERROR 42000: Regex error 'unrecognized character follows \ at offset 2'
SET default_regex_flags='EXTRA';
SELECT 'Aq' RLIKE 'A\\q';
@ -860,7 +860,7 @@ SELECT 0xE001 REGEXP @regCheck;
# Testing a warning
SET NAMES latin1;
SET @regCheck= '\\xE0\\x01';
SELECT 0xE001 REGEXP @regCheck;
SELECT 0xE001 REGEXP @regCheck;
0xE001 REGEXP @regCheck
0
Warnings: