summaryrefslogtreecommitdiff
path: root/sql/opt_sum.cc
diff options
context:
space:
mode:
authorunknown <svoj@may.pils.ru>2006-06-21 17:51:16 +0500
committerunknown <svoj@may.pils.ru>2006-06-21 17:51:16 +0500
commitbf76f070dd4150728e01acf770120add6325bd06 (patch)
tree93b5c1cb3c5a5dedfc2ac0c6086f138d52350ea0 /sql/opt_sum.cc
parent49042de5b2ef0ea6799941334385f4352d3e64ef (diff)
parent5c0cdea62341da75f0560216af1b363b156ed1ab (diff)
downloadmariadb-git-bf76f070dd4150728e01acf770120add6325bd06.tar.gz
Merge april:devel/BitKeeper/mysql-4.1
into may.pils.ru:/home/svoj/devel/mysql/BUG20357/mysql-4.1 sql/opt_sum.cc: Auto merged mysql-test/r/myisam.result: SCCS merged mysql-test/t/myisam.test: SCCS merged
Diffstat (limited to 'sql/opt_sum.cc')
-rw-r--r--sql/opt_sum.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc
index 97e271121d3..b53fbfd3f80 100644
--- a/sql/opt_sum.cc
+++ b/sql/opt_sum.cc
@@ -676,6 +676,12 @@ static bool find_key_for_maxmin(bool max_fl, TABLE_REF *ref,
{
KEY_PART_INFO *part,*part_end;
key_part_map key_part_to_use= 0;
+ /*
+ Perform a check if index is not disabled by ALTER TABLE
+ or IGNORE INDEX.
+ */
+ if (!table->keys_in_use_for_query.is_set(idx))
+ continue;
uint jdx= 0;
*prefix_len= 0;
for (part= keyinfo->key_part, part_end= part+keyinfo->key_parts ;