diff options
author | sergefp@mysql.com <> | 2006-01-25 23:25:23 +0300 |
---|---|---|
committer | sergefp@mysql.com <> | 2006-01-25 23:25:23 +0300 |
commit | 5d0e8d81ee13ef4474266b74a12f98d18894a7e1 (patch) | |
tree | 6eb5453574dbbc5b4cca00daf48ba4aa1f574863 /sql/sql_update.cc | |
parent | 8d0378f542eab51e03a576c5f908f539770631c7 (diff) | |
download | mariadb-git-5d0e8d81ee13ef4474266b74a12f98d18894a7e1.tar.gz |
BUG#15935: In mysql_update, don't use full index scan when we could have used quick select scan.
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r-- | sql/sql_update.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 24c7a278e79..edd16bb4bee 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -212,7 +212,6 @@ int mysql_update(THD *thd, SORT_FIELD *sortorder; ha_rows examined_rows; - used_index= MAX_KEY; // For call to init_read_record() table->sort.io_cache = (IO_CACHE *) my_malloc(sizeof(IO_CACHE), MYF(MY_FAE | MY_ZEROFILL)); if (!(sortorder=make_unireg_sortorder(order, &length)) || @@ -244,7 +243,7 @@ int mysql_update(THD *thd, DISK_BUFFER_SIZE, MYF(MY_WME))) goto err; - if (used_index == MAX_KEY) + if (used_index == MAX_KEY || (select && select->quick)) init_read_record(&info,thd,table,select,0,1); else init_read_record_idx(&info, thd, table, 1, used_index); |