1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-30118 exception in ha_maria::extra

I have not been able to repeat the problem, but the stack trace indicates
that ha_maria::extra() is called with a null file pointer.

This indicates the table has either never been opened or opened and closed,
with file pointer set to NULL, but ha_maria::extra() is still called.

In JOIN::partial_cleanup() we are only checking of table->is_created(),
which will fail if table was created and later closed.

Fixed by clearing table->created if table is dropped.

I added an assert to is_created() to catch the case that the create
flag does not match 'file'.
This commit is contained in:
Monty
2022-12-13 12:43:19 +02:00
parent 92ff7bb63f
commit d0cd49497f
2 changed files with 12 additions and 1 deletions

View File

@ -20320,6 +20320,8 @@ free_tmp_table(THD *thd, TABLE *entry)
}
entry->file->ha_drop_table(entry->s->path.str);
delete entry->file;
entry->file= NULL;
entry->reset_created();
}
/* free blobs */