summaryrefslogtreecommitdiff
path: root/sql/opt_sum.cc
diff options
context:
space:
mode:
authormonty@hundin.mysql.fi <>2002-01-31 04:36:58 +0200
committermonty@hundin.mysql.fi <>2002-01-31 04:36:58 +0200
commit4000b036c05c50782675300ef8686523d106c52a (patch)
treef5fa2405fe86664ded2345a4330fe4b8a31e8666 /sql/opt_sum.cc
parent79796e989f13c98df32e13d404571b76b1ae6dab (diff)
downloadmariadb-git-4000b036c05c50782675300ef8686523d106c52a.tar.gz
Fixes for new getopt
Bug fix when using --no-deaults Sets ref_length to right value (faster rnd_pos() handling in InnoDB). Fixed problem with multi-table-delete and InnoDB Fixed problem with truncate table, which required a COMMIT before. Fixed multi-table-delete bug with InnoDB. Remove not used index from EXPLAIN
Diffstat (limited to 'sql/opt_sum.cc')
-rw-r--r--sql/opt_sum.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc
index 69fc5aa88ff..31611798064 100644
--- a/sql/opt_sum.cc
+++ b/sql/opt_sum.cc
@@ -299,7 +299,8 @@ static bool find_range_key(TABLE_REF *ref, Field* field, COND *cond)
uint idx=0;
/* Check if some key has field as first key part */
- if (field->key_start && (! cond || ! (cond->used_tables() & table->map)))
+ if ((field->key_start & field->table->keys_in_use_for_query) &&A
+ (! cond || ! (cond->used_tables() & table->map)))
{
for (key_map key=field->key_start ; !(key & 1) ; idx++)
key>>=1;