1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-30964: MAX_SEL_ARG memory exhaustion is not visible in the optimizer trace

Add printing
This commit is contained in:
Sergei Petrunia
2023-03-29 19:42:21 +03:00
parent 2165c30486
commit f5dceafd0b
3 changed files with 81 additions and 0 deletions

View File

@@ -2853,6 +2853,13 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
Json_writer_array trace_range_summary(thd,
"setup_range_conditions");
tree= cond->get_mm_tree(&param, &cond);
if (thd->trace_started() &&
param.alloced_sel_args >= SEL_ARG::MAX_SEL_ARGS)
{
Json_writer_object wrapper(thd);
Json_writer_object obj(thd, "sel_arg_alloc_limit_hit");
obj.add("alloced_sel_args", param.alloced_sel_args);
}
}
if (tree)
{