mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 04:22:27 +01:00
BUG#24855 - Crash mysqld 4.1.21 with corrupted tables
Accessing fixed record format table with crashed key definition results in server/myisamchk segmentation fault. This is fixed by refusing to open such tables. Affects MyISAM only. No test case, since it requires crashed table.
This commit is contained in:
parent
45aeb7f04d
commit
c606e30f35
1 changed files with 7 additions and 1 deletions
|
@ -315,7 +315,13 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
|
|||
for (j=0 ; j < share->keyinfo[i].keysegs; j++,pos++)
|
||||
{
|
||||
disk_pos=mi_keyseg_read(disk_pos, pos);
|
||||
|
||||
if (pos->flag & HA_BLOB_PART &&
|
||||
! (share->options & (HA_OPTION_COMPRESS_RECORD |
|
||||
HA_OPTION_PACK_RECORD)))
|
||||
{
|
||||
my_errno= HA_ERR_CRASHED;
|
||||
goto err;
|
||||
}
|
||||
if (pos->type == HA_KEYTYPE_TEXT || pos->type == HA_KEYTYPE_VARTEXT)
|
||||
{
|
||||
if (!pos->language)
|
||||
|
|
Loading…
Reference in a new issue