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
375b9aec
Commit
375b9aec
authored
Aug 27, 2003
by
Sinisa@sinisa.nasamreza.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge fixes
parent
deae76be
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
28 deletions
+25
-28
sql/sql_union.cc
sql/sql_union.cc
+25
-28
No files found.
sql/sql_union.cc
View file @
375b9aec
...
...
@@ -187,34 +187,31 @@ int st_select_lex_unit::prepare(THD *thd, select_result *sel_result,
for
(
SELECT_LEX
*
sl
=
select_cursor
;
sl
;
sl
=
sl
->
next_select
())
{
for
(
SELECT_LEX
*
sl
=
select_cursor
;
sl
;
sl
=
sl
->
next_select
())
{
JOIN
*
join
=
new
JOIN
(
thd
,
sl
->
item_list
,
sl
->
options
|
thd
->
options
|
SELECT_NO_UNLOCK
,
union_result
);
thd
->
lex
.
current_select
=
sl
;
offset_limit_cnt
=
sl
->
offset_limit
;
select_limit_cnt
=
sl
->
select_limit
+
sl
->
offset_limit
;
if
(
select_limit_cnt
<
sl
->
select_limit
)
select_limit_cnt
=
HA_POS_ERROR
;
// no limit
if
(
select_limit_cnt
==
HA_POS_ERROR
||
sl
->
braces
)
sl
->
options
&=
~
OPTION_FOUND_ROWS
;
res
=
join
->
prepare
(
&
sl
->
ref_pointer_array
,
(
TABLE_LIST
*
)
sl
->
table_list
.
first
,
sl
->
with_wild
,
sl
->
where
,
((
sl
->
braces
)
?
sl
->
order_list
.
elements
:
0
)
+
sl
->
group_list
.
elements
,
(
sl
->
braces
)
?
(
ORDER
*
)
sl
->
order_list
.
first
:
(
ORDER
*
)
0
,
(
ORDER
*
)
sl
->
group_list
.
first
,
sl
->
having
,
(
ORDER
*
)
NULL
,
sl
,
this
,
t_and_f
);
t_and_f
=
0
;
if
(
res
||
thd
->
is_fatal_error
)
goto
err
;
}
JOIN
*
join
=
new
JOIN
(
thd
,
sl
->
item_list
,
sl
->
options
|
thd
->
options
|
SELECT_NO_UNLOCK
,
union_result
);
thd
->
lex
.
current_select
=
sl
;
offset_limit_cnt
=
sl
->
offset_limit
;
select_limit_cnt
=
sl
->
select_limit
+
sl
->
offset_limit
;
if
(
select_limit_cnt
<
sl
->
select_limit
)
select_limit_cnt
=
HA_POS_ERROR
;
// no limit
if
(
select_limit_cnt
==
HA_POS_ERROR
||
sl
->
braces
)
sl
->
options
&=
~
OPTION_FOUND_ROWS
;
res
=
join
->
prepare
(
&
sl
->
ref_pointer_array
,
(
TABLE_LIST
*
)
sl
->
table_list
.
first
,
sl
->
with_wild
,
sl
->
where
,
((
sl
->
braces
)
?
sl
->
order_list
.
elements
:
0
)
+
sl
->
group_list
.
elements
,
(
sl
->
braces
)
?
(
ORDER
*
)
sl
->
order_list
.
first
:
(
ORDER
*
)
0
,
(
ORDER
*
)
sl
->
group_list
.
first
,
sl
->
having
,
(
ORDER
*
)
NULL
,
sl
,
this
,
t_and_f
);
t_and_f
=
0
;
if
(
res
||
thd
->
is_fatal_error
)
goto
err
;
}
item_list
.
empty
();
...
...
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