diff options
author | sergefp@mysql.com <> | 2006-11-08 14:43:17 +0300 |
---|---|---|
committer | sergefp@mysql.com <> | 2006-11-08 14:43:17 +0300 |
commit | 4a00e76e7a5ce62d36d8690eafc5854620453c3c (patch) | |
tree | f5c125fd347b015591a948fdc8bb8a1333c309f3 /sql | |
parent | edf194ab1f0e32edcb5606b0ac7037e94ef1fb96 (diff) | |
parent | 26c30f2f7dbb0df7bd7caa226a4b0d9131c283eb (diff) | |
download | mariadb-git-4a00e76e7a5ce62d36d8690eafc5854620453c3c.tar.gz |
Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into mysql.com:/home/psergey/mysql-5.0-bug8804-pfix
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_select.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index f92217302f8..cfc068cec86 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -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->first_select()->next_select()) { + KEY_FIELD *save= *key_fields; add_key_fields(join, key_fields, and_level, cond, usable_tables, sargables); // 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; } |