mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-21883 Server crashes when joining a subselect with 32 tables and GROUP BY
This bug could cause a crash for any query that used a derived table/view/CTE whose specification was a SELECT with a GROUP BY clause and a FROM list containing 32 or more table references. The problem appeared only in the cases when the splitting optimization could be applied to such derived table/view/CTE.
This commit is contained in:
@ -968,7 +968,7 @@ SplM_plan_info * JOIN_TAB::choose_best_splitting(double record_count,
|
||||
The plan for the chosen key has not been found in the cache.
|
||||
Build a new plan and save info on it in the cache
|
||||
*/
|
||||
table_map all_table_map= (1 << join->table_count) - 1;
|
||||
table_map all_table_map= (((table_map) 1) << join->table_count) - 1;
|
||||
reset_validity_vars_for_keyuses(best_key_keyuse_ext_start, best_table,
|
||||
best_key, remaining_tables, true);
|
||||
choose_plan(join, all_table_map & ~join->const_table_map);
|
||||
|
Reference in New Issue
Block a user