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

MDEV-31184 Remove parser tokens DECODE_MARIADB_SYM and DECODE_ORACLE_SYM

Changing the code handling sql_mode-dependent function DECODE():

- removing parser tokens DECODE_MARIADB_SYM and DECODE_ORACLE_SYM
- removing the DECODE() related code from sql_yacc.yy/sql_yacc_ora.yy
- adding handling of DECODE() with help of a new Create_func_func_decode
This commit is contained in:
Alexander Barkov
2023-04-28 16:13:38 +04:00
parent c5f776e9fa
commit 09e237088c
9 changed files with 72 additions and 96 deletions

View File

@ -1,8 +1,8 @@
SET sql_mode=ORACLE;
--error ER_PARSE_ERROR
--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
SELECT DECODE(10);
--error ER_PARSE_ERROR
--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
SELECT DECODE(10,10);
SELECT DECODE(10,10,'x10');
@ -25,9 +25,9 @@ DROP TABLE decode;
--echo # MDEV-13863 sql_mode=ORACLE: DECODE does not treat two NULLs as equivalent
--echo #
--error ER_PARSE_ERROR
--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
SELECT DECODE(10);
--error ER_PARSE_ERROR
--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
SELECT DECODE(10,10);
--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT