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
c0977073
Commit
c0977073
authored
Oct 03, 2014
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-6743 crash in GROUP_CONCAT(IF () ORDER BY 1)
backport the new fix from 10.0
parent
604b6533
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
13 deletions
+1
-13
sql/item_sum.cc
sql/item_sum.cc
+0
-12
sql/sql_select.cc
sql/sql_select.cc
+1
-1
No files found.
sql/item_sum.cc
View file @
c0977073
...
...
@@ -3295,18 +3295,6 @@ void Item_func_group_concat::cleanup()
DBUG_ASSERT
(
tree
==
0
);
}
/*
For prepared statements we have to restore pointers for ORDER BY as
they may point to areas that are freed at cleanup().
*/
if
(
!
current_thd
->
stmt_arena
->
is_conventional
()
&&
arg_count_order
)
{
memcpy
(
args
+
arg_count_field
,
orig_args
+
arg_count_field
,
sizeof
(
Item
*
)
*
arg_count_order
);
for
(
uint
i
=
0
;
i
<
arg_count_order
;
i
++
)
order
[
i
]
->
item
=
args
+
arg_count_field
+
i
;
}
DBUG_VOID_RETURN
;
}
...
...
sql/sql_select.cc
View file @
c0977073
...
...
@@ -20425,7 +20425,7 @@ find_order_in_list(THD *thd, Item **ref_pointer_array, TABLE_LIST *tables,
order_item
->
full_name
(),
thd
->
where
);
return
TRUE
;
}
order
->
item
=
ref_pointer_array
+
count
-
1
;
thd
->
change_item_tree
((
Item
**
)
&
order
->
item
,
(
Item
*
)(
ref_pointer_array
+
count
-
1
))
;
order
->
in_field_list
=
1
;
order
->
counter
=
count
;
order
->
counter_used
=
1
;
...
...
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