mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge branch '10.5' into 10.6
This commit is contained in:
@@ -1772,6 +1772,85 @@ Level Code Message
|
||||
Note 1003 select trim(both ' ' from 'a') AS "oracle_schema.TRIM(BOTH ' ' FROM 'a')"
|
||||
Warnings:
|
||||
Note 1003 select trim(both ' ' from 'a') AS "oracle_schema.TRIM(BOTH ' ' FROM 'a')"
|
||||
CALL p3('REGEXP_REPLACE(''test'',''t'','''')');
|
||||
----------
|
||||
sql_mode='' qualifier=''
|
||||
query
|
||||
EXPLAIN EXTENDED SELECT REGEXP_REPLACE('test','t','')
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Level Code Message
|
||||
Note 1003 select regexp_replace('test','t','') AS `REGEXP_REPLACE('test','t','')`
|
||||
----------
|
||||
sql_mode='' qualifier='unknown_schema.'
|
||||
query
|
||||
EXPLAIN EXTENDED SELECT unknown_schema.REGEXP_REPLACE('test','t','')
|
||||
errmsg
|
||||
ERROR: FUNCTION unknown_schema.REGEXP_REPLACE does not exist
|
||||
----------
|
||||
sql_mode='' qualifier='mariadb_schema.'
|
||||
query
|
||||
EXPLAIN EXTENDED SELECT mariadb_schema.REGEXP_REPLACE('test','t','')
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Level Code Message
|
||||
Note 1003 select regexp_replace('test','t','') AS `mariadb_schema.REGEXP_REPLACE('test','t','')`
|
||||
----------
|
||||
sql_mode='' qualifier='maxdb_schema.'
|
||||
query
|
||||
EXPLAIN EXTENDED SELECT maxdb_schema.REGEXP_REPLACE('test','t','')
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Level Code Message
|
||||
Note 1003 select regexp_replace('test','t','') AS `maxdb_schema.REGEXP_REPLACE('test','t','')`
|
||||
----------
|
||||
sql_mode='' qualifier='oracle_schema.'
|
||||
query
|
||||
EXPLAIN EXTENDED SELECT oracle_schema.REGEXP_REPLACE('test','t','')
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Level Code Message
|
||||
Note 1003 select oracle_schema.regexp_replace('test','t','') AS `oracle_schema.REGEXP_REPLACE('test','t','')`
|
||||
----------
|
||||
sql_mode='ORACLE' qualifier=''
|
||||
query
|
||||
EXPLAIN EXTENDED SELECT REGEXP_REPLACE('test','t','')
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Level Code Message
|
||||
Note 1003 select regexp_replace('test','t','') AS "REGEXP_REPLACE('test','t','')"
|
||||
----------
|
||||
sql_mode='ORACLE' qualifier='unknown_schema.'
|
||||
query
|
||||
EXPLAIN EXTENDED SELECT unknown_schema.REGEXP_REPLACE('test','t','')
|
||||
errmsg
|
||||
ERROR: FUNCTION unknown_schema.REGEXP_REPLACE does not exist
|
||||
----------
|
||||
sql_mode='ORACLE' qualifier='mariadb_schema.'
|
||||
query
|
||||
EXPLAIN EXTENDED SELECT mariadb_schema.REGEXP_REPLACE('test','t','')
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Level Code Message
|
||||
Note 1003 select mariadb_schema.regexp_replace('test','t','') AS "mariadb_schema.REGEXP_REPLACE('test','t','')"
|
||||
----------
|
||||
sql_mode='ORACLE' qualifier='maxdb_schema.'
|
||||
query
|
||||
EXPLAIN EXTENDED SELECT maxdb_schema.REGEXP_REPLACE('test','t','')
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Level Code Message
|
||||
Note 1003 select mariadb_schema.regexp_replace('test','t','') AS "maxdb_schema.REGEXP_REPLACE('test','t','')"
|
||||
----------
|
||||
sql_mode='ORACLE' qualifier='oracle_schema.'
|
||||
query
|
||||
EXPLAIN EXTENDED SELECT oracle_schema.REGEXP_REPLACE('test','t','')
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Level Code Message
|
||||
Note 1003 select regexp_replace('test','t','') AS "oracle_schema.REGEXP_REPLACE('test','t','')"
|
||||
Warnings:
|
||||
Note 1003 select regexp_replace('test','t','') AS "oracle_schema.REGEXP_REPLACE('test','t','')"
|
||||
CALL p3('CONCAT_OPERATOR_ORACLE(''a'')');
|
||||
----------
|
||||
sql_mode='' qualifier=''
|
||||
|
34
mysql-test/suite/compat/oracle/r/func_regexp_replace.result
Normal file
34
mysql-test/suite/compat/oracle/r/func_regexp_replace.result
Normal file
@@ -0,0 +1,34 @@
|
||||
SET sql_mode=ORACLE;
|
||||
#
|
||||
# MDEV-29095 REGEXP_REPLACE treats empty strings different than REPLACE in ORACLE mode
|
||||
#
|
||||
CREATE TABLE t1 (replacement VARCHAR(10));
|
||||
INSERT INTO t1 VALUES (NULL), ('');
|
||||
SELECT replacement, REGEXP_REPLACE('abba','a',replacement) FROM t1 ORDER BY replacement;
|
||||
replacement REGEXP_REPLACE('abba','a',replacement)
|
||||
NULL bb
|
||||
bb
|
||||
DROP TABLE t1;
|
||||
SELECT REGEXP_REPLACE('abba','a',null);
|
||||
REGEXP_REPLACE('abba','a',null)
|
||||
bb
|
||||
EXPLAIN EXTENDED SELECT REPLACE('abba','a',null) ;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 select replace('abba','a',NULL) AS "REPLACE('abba','a',null)"
|
||||
CREATE VIEW v1 AS SELECT REPLACE('abba','a',null) ;
|
||||
SHOW CREATE VIEW v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE VIEW "v1" AS select replace('abba','a',NULL) AS "REPLACE('abba','a',null)" latin1 latin1_swedish_ci
|
||||
SELECT * FROM v1;
|
||||
REPLACE('abba','a',null)
|
||||
bb
|
||||
SET sql_mode=DEFAULT;
|
||||
SHOW CREATE VIEW v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select oracle_schema.replace('abba','a',NULL) AS `REPLACE('abba','a',null)` latin1 latin1_swedish_ci
|
||||
SELECT * FROM v1;
|
||||
REPLACE('abba','a',null)
|
||||
bb
|
||||
DROP VIEW v1;
|
Reference in New Issue
Block a user