1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-13003 - Oracle compatibility : Replace function

This commit is contained in:
halfspawn
2017-05-31 09:49:17 +02:00
committed by Alexander Barkov
parent 1a9e13d622
commit c9981fbee2
9 changed files with 125 additions and 10 deletions

View File

@ -0,0 +1,22 @@
#
# Testing replace with null args
#
SET sql_mode=ORACLE;
--echo #
--echo # MDEV-13003 - Oracle compatibility : Replace function
--echo #
SELECT REPLACE(null,'a','b') ;
SELECT REPLACE('ab',null,'b') ;
SELECT REPLACE('ab','a',null) ;
SELECT REPLACE('ab',null,null) ;
SELECT REPLACE('aaa','a',null) ;
EXPLAIN EXTENDED SELECT REPLACE('ab','a',null) ;
CREATE VIEW v1 AS SELECT REPLACE('ab','a',null) ;
SHOW CREATE VIEW v1;
SELECT * FROM v1;
DROP VIEW v1;