1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-4425 Regexp enhancements

Do not pass PCRE_UCP flag for binary data.
This makes bytes 0x80..FF not to belong to 
generic character classes \d (digit) and \w (word character).

SELECT 0xFF RLIKE '\\w';
 -> 0

Note, this change does not affect non-binary data,
which is still examined with the PCRE_UCP flag by default.
This commit is contained in:
Alexander Barkov
2013-10-08 18:25:17 +04:00
parent 43c09c15ff
commit 1bcd2bebc6
3 changed files with 13 additions and 2 deletions

View File

@ -234,6 +234,12 @@ class ch ch RLIKE class
\p{Tamil} 㐗 0
\p{Tamil} 갷 0
DROP TABLE t1, t2;
SELECT 0xFF RLIKE '\\w';
0xFF RLIKE '\\w'
0
SELECT 0xFF RLIKE '(*UCP)\\w';
0xFF RLIKE '(*UCP)\\w'
1
SELECT '\n' RLIKE '(*CR)';
'\n' RLIKE '(*CR)'
1