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
908bc222
Commit
908bc222
authored
Nov 26, 2003
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avoiding coping tmptable_param
parent
5a751464
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
sql/sql_derived.cc
sql/sql_derived.cc
+4
-5
sql/sql_union.cc
sql/sql_union.cc
+1
-1
No files found.
sql/sql_derived.cc
View file @
908bc222
...
...
@@ -128,14 +128,14 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit,
cursor
->
table
->
clear_query_id
=
1
;
}
bzero
((
char
*
)
&
tmp_table_param
,
sizeof
(
tmp_table_param
));
tmp_table_param
.
field_count
=
unit
->
types
.
elements
;
bzero
((
char
*
)
&
derived_result
->
tmp_table_param
,
sizeof
(
tmp_table_param
));
derived_result
->
tmp_table_param
.
field_count
=
unit
->
types
.
elements
;
/*
Temp table is created so that it hounours if UNION without ALL is to be
processed
*/
if
(
!
(
table
=
create_tmp_table
(
thd
,
&
tmp_table_param
,
unit
->
types
,
(
ORDER
*
)
0
,
if
(
!
(
table
=
create_tmp_table
(
thd
,
&
derived_result
->
tmp_table_param
,
unit
->
types
,
(
ORDER
*
)
0
,
is_union
&&
!
unit
->
union_option
,
1
,
(
first_select
->
options
|
thd
->
options
|
TMP_TABLE_ALL_COLUMNS
),
...
...
@@ -146,7 +146,6 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit,
goto
exit
;
}
derived_result
->
set_table
(
table
);
derived_result
->
tmp_table_param
=
tmp_table_param
;
unit
->
offset_limit_cnt
=
first_select
->
offset_limit
;
unit
->
select_limit_cnt
=
first_select
->
select_limit
+
...
...
sql/sql_union.cc
View file @
908bc222
...
...
@@ -144,7 +144,7 @@ int st_select_lex_unit::prepare(THD *thd, select_result *sel_result)
first_select
->
braces
=
1
;
tmp_table_param
=
&
tmp_table_param_storage
;
}
bzero
((
char
*
)
tmp_table_param
,
sizeof
(
TMP_TABLE_PARAM
));
bzero
((
char
*
)
tmp_table_param
,
sizeof
(
TMP_TABLE_PARAM
));
for
(;
sl
;
sl
=
sl
->
next_select
())
...
...
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