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

MDEV-22822 sql_mode="oracle" cannot declare without variable errors

This commit is contained in:
Alexander Barkov
2020-06-07 16:23:47 +04:00
parent 4612cb88fa
commit fad348a9a6
3 changed files with 83 additions and 2 deletions

View File

@ -607,5 +607,39 @@ ERROR HY000: Unknown system variable 'password'
SELECT @@GLOBAL.role;
ERROR HY000: Unknown system variable 'role'
#
# MDEV-22822 sql_mode="oracle" cannot declare without variable errors
#
# It's OK to have no declarations between DECLARE and BEGIN.
#
BEGIN
DECLARE
BEGIN
NULL;
END;
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
//
DECLARE
BEGIN
NULL;
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
//
BEGIN
<<lab>>
DECLARE
BEGIN
NULL;
END;
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
//
#
# End of 10.3 tests
#