summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorunknown <ibabaev@bk-internal.mysql.com>2007-05-28 00:05:38 +0200
committerunknown <ibabaev@bk-internal.mysql.com>2007-05-28 00:05:38 +0200
commit11dd353e12de970d93a0304ea3e6e43df1126907 (patch)
tree88e9d6e9af319de1b0c833c9bb011ed5025ac543 /sql/sql_base.cc
parent06297270880ca0f0023c66ca90291665ec3aacc2 (diff)
parent5f99cf963ea4138fd7adb70ec4a9add55388c281 (diff)
downloadmariadb-git-11dd353e12de970d93a0304ea3e6e43df1126907.tar.gz
Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into bk-internal.mysql.com:/data0/bk/mysql-5.0-opt client/mysqldump.c: Auto merged mysql-test/r/mysqldump.result: Auto merged mysql-test/r/ps_2myisam.result: Auto merged mysql-test/r/ps_3innodb.result: Auto merged mysql-test/r/ps_4heap.result: Auto merged mysql-test/r/ps_5merge.result: Auto merged mysql-test/r/ps_6bdb.result: Auto merged mysql-test/r/ps_7ndb.result: Auto merged sql/field.h: Auto merged sql/item_func.cc: Auto merged sql/my_decimal.h: Auto merged sql/sql_base.cc: Auto merged
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 16a88346bb6..999a05ca616 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)
{
@@ -5800,7 +5805,7 @@ fill_record(THD *thd, Field **ptr, List<Item> &values, bool ignore_errors)
table= (*ptr)->table;
table->auto_increment_field_not_null= FALSE;
}
- while ((field = *ptr++))
+ while ((field = *ptr++) && !thd->net.report_error)
{
value=v++;
table= field->table;