diff options
author | unknown <evgen@moonbone.local> | 2005-09-19 04:39:49 +0400 |
---|---|---|
committer | unknown <evgen@moonbone.local> | 2005-09-19 04:39:49 +0400 |
commit | 5bc4501259fff34c4afa15478f715d098f55c584 (patch) | |
tree | 99cb88180f99dd6a11a0234bd5077c86e91eb3ad /sql | |
parent | 4014d76cd1a7bbab348f2e47d852518e11526777 (diff) | |
download | mariadb-git-5bc4501259fff34c4afa15478f715d098f55c584.tar.gz |
Fix bug #13218: InnoDB: using a partial-field key prefix in search
This is backport from 5.0 of fix for bug #11039
mysql-test/t/innodb.test:
Backport from 5.0 of test case for bug#11039
mysql-test/r/innodb.result:
Backport from 5.0 of test case for bug#11039
sql/opt_sum.cc:
Fix bug #13218: backport from 5.0 of bug #11039 fix
Diffstat (limited to 'sql')
-rw-r--r-- | sql/opt_sum.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc index 4ab506cc4e1..cb8e3c2d273 100644 --- a/sql/opt_sum.cc +++ b/sql/opt_sum.cc @@ -661,7 +661,8 @@ static bool find_key_for_maxmin(bool max_fl, TABLE_REF *ref, If key_part2 may be NULL, then we want to find the first row that is not null */ - ref->key_buff[ref->key_length++]= 1; + ref->key_buff[ref->key_length]= 1; + ref->key_length+= part->store_length; *range_fl&= ~NO_MIN_RANGE; *range_fl|= NEAR_MIN; // > NULL } |