mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fixed crashing bug when using ONLY_FULL_GROUP_BY in a stored procedure/trigger that is repeatedly executed.
This is MDEV-7601, including it's sub tasks MDEV-7594, MDEV-7555, MDEV-7590, MDEV-7581, MDEV-7589 The problem was that select_lex->non_agg_fields was not properly reset for re-execution and this caused an overwrite of a random memory position. The fix was move non_agg_fields from select_lext to JOIN, which is properly reset.
This commit is contained in:
@ -922,6 +922,9 @@ public:
|
||||
Item *pre_sort_idx_pushed_cond;
|
||||
void clean_pre_sort_join_tab();
|
||||
|
||||
/* List of fields that aren't under an aggregate function */
|
||||
List<Item_field> non_agg_fields;
|
||||
|
||||
/*
|
||||
For "Using temporary+Using filesort" queries, JOIN::join_tab can point to
|
||||
either:
|
||||
@ -1301,6 +1304,7 @@ public:
|
||||
all_fields= fields_arg;
|
||||
if (&fields_list != &fields_arg) /* Avoid valgrind-warning */
|
||||
fields_list= fields_arg;
|
||||
non_agg_fields.empty();
|
||||
bzero((char*) &keyuse,sizeof(keyuse));
|
||||
tmp_table_param.init();
|
||||
tmp_table_param.end_write_records= HA_POS_ERROR;
|
||||
|
Reference in New Issue
Block a user