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
5b6b1663
Commit
5b6b1663
authored
Oct 17, 2019
by
Oleksandr Byelkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-20730: Syntax error on SELECT INTO @variable with CTE
added forgotem WITH option to spacial case with INTO
parent
421d52e8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
0 deletions
+62
-0
mysql-test/main/cte_nonrecursive.result
mysql-test/main/cte_nonrecursive.result
+11
-0
mysql-test/main/cte_nonrecursive.test
mysql-test/main/cte_nonrecursive.test
+15
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+18
-0
sql/sql_yacc_ora.yy
sql/sql_yacc_ora.yy
+18
-0
No files found.
mysql-test/main/cte_nonrecursive.result
View file @
5b6b1663
...
...
@@ -1673,3 +1673,14 @@ with columns as (select 1 as t) select * from columns;
t
1
use test;
#
# MDEV-20730: Syntax error on SELECT INTO @variable with CTE
#
with data as (select 1 as id)
select id into @myid from data;
set @save_sql_mode = @@sql_mode;
set sql_mode="oracle";
with data as (select 1 as id)
select id into @myid from data;
set sql_mode= @save_sql_mode;
# End of 10.4 tests
mysql-test/main/cte_nonrecursive.test
View file @
5b6b1663
...
...
@@ -1182,3 +1182,18 @@ with t as (select 1 as t) select * from t;
with
columns
as
(
select
1
as
t
)
select
*
from
columns
;
use
test
;
--
echo
#
--
echo
# MDEV-20730: Syntax error on SELECT INTO @variable with CTE
--
echo
#
with
data
as
(
select
1
as
id
)
select
id
into
@
myid
from
data
;
set
@
save_sql_mode
=
@@
sql_mode
;
set
sql_mode
=
"oracle"
;
with
data
as
(
select
1
as
id
)
select
id
into
@
myid
from
data
;
set
sql_mode
=
@
save_sql_mode
;
--
echo
# End of 10.4 tests
sql/sql_yacc.yy
View file @
5b6b1663
...
...
@@ -9213,6 +9213,24 @@ select_into:
if (Lex->select_finalize(unit))
MYSQL_YYABORT;
}
| with_clause
select_into_query_specification
{
if (Lex->push_select($2))
MYSQL_YYABORT;
}
opt_order_limit_lock
{
SELECT_LEX_UNIT *unit;
if (!(unit = Lex->create_unit($2)))
MYSQL_YYABORT;
if ($4)
unit= Lex->add_tail_to_query_expression_body(unit, $4);
unit->set_with_clause($1);
$1->attach_to($2);
if (Lex->select_finalize(unit))
MYSQL_YYABORT;
}
;
simple_table:
...
...
sql/sql_yacc_ora.yy
View file @
5b6b1663
...
...
@@ -9314,6 +9314,24 @@ select_into:
if (Lex->select_finalize(unit))
MYSQL_YYABORT;
}
| with_clause
select_into_query_specification
{
if (Lex->push_select($2))
MYSQL_YYABORT;
}
opt_order_limit_lock
{
SELECT_LEX_UNIT *unit;
if (!(unit = Lex->create_unit($2)))
MYSQL_YYABORT;
if ($4)
unit= Lex->add_tail_to_query_expression_body(unit, $4);
unit->set_with_clause($1);
$1->attach_to($2);
if (Lex->select_finalize(unit))
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