Skip to content

Commit c9d8658

Browse files
author
Omar Sharieff
committed
Bug#37437317 : MySQL Server SEGV within: Table_ref::fetch_number_of_rows
Backport Bug#35647759 fix. When a function is itemized the flags for the arguments are collected first and *THEN* the arguments are itemized. This doesn't account for certain Item itemizations that would replace the item. For these the flags aren't aggregated and INSTALL COMPONENT fails to correctly detect and report the unsupported SET value expression types. Fixed by itemizing the argument first and then collecting the flags. Change-Id: I90e20da96aaf764c37b1db8c4ef332e85eb90b74
1 parent 372b087 commit c9d8658

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql/item_func.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,8 @@ bool Item_func::itemize(Parse_context *pc, Item **res) {
354354
if (Item_result_field::itemize(pc, res)) return true;
355355
const bool no_named_params = !may_have_named_parameters();
356356
for (size_t i = 0; i < arg_count; i++) {
357-
add_accum_properties(args[i]);
358357
if (args[i]->itemize(pc, &args[i])) return true;
358+
add_accum_properties(args[i]);
359359
if (no_named_params && !args[i]->item_name.is_autogenerated()) {
360360
my_error(functype() == FUNC_SP ? ER_WRONG_PARAMETERS_TO_STORED_FCT
361361
: ER_WRONG_PARAMETERS_TO_NATIVE_FCT,

0 commit comments

Comments
 (0)