Commit 56aeee44 authored by sergefp@mysql.com's avatar sergefp@mysql.com

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.
 
parent 7694eecc
...@@ -15,4 +15,3 @@ rpl_relayrotate : Unstable test case, bug#12429 ...@@ -15,4 +15,3 @@ rpl_relayrotate : Unstable test case, bug#12429
rpl_until : Unstable test case, bug#12429 rpl_until : Unstable test case, bug#12429
rpl_deadlock : Unstable test case, bug#12429 rpl_deadlock : Unstable test case, bug#12429
kill : Unstable test case, bug#9712 kill : Unstable test case, bug#9712
federated : Broken test case, bug#14272
...@@ -286,7 +286,7 @@ int mysql_update(THD *thd, ...@@ -286,7 +286,7 @@ int mysql_update(THD *thd,
if (used_index < MAX_KEY && old_used_keys.is_set(used_index)) if (used_index < MAX_KEY && old_used_keys.is_set(used_index))
{ {
table->key_read=1; 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.. */ /* note: can actually avoid sorting below.. */
...@@ -334,7 +334,7 @@ int mysql_update(THD *thd, ...@@ -334,7 +334,7 @@ int mysql_update(THD *thd,
/* If quick select is used, initialize it before retrieving rows. */ /* If quick select is used, initialize it before retrieving rows. */
if (select && select->quick && select->quick->reset()) if (select && select->quick && select->quick->reset())
goto err; goto err;
if (used_index == MAX_KEY) if (used_index == MAX_KEY || (select && select->quick))
init_read_record(&info,thd,table,select,0,1); init_read_record(&info,thd,table,select,0,1);
else else
init_read_record_idx(&info, thd, table, 1, used_index); init_read_record_idx(&info, thd, table, 1, used_index);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment