diff --git a/storage/myisam/mi_open.c b/storage/myisam/mi_open.c index 5951aef6d4f..93f70a5d340 100644 --- a/storage/myisam/mi_open.c +++ b/storage/myisam/mi_open.c @@ -343,6 +343,12 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) } else if (pos->type == HA_KEYTYPE_BINARY) pos->charset= &my_charset_bin; + if (!(share->keyinfo[i].flag & HA_SPATIAL) && + pos->start > share->base.reclength) + { + my_errno= HA_ERR_CRASHED; + goto err; + } } if (share->keyinfo[i].flag & HA_SPATIAL) {