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
12729660
Commit
12729660
authored
Jul 16, 2009
by
Georgi Kodinov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #46003 and bug #46034: backported the fixes from azalea.
parent
40eb1304
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
9 deletions
+26
-9
sql/sql_base.cc
sql/sql_base.cc
+7
-1
sql/sql_select.cc
sql/sql_select.cc
+17
-7
sql/sql_select.h
sql/sql_select.h
+2
-1
No files found.
sql/sql_base.cc
View file @
12729660
...
...
@@ -5095,6 +5095,12 @@ int setup_wild(THD *thd, TABLE_LIST *tables, List<Item> &fields,
/* make * substituting permanent */
SELECT_LEX
*
select_lex
=
thd
->
lex
->
current_select
;
select_lex
->
with_wild
=
0
;
/*
The assignment below is translated to memcpy() call (at least on some
platforms). memcpy() expects that source and destination areas do not
overlap. That problem was detected by valgrind.
*/
if
(
&
select_lex
->
item_list
!=
&
fields
)
select_lex
->
item_list
=
fields
;
thd
->
restore_active_arena
(
arena
,
&
backup
);
...
...
sql/sql_select.cc
View file @
12729660
...
...
@@ -1748,6 +1748,7 @@ JOIN::exec()
curr_join
->
having
=
curr_join
->
tmp_having
=
0
;
// Allready done
/* Change sum_fields reference to calculated fields in tmp_table */
if
(
curr_join
!=
this
)
curr_join
->
all_fields
=
*
curr_all_fields
;
if
(
!
items1
)
{
...
...
@@ -1767,8 +1768,11 @@ JOIN::exec()
fields_list
.
elements
,
all_fields
))
DBUG_VOID_RETURN
;
}
if
(
curr_join
!=
this
)
{
curr_join
->
tmp_all_fields1
=
tmp_all_fields1
;
curr_join
->
tmp_fields_list1
=
tmp_fields_list1
;
}
curr_join
->
items1
=
items1
;
}
curr_all_fields
=
&
tmp_all_fields1
;
...
...
@@ -1913,9 +1917,12 @@ JOIN::exec()
tmp_fields_list2
,
tmp_all_fields2
,
fields_list
.
elements
,
tmp_all_fields1
))
DBUG_VOID_RETURN
;
if
(
curr_join
!=
this
)
{
curr_join
->
tmp_fields_list2
=
tmp_fields_list2
;
curr_join
->
tmp_all_fields2
=
tmp_all_fields2
;
}
}
curr_fields_list
=
&
curr_join
->
tmp_fields_list2
;
curr_all_fields
=
&
curr_join
->
tmp_all_fields2
;
curr_join
->
set_items_ref_array
(
items2
);
...
...
@@ -1969,9 +1976,12 @@ JOIN::exec()
tmp_table_param
.
save_copy_field
=
curr_join
->
tmp_table_param
.
copy_field
;
tmp_table_param
.
save_copy_field_end
=
curr_join
->
tmp_table_param
.
copy_field_end
;
if
(
curr_join
!=
this
)
{
curr_join
->
tmp_all_fields3
=
tmp_all_fields3
;
curr_join
->
tmp_fields_list3
=
tmp_fields_list3
;
}
}
else
{
curr_join
->
tmp_table_param
.
copy_funcs
=
tmp_table_param
.
save_copy_funcs
;
...
...
sql/sql_select.h
View file @
12729660
...
...
@@ -416,6 +416,7 @@ class JOIN :public Sql_alloc
group_optimized_away
=
0
;
all_fields
=
fields_arg
;
if
(
&
fields_list
!=
&
fields_arg
)
/* Avoid valgrind-warning */
fields_list
=
fields_arg
;
bzero
((
char
*
)
&
keyuse
,
sizeof
(
keyuse
));
tmp_table_param
.
init
();
...
...
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