mirror of
https://github.com/MariaDB/server.git
synced 2026-05-02 13:15:32 +02:00
Followup to Bug#45225 Locking: hang if drop table with no timeout
This patch prevents system threads and system table accesses from using user-specified values for "lock_wait_timeout". Instead all such accesses are done using the default value (1 year). This prevents background tasks (such as replication, events, accessing stored function definitions, logging, reading time-zone information, etc.) from failing in cases where the global value of "lock_wait_timeout" is set very low. The patch also simplifies the open tables API. Rather than adding another convenience function for opening and locking system tables, this patch removes most of the existing convenience functions for open_and_lock_tables_derived(). Before, open_and_lock_tables() was a convenience function that enforced derived tables handling, while open_and_lock_tables_derived() was the main function where derived tables handling was optional. Now, this convencience function is gone and the main function is renamed to open_and_lock_tables(). No test case added as it would have required the use of --sleep to check that system threads and system tables have a different timeout value from the user-specified "lock_wait_timeout" system variable.
This commit is contained in:
parent
1dd2f90faf
commit
e60ef89317
24 changed files with 128 additions and 114 deletions
|
|
@ -1667,8 +1667,8 @@ my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap)
|
|||
We need to open only mysql.time_zone_leap_second, but we try to
|
||||
open all time zone tables to see if they exist.
|
||||
*/
|
||||
if (open_and_lock_tables_derived(thd, tz_tables, FALSE,
|
||||
MYSQL_LOCK_IGNORE_FLUSH))
|
||||
if (open_and_lock_tables(thd, tz_tables, FALSE,
|
||||
MYSQL_LOCK_IGNORE_FLUSH | MYSQL_LOCK_IGNORE_TIMEOUT))
|
||||
{
|
||||
sql_print_warning("Can't open and lock time zone table: %s "
|
||||
"trying to live without them", thd->stmt_da->message());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue