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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
4e206330
Commit
4e206330
authored
Dec 09, 2002
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix for a bug with UNION in sub-select's and start working on
UNION's in derived tables
parent
89524b29
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
1 deletion
+7
-1
mysql-test/r/union.result
mysql-test/r/union.result
+3
-0
mysql-test/t/union.test
mysql-test/t/union.test
+1
-0
sql/sql_union.cc
sql/sql_union.cc
+2
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+1
-1
No files found.
mysql-test/r/union.result
View file @
4e206330
...
@@ -201,3 +201,6 @@ set SQL_SELECT_LIMIT=DEFAULT;
...
@@ -201,3 +201,6 @@ set SQL_SELECT_LIMIT=DEFAULT;
drop table t1,t2;
drop table t1,t2;
select * union select 1;
select * union select 1;
No tables used
No tables used
select 1 as a,(select a union select a);
a (select a union select a)
1 1
mysql-test/t/union.test
View file @
4e206330
...
@@ -103,3 +103,4 @@ drop table t1,t2;
...
@@ -103,3 +103,4 @@ drop table t1,t2;
--
error
1096
--
error
1096
select
*
union
select
1
;
select
*
union
select
1
;
select
1
as
a
,(
select
a
union
select
a
);
sql/sql_union.cc
View file @
4e206330
...
@@ -125,6 +125,8 @@ int st_select_lex_unit::prepare(THD *thd, select_result *result)
...
@@ -125,6 +125,8 @@ int st_select_lex_unit::prepare(THD *thd, select_result *result)
SELECT_LEX_NODE
*
lex_select_save
=
thd
->
lex
.
current_select
;
SELECT_LEX_NODE
*
lex_select_save
=
thd
->
lex
.
current_select
;
SELECT_LEX
*
sl
;
SELECT_LEX
*
sl
;
if
(
lex_select_save
->
linkage
!=
DERIVED_TABLE_TYPE
)
thd
->
lex
.
current_select
=
first_select
();
/* Global option */
/* Global option */
if
(((
void
*
)(
global_parameters
))
==
((
void
*
)
this
))
if
(((
void
*
)(
global_parameters
))
==
((
void
*
)
this
))
{
{
...
...
sql/sql_yacc.yy
View file @
4e206330
...
@@ -2504,7 +2504,7 @@ select_derived:
...
@@ -2504,7 +2504,7 @@ select_derived:
mysql_init_select(lex);
mysql_init_select(lex);
lex->current_select->linkage= DERIVED_TABLE_TYPE;
lex->current_select->linkage= DERIVED_TABLE_TYPE;
}
}
select_options select_item_list opt_select_from
select_options select_item_list opt_select_from
union_opt
;
;
opt_outer:
opt_outer:
...
...
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