mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
MDEV-32868 Cleanup (no change of logic)
Switch branches of the `if` condition to make the code flow more naturally.
This commit is contained in:
@@ -13307,12 +13307,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
|
||||
{
|
||||
Json_writer_object trace_const_cond(thd);
|
||||
trace_const_cond.add("condition_on_constant_tables", const_cond);
|
||||
if (!const_cond->can_eval_in_optimize())
|
||||
{
|
||||
trace_const_cond.add("evaluated", "false")
|
||||
.add("cause", "expensive cond");
|
||||
}
|
||||
else
|
||||
if (const_cond->can_eval_in_optimize())
|
||||
{
|
||||
bool const_cond_result;
|
||||
{
|
||||
@@ -13328,6 +13323,11 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
trace_const_cond.add("evaluated", "false")
|
||||
.add("cause", "expensive cond");
|
||||
}
|
||||
join->exec_const_cond= const_cond;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user