summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Krivonos <sergei.krivonos@mariadb.com>2021-10-29 01:32:21 +0300
committerSergei Krivonos <sergeikrivonos@gmail.com>2021-11-02 14:36:06 +0200
commit6806ede662563302c193aabf8114beb08089f43f (patch)
treedfd24192f202679156295adb6b0a0e44914df857
parentf93d8c23da0cf4ff73ae3ae389a9c1252c41e575 (diff)
downloadmariadb-git-6806ede662563302c193aabf8114beb08089f43f.tar.gz
MDEV-23766: Fix fix_semijoin_strategies_for_picked_join_order by assert
-rw-r--r--sql/opt_subselect.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc
index 7bd778e339f..cef6cd9c160 100644
--- a/sql/opt_subselect.cc
+++ b/sql/opt_subselect.cc
@@ -3819,9 +3819,9 @@ void fix_semijoin_strategies_for_picked_join_order(JOIN *join)
Json_writer_array semijoin_plan(thd, "join_order");
for (i= first + sjm->tables; i <= tablenr; i++)
{
+ Json_writer_object trace_one_table(thd);
if (unlikely(thd->trace_started()))
{
- Json_writer_object trace_one_table(thd);
trace_one_table.add_table_name(join->best_positions[i].table);
}
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)
Json_writer_array semijoin_plan(thd, "join_order");
for (idx= first; idx <= tablenr; idx++)
{
+ Json_writer_object trace_one_table(thd);
if (unlikely(thd->trace_started()))
{
- Json_writer_object trace_one_table(thd);
trace_one_table.add_table_name(join->best_positions[idx].table);
}
if (join->best_positions[idx].use_join_buffer)
@@ -3897,9 +3897,9 @@ void fix_semijoin_strategies_for_picked_join_order(JOIN *join)
Json_writer_array semijoin_plan(thd, "join_order");
for (idx= first; idx <= tablenr; idx++)
{
+ Json_writer_object trace_one_table(thd);
if (unlikely(thd->trace_started()))
{
- Json_writer_object trace_one_table(thd);
trace_one_table.add_table_name(join->best_positions[idx].table);
}
if (join->best_positions[idx].use_join_buffer || (idx == first))