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
b633c0ff
Commit
b633c0ff
authored
Nov 26, 2003
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avoiding coping tmp_table_param
parent
2fb65b4d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
sql/sql_union.cc
sql/sql_union.cc
+7
-5
No files found.
sql/sql_union.cc
View file @
b633c0ff
...
...
@@ -123,9 +123,8 @@ int st_select_lex_unit::prepare(THD *thd, select_result *sel_result)
DBUG_RETURN
(
0
);
prepared
=
1
;
res
=
0
;
TMP_TABLE_PARAM
tmp_table_param
;
TMP_TABLE_PARAM
*
tmp_table_param
,
tmp_table_param_storage
;
bzero
((
char
*
)
&
tmp_table_param
,
sizeof
(
TMP_TABLE_PARAM
));
thd
->
lex
.
current_select
=
sl
=
first_select
=
first_select_in_union
();
found_rows_for_union
=
first_select
->
options
&
OPTION_FOUND_ROWS
;
...
...
@@ -136,14 +135,17 @@ int st_select_lex_unit::prepare(THD *thd, select_result *sel_result)
if
(
!
(
tmp_result
=
union_result
=
new
select_union
(
0
)))
goto
err
;
union_result
->
not_describe
=
1
;
union_result
->
tmp_table_param
=
tmp_table_param
;
tmp_table_param
=
&
union_result
->
tmp_table_param
;
}
else
{
tmp_result
=
sel_result
;
// single select should be processed like select in p[arantses
first_select
->
braces
=
1
;
tmp_table_param
=
&
tmp_table_param_storage
;
}
bzero
((
char
*
)
tmp_table_param
,
sizeof
(
TMP_TABLE_PARAM
));
for
(;
sl
;
sl
=
sl
->
next_select
())
{
...
...
@@ -205,8 +207,8 @@ int st_select_lex_unit::prepare(THD *thd, select_result *sel_result)
if
(
first_select
->
next_select
())
{
tmp_table_param
.
field_count
=
types
.
elements
;
if
(
!
(
table
=
create_tmp_table
(
thd
,
&
tmp_table_param
,
types
,
tmp_table_param
->
field_count
=
types
.
elements
;
if
(
!
(
table
=
create_tmp_table
(
thd
,
tmp_table_param
,
types
,
(
ORDER
*
)
0
,
!
union_option
,
1
,
(
first_select_in_union
()
->
options
|
thd
->
options
|
...
...
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