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

MDEV-27691: make working view-protocol

Tests with checking metadata or that cannot be run with
the view-protocol are excluded from --view-protocol.
For tests that do not allow the use of an additional connection,
the util connection is disabled with "--disable_service_connection".
Also cases with bugs for --view-protocol are disabled.
This commit is contained in:
Lena Startseva
2022-06-09 10:32:51 +07:00
parent 1dd6255ffe
commit 72ba96a48e
273 changed files with 1867 additions and 158 deletions

View File

@ -1,4 +1,4 @@
--disable_service_connection
SET NAMES utf8;
--echo #
@ -325,11 +325,13 @@ SELECT REGEXP_INSTR('вася','в');
SELECT REGEXP_INSTR('вася','а');
SELECT REGEXP_INSTR('вася','с');
SELECT REGEXP_INSTR('вася','я');
#enable after fix MDEV-27871
--disable_view_protocol
SELECT REGEXP_INSTR(CONVERT('вася' USING koi8r), CONVERT('в' USING koi8r));
SELECT REGEXP_INSTR(CONVERT('вася' USING koi8r), CONVERT('а' USING koi8r));
SELECT REGEXP_INSTR(CONVERT('вася' USING koi8r), CONVERT('с' USING koi8r));
SELECT REGEXP_INSTR(CONVERT('вася' USING koi8r), CONVERT('я' USING koi8r));
--enable_view_protocol
--echo #
--echo # Checking REGEXP_SUBSTR
@ -349,9 +351,10 @@ CREATE TABLE t1 AS SELECT REGEXP_SUBSTR('abc','b')+0;
SHOW CREATE TABLE t1;
DROP TABLE t1;
#enable after fix MDEV-27871
--disable_view_protocol
SELECT REGEXP_SUBSTR('See https://mariadb.org/en/foundation/ for details', 'https?://[^/]*');
--enable_view_protocol
--echo #
--echo # MDEV-6027 RLIKE: "." no longer matching new line
@ -368,11 +371,14 @@ SELECT 'a\nb' RLIKE 'a.b';
SELECT 'a\nb' RLIKE '(?-s)a.b';
SET default_regex_flags=DEFAULT;
#enable after fix MDEV-27871
--disable_view_protocol
--error ER_REGEXP_ERROR
SELECT REGEXP_SUBSTR('Monday Mon','^((?<DN>Mon|Fri|Sun)day|(?<DN>Tue)sday).*(?P=DN)$');
SET default_regex_flags='DUPNAMES';
SELECT REGEXP_SUBSTR('Monday Mon','^((?<DN>Mon|Fri|Sun)day|(?<DN>Tue)sday).*(?P=DN)$');
SELECT REGEXP_SUBSTR('Tuesday Tue','^((?<DN>Mon|Fri|Sun)day|(?<DN>Tue)sday).*(?P=DN)$');
--enable_view_protocol
SET default_regex_flags=DEFAULT;
SELECT 'AB' RLIKE 'A B';
@ -403,7 +409,10 @@ SET default_regex_flags=DEFAULT;
--echo #
--echo # MDEV-6965 non-captured group \2 in regexp_replace
--echo #
#enable after fix MDEV-27871
--disable_view_protocol
SELECT REGEXP_REPLACE('1 foo and bar', '(\\d+) foo and (\\d+ )?bar', '\\1 this and \\2that');
--enable_view_protocol
--echo #
--echo # MDEV-8102 REGEXP function fails to match hex values when expression is stored as a variable
@ -436,6 +445,8 @@ SELECT 1 FROM dual WHERE ('Alpha,Bravo,Charlie,Delta,Echo,Foxtrot,StrataCentral,
#
# MDEV-13173 An RLIKE that previously worked on 10.0 now returns "Got error 'pcre_exec: recursion limit of 100 exceeded' from regexp"
#
#enable after fix MDEV-27871
--disable_view_protocol
SELECT CONCAT(REPEAT('100,',60),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$';
--replace_regex /[0-9]+ exceeded/NUM exceeded/
SELECT CONCAT(REPEAT('100,',400),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$';
@ -451,6 +462,7 @@ SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)
SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', ''));
--replace_regex /[0-9]+ exceeded/NUM exceeded/
SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', ''));
--enable_view_protocol
#
# MDEV-12942 REGEXP_INSTR returns 1 when using brackets
@ -463,3 +475,4 @@ SELECT REGEXP_INSTR('a_kollision', 'o([lm])\\1');
# MDEV-12939 A query crashes MariaDB in Item_func_regex::cleanup
#
SELECT a FROM (SELECT "aa" a) t WHERE a REGEXP '[0-9]';
--enable_service_connection