Commit 4a00e76e authored by sergefp@mysql.com's avatar sergefp@mysql.com

Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0-opt

into  mysql.com:/home/psergey/mysql-5.0-bug8804-pfix
parents edf194ab 26c30f2f
...@@ -2951,10 +2951,12 @@ add_key_fields(JOIN *join, KEY_FIELD **key_fields, uint *and_level, ...@@ -2951,10 +2951,12 @@ add_key_fields(JOIN *join, KEY_FIELD **key_fields, uint *and_level,
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;
add_key_fields(join, key_fields, and_level, cond, usable_tables, add_key_fields(join, key_fields, and_level, cond, usable_tables,
sargables); sargables);
// Indicate that this ref access candidate is for subquery lookup: // Indicate that this ref access candidate is for subquery lookup:
(*key_fields)[-1].outer_ref= TRUE; for (; save != *key_fields; save++)
save->outer_ref= TRUE;
} }
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment