summaryrefslogtreecommitdiff
path: root/sql/tztime.cc
diff options
context:
space:
mode:
authorKonstantin Osipov <kostja@sun.com>2010-03-16 00:20:20 +0300
committerKonstantin Osipov <kostja@sun.com>2010-03-16 00:20:20 +0300
commita9520bcf76c4d6a2a4cf9e1f0220224506fc3375 (patch)
tree3d24b829164a0567d0a3259fe6a86f4234031a42 /sql/tztime.cc
parent74211ed907de652c82047a0566e61a49de968ca9 (diff)
parent9cb8a98216586cd7b5e2aa90d374e6d5ff757072 (diff)
downloadmariadb-git-a9520bcf76c4d6a2a4cf9e1f0220224506fc3375.tar.gz
A post-review fix for type-aware metadata locks.
DDL no longer aborts mysql_lock_tables(), and hence we no longer need to support need_reopen flag of this call. Remove the flag, and all the code in the server that was responsible for handling the case when it was set. This allowed to simplify: open_and_lock_tables_derived(), the delayed thread, multi-update. Rename MYSQL_LOCK_IGNORE_FLUSH to MYSQL_OPEN_IGNORE_FLUSH, since we now only support this flag in open_table(). Rename MYSQL_LOCK_PERF_SCHEMA to MYSQL_LOCK_LOG_TABLE, to avoid confusion. Move the wait for the global read lock for cases when we do updates in SELECT f1() or DO (UPDATE) to open_table() from mysql_lock_tables(). When waiting for the read lock, we could raise need_reopen flag, which is no longer present in mysql_lock_tables(). Since the block responsible for waiting for GRL was moved, MYSQL_LOCK_IGNORE_GLOBAL_READ_LOCK was renamed to MYSQL_OPEN_IGNORE_GLOBAL_READ_LOCK.
Diffstat (limited to 'sql/tztime.cc')
-rw-r--r--sql/tztime.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/tztime.cc b/sql/tztime.cc
index 632dca1ce44..7d88b7276f2 100644
--- a/sql/tztime.cc
+++ b/sql/tztime.cc
@@ -1668,7 +1668,7 @@ my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap)
open all time zone tables to see if they exist.
*/
if (open_and_lock_tables(thd, tz_tables, FALSE,
- MYSQL_LOCK_IGNORE_FLUSH | MYSQL_LOCK_IGNORE_TIMEOUT))
+ MYSQL_OPEN_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());