mirror of
https://github.com/MariaDB/server.git
synced 2026-05-06 23:25:34 +02:00
Fix for BUG#13814: in mi_pack_key(), when processing NULL value for TINYBLOB key segment,
do advance the source pointer over 2 bytes that specify value length. myisam/mi_key.c: Fix for BUG#13814: in mi_pack_key(), when processing NULL value for TINYBLOB key segment, do advance the source pointer over 2 bytes that specify value length (for NULL value the format is: null_marker 0x01, value length 0x00 0x00, data: 0x00 keyseg->length times). We need to advance over 2 bytes separately as keyseg->length doesn't include them. mysql-test/r/myisam.result: Testcase for BUG#13814 mysql-test/t/myisam.test: Testcase for BUG#13814
This commit is contained in:
parent
5e8515d9f2
commit
81882f7127
3 changed files with 39 additions and 0 deletions
|
|
@ -217,7 +217,10 @@ uint _mi_pack_key(register MI_INFO *info, uint keynr, uchar *key, uchar *old,
|
|||
{
|
||||
k_length-=length;
|
||||
if (keyseg->flag & (HA_VAR_LENGTH | HA_BLOB_PART))
|
||||
{
|
||||
old+= 2;
|
||||
k_length-=2; /* Skip length */
|
||||
}
|
||||
continue; /* Found NULL */
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue