Commit 1f1ee085 authored by Sergei Krivonos's avatar Sergei Krivonos Committed by Sergei Krivonos

MDEV-23766: Fix fix_semijoin_strategies_for_picked_join_order by assert

parent 47ab793d
...@@ -3819,9 +3819,9 @@ void fix_semijoin_strategies_for_picked_join_order(JOIN *join) ...@@ -3819,9 +3819,9 @@ void fix_semijoin_strategies_for_picked_join_order(JOIN *join)
Json_writer_array semijoin_plan(thd, "join_order"); Json_writer_array semijoin_plan(thd, "join_order");
for (i= first + sjm->tables; i <= tablenr; i++) for (i= first + sjm->tables; i <= tablenr; i++)
{ {
Json_writer_object trace_one_table(thd);
if (unlikely(thd->trace_started())) if (unlikely(thd->trace_started()))
{ {
Json_writer_object trace_one_table(thd);
trace_one_table.add_table_name(join->best_positions[i].table); trace_one_table.add_table_name(join->best_positions[i].table);
} }
best_access_path(join, join->best_positions[i].table, rem_tables, best_access_path(join, join->best_positions[i].table, rem_tables,
...@@ -3858,9 +3858,9 @@ void fix_semijoin_strategies_for_picked_join_order(JOIN *join) ...@@ -3858,9 +3858,9 @@ void fix_semijoin_strategies_for_picked_join_order(JOIN *join)
Json_writer_array semijoin_plan(thd, "join_order"); Json_writer_array semijoin_plan(thd, "join_order");
for (idx= first; idx <= tablenr; idx++) for (idx= first; idx <= tablenr; idx++)
{ {
Json_writer_object trace_one_table(thd);
if (unlikely(thd->trace_started())) if (unlikely(thd->trace_started()))
{ {
Json_writer_object trace_one_table(thd);
trace_one_table.add_table_name(join->best_positions[idx].table); trace_one_table.add_table_name(join->best_positions[idx].table);
} }
if (join->best_positions[idx].use_join_buffer) if (join->best_positions[idx].use_join_buffer)
...@@ -3897,9 +3897,9 @@ void fix_semijoin_strategies_for_picked_join_order(JOIN *join) ...@@ -3897,9 +3897,9 @@ void fix_semijoin_strategies_for_picked_join_order(JOIN *join)
Json_writer_array semijoin_plan(thd, "join_order"); Json_writer_array semijoin_plan(thd, "join_order");
for (idx= first; idx <= tablenr; idx++) for (idx= first; idx <= tablenr; idx++)
{ {
Json_writer_object trace_one_table(thd);
if (unlikely(thd->trace_started())) if (unlikely(thd->trace_started()))
{ {
Json_writer_object trace_one_table(thd);
trace_one_table.add_table_name(join->best_positions[idx].table); trace_one_table.add_table_name(join->best_positions[idx].table);
} }
if (join->best_positions[idx].use_join_buffer || (idx == first)) if (join->best_positions[idx].use_join_buffer || (idx == first))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment