mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Bug #38816: kill + flush tables with read lock + stored
procedures causes crashes! The problem of that bugreport was mostly fixed by the patch for bug 38691. However, attached test case focused on another crash or valgrind warning problem: SHOW PROCESSLIST query accesses freed memory of SP instruction that run in a parallel connection. Changes of thd->query/thd->query_length in dangerous places have been guarded with the per-thread LOCK_thd_data mutex (the THD::LOCK_delete mutex has been renamed to THD::LOCK_thd_data).
This commit is contained in:
@@ -1854,7 +1854,7 @@ bool delayed_get_table(THD *thd, TABLE_LIST *table_list)
|
||||
thread_count++;
|
||||
pthread_mutex_unlock(&LOCK_thread_count);
|
||||
di->thd.set_db(table_list->db, (uint) strlen(table_list->db));
|
||||
di->thd.query= my_strdup(table_list->table_name, MYF(MY_WME));
|
||||
di->thd.set_query(my_strdup(table_list->table_name, MYF(MY_WME)), 0);
|
||||
if (di->thd.db == NULL || di->thd.query == NULL)
|
||||
{
|
||||
/* The error is reported */
|
||||
|
Reference in New Issue
Block a user