summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@magare.gmz>2007-05-22 17:05:33 +0300
committerunknown <gkodinov/kgeorge@magare.gmz>2007-05-22 17:05:33 +0300
commit13cf5bddd838725e9fe7e304565f133be24259ce (patch)
tree19138ce69e7e986972bf93713c059e58f974f0c6 /sql/sql_base.cc
parent14cb59d8bb0531cec3955fb3718455e7742d5db8 (diff)
parent3332b80130172656c1e483e5bc9aa2bcfe741a8f (diff)
downloadmariadb-git-13cf5bddd838725e9fe7e304565f133be24259ce.tar.gz
Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into magare.gmz:/home/kgeorge/mysql/autopush/B28476-5.0-opt sql/sql_base.cc: Auto merged sql/table.h: 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)
{