mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-11639 Server crashes in update_virtual_field, gcol.innodb_virtual_basic fails in buildbot
don't use thd->query_id check in background purge threads (it doesn't work, because thd->query_id is never incremented there) instead use thd->open_tables directly, there can be only one table there anyway, and this is the table opened by this purge thread.
This commit is contained in:
@ -4448,6 +4448,14 @@ TABLE *open_purge_table(THD *thd, const char *db, size_t dblen,
|
||||
DBUG_RETURN(error ? NULL : tl->table);
|
||||
}
|
||||
|
||||
TABLE *get_purge_table(THD *thd)
|
||||
{
|
||||
/* see above, at most one table can be opened */
|
||||
DBUG_ASSERT(thd->open_tables == NULL || thd->open_tables->next == NULL);
|
||||
return thd->open_tables;
|
||||
}
|
||||
|
||||
|
||||
/** Find an open table in the list of prelocked tabled
|
||||
|
||||
Used for foreign key actions, for example, in UPDATE t1 SET a=1;
|
||||
|
Reference in New Issue
Block a user