From b6a3917b0555a0fdaee7c3f13423009f4f4b878d Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 24 Jan 2017 00:01:25 +0100 Subject: MDEV-11750 Assertion `vfield' failed in TABLE::update_virtual_fields after crash recovery on corrupted MyISAM table Adjust the length of the BIT field (same as in _mi_put_key_in_record()) --- storage/myisam/mi_open.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'storage/myisam') diff --git a/storage/myisam/mi_open.c b/storage/myisam/mi_open.c index 604dd1674ae..5bd5554db51 100644 --- a/storage/myisam/mi_open.c +++ b/storage/myisam/mi_open.c @@ -376,6 +376,8 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) { uint real_length= pos->flag & HA_BLOB_PART ? pos->bit_start : pos->length; + if (pos->type == HA_KEYTYPE_BIT && pos->bit_length) + real_length--; set_if_bigger(share->vreclength, pos->start + real_length); } } -- cgit v1.2.1