-
Ajo Robert authored
IN NESTED CONDITION Analysis ======== Aggregate function in certain nested queries does have context set to aggregate select instead of bsae select of the item and leads to unwanted behaviour during merge context. The problem lies within Item::split_sum_func2(), where an Item_aggregate_ref object that wraps the set function is created. It is created with context.select_lex equal to the aggregation query block, and depended_from is the same query block, when this query block is different from the "base" query block of the set function. Fix ==== Created the Item_aggregate_ref with context.select_lex set to be the "base" query block of the set function, and depended_from as the aggregation query block. [This is a backport of a change done in 8.0 to fix Bug#17270896: Crash in Item_ident::fix_after_pullout()]
Ajo Robert authoredIN NESTED CONDITION Analysis ======== Aggregate function in certain nested queries does have context set to aggregate select instead of bsae select of the item and leads to unwanted behaviour during merge context. The problem lies within Item::split_sum_func2(), where an Item_aggregate_ref object that wraps the set function is created. It is created with context.select_lex equal to the aggregation query block, and depended_from is the same query block, when this query block is different from the "base" query block of the set function. Fix ==== Created the Item_aggregate_ref with context.select_lex set to be the "base" query block of the set function, and depended_from as the aggregation query block. [This is a backport of a change done in 8.0 to fix Bug#17270896: Crash in Item_ident::fix_after_pullout()]
Loading