Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
fad348a9
Commit
fad348a9
authored
Jun 07, 2020
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-22822 sql_mode="oracle" cannot declare without variable errors
parent
4612cb88
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
83 additions
and
2 deletions
+83
-2
mysql-test/suite/compat/oracle/r/parser.result
mysql-test/suite/compat/oracle/r/parser.result
+34
-0
mysql-test/suite/compat/oracle/t/parser.test
mysql-test/suite/compat/oracle/t/parser.test
+47
-0
sql/sql_yacc_ora.yy
sql/sql_yacc_ora.yy
+2
-2
No files found.
mysql-test/suite/compat/oracle/r/parser.result
View file @
fad348a9
...
...
@@ -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
#
mysql-test/suite/compat/oracle/t/parser.test
View file @
fad348a9
...
...
@@ -409,6 +409,53 @@ SELECT @@GLOBAL.password;
SELECT
@@
GLOBAL
.
role
;
--
echo
#
--
echo
# MDEV-22822 sql_mode="oracle" cannot declare without variable errors
--
echo
#
--
echo
# It's OK to have no declarations between DECLARE and BEGIN.
--
echo
#
DELIMITER
//;
BEGIN
DECLARE
BEGIN
NULL
;
END
;
EXCEPTION
WHEN
OTHERS
THEN
NULL
;
END
;
//
DELIMITER
;
//
DELIMITER
//;
DECLARE
BEGIN
NULL
;
EXCEPTION
WHEN
OTHERS
THEN
NULL
;
END
;
//
DELIMITER
;
//
DELIMITER
//;
BEGIN
<<
lab
>>
DECLARE
BEGIN
NULL
;
END
;
EXCEPTION
WHEN
OTHERS
THEN
NULL
;
END
;
//
DELIMITER
;
//
--
echo
#
--
echo
# End of 10.3 tests
--
echo
#
sql/sql_yacc_ora.yy
View file @
fad348a9
...
...
@@ -4463,7 +4463,7 @@ sp_labeled_block:
{
Lex->sp_block_init(thd, &$1);
}
sp_decl_body_list
opt_
sp_decl_body_list
{
if (unlikely(Lex->sp_block_with_exceptions_finalize_declarations(thd)))
MYSQL_YYABORT;
...
...
@@ -4505,7 +4505,7 @@ sp_unlabeled_block:
MYSQL_YYABORT;
Lex->sp_block_init(thd);
}
sp_decl_body_list
opt_
sp_decl_body_list
{
if (unlikely(Lex->sp_block_with_exceptions_finalize_declarations(thd)))
MYSQL_YYABORT;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment