diff options
author | unknown <sergefp@mysql.com> | 2005-10-25 16:34:03 +0400 |
---|---|---|
committer | unknown <sergefp@mysql.com> | 2005-10-25 16:34:03 +0400 |
commit | 562bfb2d57ab6f7a8d8c79b692ac1496372bcf7d (patch) | |
tree | 026d816b529858430e4b47d86e62da509cd8c873 /sql/sql_update.cc | |
parent | 90573decba9316c49ba6f0034759b5b386d5718a (diff) | |
download | mariadb-git-562bfb2d57ab6f7a8d8c79b692ac1496372bcf7d.tar.gz |
Fix for BUG#14272: Don't run index scan when we should use quick select.
This could cause failures because there are table handlers (like federated)
that support quick select scanning but do not support index scanning.
mysql-test/t/disabled.def:
Enabled federated testcase.
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r-- | sql/sql_update.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc index a8e21177338..f0682c1c9cd 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -286,7 +286,7 @@ int mysql_update(THD *thd, if (used_index < MAX_KEY && old_used_keys.is_set(used_index)) { table->key_read=1; - table->file->extra(HA_EXTRA_KEYREAD); //todo: psergey: check + table->file->extra(HA_EXTRA_KEYREAD); } /* note: can actually avoid sorting below.. */ @@ -334,7 +334,7 @@ int mysql_update(THD *thd, /* If quick select is used, initialize it before retrieving rows. */ if (select && select->quick && select->quick->reset()) 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); |