Skip to content

Commit 3811b51

Browse files
committed
MDEV-32868 Cleanup (no change of logic)
Switch branches of the `if` condition to make the code flow more naturally.
1 parent 252102e commit 3811b51

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

sql/sql_select.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13307,12 +13307,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
1330713307
{
1330813308
Json_writer_object trace_const_cond(thd);
1330913309
trace_const_cond.add("condition_on_constant_tables", const_cond);
13310-
if (!const_cond->can_eval_in_optimize())
13311-
{
13312-
trace_const_cond.add("evaluated", "false")
13313-
.add("cause", "expensive cond");
13314-
}
13315-
else
13310+
if (const_cond->can_eval_in_optimize())
1331613311
{
1331713312
bool const_cond_result;
1331813313
{
@@ -13328,6 +13323,11 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
1332813323
DBUG_RETURN(1);
1332913324
}
1333013325
}
13326+
else
13327+
{
13328+
trace_const_cond.add("evaluated", "false")
13329+
.add("cause", "expensive cond");
13330+
}
1333113331
join->exec_const_cond= const_cond;
1333213332
}
1333313333

0 commit comments

Comments
 (0)