mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-4425 Regexp enhancements
Adding tests with 0x00 characters from Bug#70470 REGEXP fails to find matches after NUL character
This commit is contained in:
@ -414,6 +414,15 @@ SELECT '!' RLIKE '\\S';
|
||||
SELECT '.' RLIKE '\\S';
|
||||
'.' RLIKE '\\S'
|
||||
1
|
||||
SELECT 'abc\0def' REGEXP 'def';
|
||||
'abc\0def' REGEXP 'def'
|
||||
1
|
||||
SELECT 'abc\0def' REGEXP 'abc\\x{00}def';
|
||||
'abc\0def' REGEXP 'abc\\x{00}def'
|
||||
1
|
||||
SELECT HEX(REGEXP_SUBSTR('abc\0def','abc\\x{00}def'));
|
||||
HEX(REGEXP_SUBSTR('abc\0def','abc\\x{00}def'))
|
||||
61626300646566
|
||||
#
|
||||
# Checking REGEXP_REPLACE
|
||||
#
|
||||
|
@ -144,6 +144,13 @@ SELECT '1' RLIKE '\\S';
|
||||
SELECT '!' RLIKE '\\S';
|
||||
SELECT '.' RLIKE '\\S';
|
||||
|
||||
# checking 0x00 bytes
|
||||
# Bug#70470 REGEXP fails to find matches after NUL character
|
||||
SELECT 'abc\0def' REGEXP 'def';
|
||||
SELECT 'abc\0def' REGEXP 'abc\\x{00}def';
|
||||
SELECT HEX(REGEXP_SUBSTR('abc\0def','abc\\x{00}def'));
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Checking REGEXP_REPLACE
|
||||
--echo #
|
||||
|
Reference in New Issue
Block a user