summaryrefslogtreecommitdiff
path: root/sql/log_event_old.cc
diff options
context:
space:
mode:
authorJon Olav Hauglid <jon.hauglid@sun.com>2010-02-24 18:04:00 +0100
committerJon Olav Hauglid <jon.hauglid@sun.com>2010-02-24 18:04:00 +0100
commitdd42aab8406e70caec4f58435c0281cddc8ea2c0 (patch)
tree9d2e97b85337c7ffc2bf1d2a6643b34baf1acda8 /sql/log_event_old.cc
parentb6e0f92f052a37568b984330b8cca8331c979a8d (diff)
downloadmariadb-git-dd42aab8406e70caec4f58435c0281cddc8ea2c0.tar.gz
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.
Diffstat (limited to 'sql/log_event_old.cc')
-rw-r--r--sql/log_event_old.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/log_event_old.cc b/sql/log_event_old.cc
index caa69269e28..2d559804534 100644
--- a/sql/log_event_old.cc
+++ b/sql/log_event_old.cc
@@ -73,7 +73,7 @@ Old_rows_log_event::do_apply_event(Old_rows_log_event *ev, const Relay_log_info
*/
thd->lex->set_stmt_row_injection();
- if (simple_open_n_lock_tables(thd, rli->tables_to_lock))
+ if (open_and_lock_tables(thd, rli->tables_to_lock, FALSE, 0))
{
uint actual_error= thd->stmt_da->sql_errno();
if (thd->is_slave_error || thd->is_fatal_error)