mirror of
https://github.com/MariaDB/server.git
synced 2026-05-03 13:45:34 +02:00
Fixed wrong key length when using MIN() optimization (non fatal, but caused InnoDB to write warnings to the log file)
This fixed bug #11039: InnoDB: Warning: using a partial-field key prefix in search mysql-test/r/innodb.result: Added extra test for bug #11039: InnoDB: Warning: using a partial-field key prefix in search mysql-test/t/innodb.test: Added extra test for bug #11039: InnoDB: Warning: using a partial-field key prefix in search sql/opt_sum.cc: Fixed wrong key length when using MIN() optimization
This commit is contained in:
parent
4eb26350cb
commit
cdb905ead5
3 changed files with 21 additions and 1 deletions
|
|
@ -677,7 +677,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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue