Skip to content

Commit 1f1ee08

Browse files
Sergei Krivonosohhmm
authored andcommitted
MDEV-23766: Fix fix_semijoin_strategies_for_picked_join_order by assert
1 parent 47ab793 commit 1f1ee08

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sql/opt_subselect.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3819,9 +3819,9 @@ void fix_semijoin_strategies_for_picked_join_order(JOIN *join)
38193819
Json_writer_array semijoin_plan(thd, "join_order");
38203820
for (i= first + sjm->tables; i <= tablenr; i++)
38213821
{
3822+
Json_writer_object trace_one_table(thd);
38223823
if (unlikely(thd->trace_started()))
38233824
{
3824-
Json_writer_object trace_one_table(thd);
38253825
trace_one_table.add_table_name(join->best_positions[i].table);
38263826
}
38273827
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)
38583858
Json_writer_array semijoin_plan(thd, "join_order");
38593859
for (idx= first; idx <= tablenr; idx++)
38603860
{
3861+
Json_writer_object trace_one_table(thd);
38613862
if (unlikely(thd->trace_started()))
38623863
{
3863-
Json_writer_object trace_one_table(thd);
38643864
trace_one_table.add_table_name(join->best_positions[idx].table);
38653865
}
38663866
if (join->best_positions[idx].use_join_buffer)
@@ -3897,9 +3897,9 @@ void fix_semijoin_strategies_for_picked_join_order(JOIN *join)
38973897
Json_writer_array semijoin_plan(thd, "join_order");
38983898
for (idx= first; idx <= tablenr; idx++)
38993899
{
3900+
Json_writer_object trace_one_table(thd);
39003901
if (unlikely(thd->trace_started()))
39013902
{
3902-
Json_writer_object trace_one_table(thd);
39033903
trace_one_table.add_table_name(join->best_positions[idx].table);
39043904
}
39053905
if (join->best_positions[idx].use_join_buffer || (idx == first))

0 commit comments

Comments
 (0)