summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorunknown <mhansson@dl145s.mysql.com>2007-05-22 18:30:23 +0200
committerunknown <mhansson@dl145s.mysql.com>2007-05-22 18:30:23 +0200
commitf7f593ae7dde682e449fe81d946a83f74f0deb6a (patch)
treee3c5f2cfb242b4989cadfdf5d61a1422ca9d8984 /sql/sql_base.cc
parent3c76d36956fc0f1b3a2fe9aa7ffcd4d224c3f017 (diff)
parent13cf5bddd838725e9fe7e304565f133be24259ce (diff)
downloadmariadb-git-f7f593ae7dde682e449fe81d946a83f74f0deb6a.tar.gz
Merge mhansson@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into dl145s.mysql.com:/users/mhansson/mysql/autopush/mysql-5.0o-pushee sql/sql_select.cc: Auto merged
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index ed48ca577fb..0b5922d8737 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -5167,7 +5167,12 @@ bool setup_tables(THD *thd, Name_resolution_context *context,
get_key_map_from_key_list(&map, table, table_list->use_index);
if (map.is_set_all())
DBUG_RETURN(1);
- table->keys_in_use_for_query=map;
+ /*
+ Don't introduce keys in keys_in_use_for_query that weren't there
+ before. FORCE/USE INDEX should not add keys, it should only remove
+ all keys except the key(s) specified in the hint.
+ */
+ table->keys_in_use_for_query.intersect(map);
}
if (table_list->ignore_index)
{