1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-18707 Server crash in my_hash_sort_bin, ASAN heap-use-after-free in Field::is_null, server hang, corrupted double-linked list

adjust share->stored_rec_length for LONG_UNIQUE_HASH_FIELD,
just like it's done for normal virtual fields
This commit is contained in:
Sergei Golubchik
2019-02-27 02:38:46 +01:00
parent 0477e80522
commit 5adf11250a
4 changed files with 36 additions and 4 deletions

View File

@@ -2449,6 +2449,9 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
hash_field->flags|= LONG_UNIQUE_HASH_FIELD;//Used in parse_vcol_defs
keyinfo->flags|= HA_NOSAME;
share->virtual_fields++;
share->stored_fields--;
if (record + share->stored_rec_length >= hash_field->ptr)
share->stored_rec_length= (ulong)(hash_field->ptr - record - 1);
hash_field_used_no++;
offset+= HA_HASH_FIELD_LENGTH;
}