BUG#13556107: CHECK AND REPAIR TABLE SHOULD BE MORE ROBUST [3]
Problem description: Incorrect key file. Key file is corrupted, while reading the keys from the file. The problem here is that keyseg->start (which should point to the beginning of a field) is pointing beyond total record length. Fix: If keyseg->start is greater than total record length then return error.
This commit is contained in:
parent
a3b6f73ada
commit
d075f0fab7
@ -343,6 +343,12 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
|
|||||||
}
|
}
|
||||||
else if (pos->type == HA_KEYTYPE_BINARY)
|
else if (pos->type == HA_KEYTYPE_BINARY)
|
||||||
pos->charset= &my_charset_bin;
|
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)
|
if (share->keyinfo[i].flag & HA_SPATIAL)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user