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

MDEV-12143 sql_mode=ORACLE: make the CONCAT function ignore NULL arguments

This commit is contained in:
Alexander Barkov
2017-02-27 17:47:06 +04:00
parent 915c5df865
commit 839e0947ee
4 changed files with 42 additions and 1 deletions

View File

@ -4,6 +4,11 @@ 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 'a' || 'b' || 'c' AS "'a'||'b'||'c'"
EXPLAIN EXTENDED SELECT CONCAT('a'||'b'||'c');
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 'a' || 'b' || 'c' AS "CONCAT('a'||'b'||'c')"
SELECT '' || '';
'' || ''
@ -169,4 +174,33 @@ NULL NULL
2 ab
2 ab
3 abc
SELECT LENGTH(CONCAT(a||b||c)), CONCAT(a||b||c) FROM t1 ORDER BY a,b,c;
LENGTH(CONCAT(a||b||c)) CONCAT(a||b||c)
NULL NULL
0
1 c
0
0
1 c
1 b
1 b
2 bc
0
0
1 c
0
0
1 c
1 b
1 b
2 bc
1 a
1 a
2 ac
1 a
1 a
2 ac
2 ab
2 ab
3 abc
DROP TABLE t1;