mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
after review fix
This commit is contained in:
@ -1959,9 +1959,7 @@ add_key_fields(JOIN_TAB *stat,KEY_FIELD **key_fields,uint *and_level,
|
|||||||
break;
|
break;
|
||||||
case Item_func::OPTIMIZE_KEY:
|
case Item_func::OPTIMIZE_KEY:
|
||||||
if (cond_func->key_item()->real_item()->type() == Item::FIELD_ITEM &&
|
if (cond_func->key_item()->real_item()->type() == Item::FIELD_ITEM &&
|
||||||
// field from outer query can't be used as key
|
!(cond_func->used_tables() & OUTER_REF_TABLE_BIT))
|
||||||
!((Item_field*) (cond_func->key_item()->real_item()))
|
|
||||||
->depended_from)
|
|
||||||
add_key_field(key_fields,*and_level,
|
add_key_field(key_fields,*and_level,
|
||||||
((Item_field*) (cond_func->key_item()->real_item()))
|
((Item_field*) (cond_func->key_item()->real_item()))
|
||||||
->field,
|
->field,
|
||||||
@ -1973,9 +1971,7 @@ add_key_fields(JOIN_TAB *stat,KEY_FIELD **key_fields,uint *and_level,
|
|||||||
cond_func->functype() == Item_func::EQUAL_FUNC);
|
cond_func->functype() == Item_func::EQUAL_FUNC);
|
||||||
|
|
||||||
if (cond_func->arguments()[0]->real_item()->type() == Item::FIELD_ITEM &&
|
if (cond_func->arguments()[0]->real_item()->type() == Item::FIELD_ITEM &&
|
||||||
// field from outer query can't be used as key
|
!(cond_func->arguments()[0]->used_tables() & OUTER_REF_TABLE_BIT))
|
||||||
!((Item_field*) (cond_func->arguments()[0]->real_item()))
|
|
||||||
->depended_from)
|
|
||||||
{
|
{
|
||||||
add_key_field(key_fields,*and_level,
|
add_key_field(key_fields,*and_level,
|
||||||
((Item_field*) (cond_func->arguments()[0])->real_item())
|
((Item_field*) (cond_func->arguments()[0])->real_item())
|
||||||
@ -1985,9 +1981,7 @@ add_key_fields(JOIN_TAB *stat,KEY_FIELD **key_fields,uint *and_level,
|
|||||||
}
|
}
|
||||||
if (cond_func->arguments()[1]->real_item()->type() == Item::FIELD_ITEM &&
|
if (cond_func->arguments()[1]->real_item()->type() == Item::FIELD_ITEM &&
|
||||||
cond_func->functype() != Item_func::LIKE_FUNC &&
|
cond_func->functype() != Item_func::LIKE_FUNC &&
|
||||||
// field from outer query can't be used as key
|
!(cond_func->arguments()[0]->used_tables() & OUTER_REF_TABLE_BIT))
|
||||||
!((Item_field*) (cond_func->arguments()[1]->real_item()))
|
|
||||||
->depended_from)
|
|
||||||
{
|
{
|
||||||
add_key_field(key_fields,*and_level,
|
add_key_field(key_fields,*and_level,
|
||||||
((Item_field*) (cond_func->arguments()[1])->real_item())
|
((Item_field*) (cond_func->arguments()[1])->real_item())
|
||||||
@ -2000,9 +1994,7 @@ add_key_fields(JOIN_TAB *stat,KEY_FIELD **key_fields,uint *and_level,
|
|||||||
case Item_func::OPTIMIZE_NULL:
|
case Item_func::OPTIMIZE_NULL:
|
||||||
/* column_name IS [NOT] NULL */
|
/* column_name IS [NOT] NULL */
|
||||||
if (cond_func->arguments()[0]->real_item()->type() == Item::FIELD_ITEM &&
|
if (cond_func->arguments()[0]->real_item()->type() == Item::FIELD_ITEM &&
|
||||||
// field from outer query can't be used as key
|
!(cond_func->used_tables() & OUTER_REF_TABLE_BIT))
|
||||||
!((Item_field*) (cond_func->arguments()[0]->real_item()))
|
|
||||||
->depended_from)
|
|
||||||
{
|
{
|
||||||
add_key_field(key_fields,*and_level,
|
add_key_field(key_fields,*and_level,
|
||||||
((Item_field*) (cond_func->arguments()[0])->real_item())
|
((Item_field*) (cond_func->arguments()[0])->real_item())
|
||||||
|
Reference in New Issue
Block a user