mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-19634: Assertion `0' failed in row_sel_convert_mysql_key_to_innobase, [Warning] InnoDB: Using a partial-field key prefix in search
For a key with keyparts (k1,k2,k3) , if we are building a range over the keyparts we should make sure that if min_value/max_value for a keypart is not added to key buffer then the keyparts following should also not be allowed.
This commit is contained in:
@ -459,8 +459,9 @@ public:
|
||||
uint res= key_tree->store_min(key[key_tree->part].store_length,
|
||||
range_key, *range_key_flag);
|
||||
// add flags only if a key_part is written to the buffer
|
||||
if (res)
|
||||
*range_key_flag|= key_tree->min_flag;
|
||||
if (!res)
|
||||
return 0;
|
||||
*range_key_flag|= key_tree->min_flag;
|
||||
if (key_tree->next_key_part &&
|
||||
key_tree->next_key_part->type == SEL_ARG::KEY_RANGE &&
|
||||
key_tree->part != last_part &&
|
||||
@ -482,8 +483,9 @@ public:
|
||||
SEL_ARG *key_tree= last();
|
||||
uint res=key_tree->store_max(key[key_tree->part].store_length,
|
||||
range_key, *range_key_flag);
|
||||
if (res)
|
||||
(*range_key_flag)|= key_tree->max_flag;
|
||||
if (!res)
|
||||
return 0;
|
||||
*range_key_flag|= key_tree->max_flag;
|
||||
if (key_tree->next_key_part &&
|
||||
key_tree->next_key_part->type == SEL_ARG::KEY_RANGE &&
|
||||
key_tree->part != last_part &&
|
||||
|
Reference in New Issue
Block a user