Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.11.19
-
None
-
None
-
Debian 12, kernel 6.1.0-53-amd64, x86_64. wsrep/Galera enabled (not implicated).
-
Can result in hang or crash
Description
Observed once. create_internal_tmp_table created an Aria internal temporary table successfully, and the immediately following maria_open() in open_tmp_table failed:
[Warning] mariadbd: Got error '126 "Index is corrupted"' for '(null)'
[ERROR] mariadbd: Can't find record in '(temporary)'
The (null) table name is consistent with failure inside maria_open before the share is named. The resulting ER_KEY_NOT_FOUND (1032) then drove cleanup, which crashed separately — see MDEV-41294. Table characteristics from the core: keys=0, uniques=1 (hash unique from the converted distinct index), 5 fields, reclength=198, one Field_blob of length 16777215 from GROUP_CONCAT(DISTINCT ...), tmpdir on a dedicated filesystem.
The offending code seems to be in ha_maria.cc, line 2858 (in 10.11.19):
void ha_maria::drop_table(const char *name)
{ DBUG_ASSERT(!file || file->s->temporary); file->s->deleting= 1; // Do not flush data (void) ha_close(); (void) maria_delete_table_files(name, 1, MY_WME); }The DBUG_ASSERT call is okay with file being NULL, but then it is immediately dereferenced.
Attachments
Issue Links
- relates to
-
MDEV-41294 SIGSEGV in ha_maria::drop_table when free_tmp_table cleans up an internal temporary table that was created but never opened
-
- Open
-