summaryrefslogtreecommitdiff
path: root/storage/myisam
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-01-24 00:01:25 +0100
committerSergei Golubchik <serg@mariadb.org>2017-02-13 18:12:04 +0100
commitb6a3917b0555a0fdaee7c3f13423009f4f4b878d (patch)
treeb5314225436f41f3aad1eaee80a708aa41d2ed02 /storage/myisam
parent29ed440d4457a3cc2ab8c22674eb5dc8f0ac0ce6 (diff)
downloadmariadb-git-b6a3917b0555a0fdaee7c3f13423009f4f4b878d.tar.gz
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())
Diffstat (limited to 'storage/myisam')
-rw-r--r--storage/myisam/mi_open.c2
1 files changed, 2 insertions, 0 deletions
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);
}
}