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
f293edd1
Commit
f293edd1
authored
Oct 25, 2003
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Plain Diff
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-4.1
parents
7891550e
defa3d48
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
sql/sql_lex.cc
sql/sql_lex.cc
+17
-0
sql/sql_parse.cc
sql/sql_parse.cc
+1
-1
No files found.
sql/sql_lex.cc
View file @
f293edd1
...
...
@@ -1112,8 +1112,11 @@ void st_select_lex_unit::exclude_level()
SELECT_LEX_UNIT
*
units
=
0
,
**
units_last
=
&
units
;
for
(
SELECT_LEX
*
sl
=
first_select
();
sl
;
sl
=
sl
->
next_select
())
{
// unlink current level from global SELECTs list
if
(
sl
->
link_prev
&&
(
*
sl
->
link_prev
=
sl
->
link_next
))
sl
->
link_next
->
link_prev
=
sl
->
link_prev
;
// bring up underlay levels
SELECT_LEX_UNIT
**
last
=
0
;
for
(
SELECT_LEX_UNIT
*
u
=
sl
->
first_inner_unit
();
u
;
u
=
u
->
next_unit
())
{
...
...
@@ -1128,11 +1131,20 @@ void st_select_lex_unit::exclude_level()
}
if
(
units
)
{
// include brought up levels in place of current
(
*
prev
)
=
units
;
(
*
units_last
)
=
(
SELECT_LEX_UNIT
*
)
next
;
if
(
next
)
next
->
prev
=
(
SELECT_LEX_NODE
**
)
units_last
;
units
->
prev
=
prev
;
}
else
{
// exclude currect unit from list of nodes
(
*
prev
)
=
next
;
if
(
next
)
next
->
prev
=
prev
;
}
}
...
...
@@ -1147,15 +1159,20 @@ void st_select_lex_unit::exclude_tree()
SELECT_LEX_UNIT
*
units
=
0
,
**
units_last
=
&
units
;
for
(
SELECT_LEX
*
sl
=
first_select
();
sl
;
sl
=
sl
->
next_select
())
{
// unlink current level from global SELECTs list
if
(
sl
->
link_prev
&&
(
*
sl
->
link_prev
=
sl
->
link_next
))
sl
->
link_next
->
link_prev
=
sl
->
link_prev
;
// unlink underlay levels
for
(
SELECT_LEX_UNIT
*
u
=
sl
->
first_inner_unit
();
u
;
u
=
u
->
next_unit
())
{
u
->
exclude_level
();
}
}
// exclude currect unit from list of nodes
(
*
prev
)
=
next
;
if
(
next
)
next
->
prev
=
prev
;
}
...
...
sql/sql_parse.cc
View file @
f293edd1
...
...
@@ -3708,7 +3708,6 @@ mysql_new_select(LEX *lex, bool move_down)
unit
->
link_prev
=
0
;
unit
->
return_to
=
lex
->
current_select
;
select_lex
->
include_down
(
unit
);
// TODO: assign resolve_mode for fake subquery after merging with new tree
}
else
{
...
...
@@ -3728,6 +3727,7 @@ mysql_new_select(LEX *lex, bool move_down)
fake
->
make_empty_select
();
fake
->
linkage
=
GLOBAL_OPTIONS_TYPE
;
fake
->
select_limit
=
lex
->
thd
->
variables
.
select_limit
;
fake
->
resolve_mode
=
SELECT_LEX
::
SELECT_MODE
;
}
}
...
...
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