summaryrefslogtreecommitdiff
path: root/sql/sql_reload.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-10-19 21:45:18 +0200
committerSergei Golubchik <sergii@pisem.net>2011-10-19 21:45:18 +0200
commit76f0b94bb0b2994d639353530c5b251d0f1a204b (patch)
tree9ed50628aac34f89a37637bab2fc4915b86b5eb4 /sql/sql_reload.cc
parent4e46d8e5bff140f2549841167dc4b65a3c0a645d (diff)
parent5dc1a2231f55bacc9aaf0e24816f3d9c2ee1f21d (diff)
downloadmariadb-git-76f0b94bb0b2994d639353530c5b251d0f1a204b.tar.gz
merge with 5.3
sql/sql_insert.cc: CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. ****** CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. sql/sql_table.cc: small cleanup ****** small cleanup
Diffstat (limited to 'sql/sql_reload.cc')
-rw-r--r--sql/sql_reload.cc19
1 files changed, 18 insertions, 1 deletions
diff --git a/sql/sql_reload.cc b/sql/sql_reload.cc
index 64d484c0390..7a30973699b 100644
--- a/sql/sql_reload.cc
+++ b/sql/sql_reload.cc
@@ -26,6 +26,7 @@
#include "sql_repl.h" // reset_master, reset_slave
#include "debug_sync.h"
+static void disable_checkpoints(THD *thd);
/**
Reload/resets privileges and the different caches.
@@ -157,7 +158,7 @@ bool reload_acl_and_cache(THD *thd, unsigned long options,
#ifdef HAVE_QUERY_CACHE
if (options & REFRESH_QUERY_CACHE_FREE)
{
- query_cache.pack(); // FLUSH QUERY CACHE
+ query_cache.pack(thd); // FLUSH QUERY CACHE
options &= ~REFRESH_QUERY_CACHE; // Don't flush cache, just free memory
}
if (options & (REFRESH_TABLES | REFRESH_QUERY_CACHE))
@@ -208,6 +209,8 @@ bool reload_acl_and_cache(THD *thd, unsigned long options,
thd->global_read_lock.unlock_global_read_lock(thd);
return 1;
}
+ if (options & REFRESH_CHECKPOINT)
+ disable_checkpoints(thd);
}
else
{
@@ -480,4 +483,18 @@ error:
}
+/**
+ Disable checkpoints for all handlers
+ This is released in unlock_global_read_lock()
+*/
+
+static void disable_checkpoints(THD *thd)
+{
+ if (!thd->global_disable_checkpoint)
+ {
+ thd->global_disable_checkpoint= 1;
+ if (!global_disable_checkpoint++)
+ ha_checkpoint_state(1); // Disable checkpoints
+ }
+}