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
d679b52e
Commit
d679b52e
authored
Oct 25, 2003
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed unlinking SELECT methods
parent
f8b833c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
sql/sql_lex.cc
sql/sql_lex.cc
+17
-0
No files found.
sql/sql_lex.cc
View file @
d679b52e
...
...
@@ -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
;
}
...
...
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