mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Merge mysql.com:/home/psergey/mysql-5.0-bug8804-r12
into mysql.com:/home/psergey/mysql-5.1-bug8804-r12-merge
This commit is contained in:
@ -3004,14 +3004,14 @@ add_key_fields(JOIN *join, KEY_FIELD **key_fields, uint *and_level,
|
|||||||
if (cond->type() == Item::FUNC_ITEM &&
|
if (cond->type() == Item::FUNC_ITEM &&
|
||||||
((Item_func*)cond)->functype() == Item_func::TRIG_COND_FUNC)
|
((Item_func*)cond)->functype() == Item_func::TRIG_COND_FUNC)
|
||||||
{
|
{
|
||||||
cond= ((Item_func*)cond)->arguments()[0];
|
Item *cond_arg= ((Item_func*)cond)->arguments()[0];
|
||||||
if (!join->group_list && !join->order &&
|
if (!join->group_list && !join->order &&
|
||||||
join->unit->item &&
|
join->unit->item &&
|
||||||
join->unit->item->substype() == Item_subselect::IN_SUBS &&
|
join->unit->item->substype() == Item_subselect::IN_SUBS &&
|
||||||
!join->unit->first_select()->next_select())
|
!join->unit->first_select()->next_select())
|
||||||
{
|
{
|
||||||
KEY_FIELD *save= *key_fields;
|
KEY_FIELD *save= *key_fields;
|
||||||
add_key_fields(join, key_fields, and_level, cond, usable_tables,
|
add_key_fields(join, key_fields, and_level, cond_arg, usable_tables,
|
||||||
sargables);
|
sargables);
|
||||||
// Indicate that this ref access candidate is for subquery lookup:
|
// Indicate that this ref access candidate is for subquery lookup:
|
||||||
for (; save != *key_fields; save++)
|
for (; save != *key_fields; save++)
|
||||||
|
Reference in New Issue
Block a user