mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 04:22:27 +01:00
In make_join_select():
- move attempt to evaluate join->exec_const_cond() out of the "Extract constant part of each ON expression" loop (it got there by mistake when merging).
This commit is contained in:
parent
9f6f04360a
commit
0f22ba3cfe
1 changed files with 8 additions and 8 deletions
|
@ -7726,6 +7726,14 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
|
|||
|
||||
DBUG_EXECUTE("where",print_where(join->exec_const_cond,"constants",
|
||||
QT_ORDINARY););
|
||||
if (join->exec_const_cond && !join->exec_const_cond->is_expensive() &&
|
||||
!join->exec_const_cond->val_int())
|
||||
{
|
||||
DBUG_PRINT("info",("Found impossible WHERE condition"));
|
||||
join->exec_const_cond= NULL;
|
||||
DBUG_RETURN(1); // Impossible const condition
|
||||
}
|
||||
|
||||
uint linear_no= join->const_tables;
|
||||
for (JOIN_TAB *tab= first_linear_tab(join, WITHOUT_CONST_TABLES);
|
||||
tab;
|
||||
|
@ -7754,14 +7762,6 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
|
|||
}
|
||||
}
|
||||
|
||||
if (join->exec_const_cond && !join->exec_const_cond->is_expensive() &&
|
||||
!join->exec_const_cond->val_int())
|
||||
{
|
||||
DBUG_PRINT("info",("Found impossible WHERE condition"));
|
||||
join->exec_const_cond= NULL;
|
||||
DBUG_RETURN(1); // Impossible const condition
|
||||
}
|
||||
|
||||
COND *outer_ref_cond= make_cond_for_table(thd, cond,
|
||||
OUTER_REF_TABLE_BIT,
|
||||
OUTER_REF_TABLE_BIT,
|
||||
|
|
Loading…
Reference in a new issue