diff options
author | unknown <igor@rurik.mysql.com> | 2006-06-15 18:40:18 -0700 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2006-06-15 18:40:18 -0700 |
commit | 79966e670ad102bcabbd0eeb97196279887e23d9 (patch) | |
tree | 2a693f4994e8d7b7679ced67ac8e819668959187 /sql/opt_sum.cc | |
parent | eb219834537d6e344fa53e8f0b95c8ad225a60d6 (diff) | |
parent | 5eead315e038d705b69eb1ca354398b38b533441 (diff) | |
download | mariadb-git-79966e670ad102bcabbd0eeb97196279887e23d9.tar.gz |
Merge rurik.mysql.com:/home/igor/mysql-4.1-opt
into rurik.mysql.com:/home/igor/mysql-5.0-opt
mysql-test/t/func_group.test:
Auto merged
sql/field.cc:
Auto merged
sql/opt_sum.cc:
Auto merged
mysql-test/r/func_group.result:
SCCS merged
Diffstat (limited to 'sql/opt_sum.cc')
-rw-r--r-- | sql/opt_sum.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc index 9770198640c..22d84d7fb5a 100644 --- a/sql/opt_sum.cc +++ b/sql/opt_sum.cc @@ -710,8 +710,10 @@ static bool find_key_for_maxmin(bool max_fl, TABLE_REF *ref, if (!(table->file->index_flags(idx, jdx, 0) & HA_READ_ORDER)) return 0; - /* Check whether the index component is partial */ - if (part->length < table->field[part->fieldnr-1]->pack_length()) + /* Check whether the index component is partial */ + Field *part_field= table->field[part->fieldnr-1]; + if ((part_field->flags & BLOB_FLAG) || + part->length < part_field->key_length()) break; if (field->eq(part->field)) |