diff options
author | Mikael Ronstrom <mikael@mysql.com> | 2008-10-15 12:03:45 +0200 |
---|---|---|
committer | Mikael Ronstrom <mikael@mysql.com> | 2008-10-15 12:03:45 +0200 |
commit | ff51b7d80ac1185acb466497570444fdee7b3e53 (patch) | |
tree | 44f1a67480335f3d8f84d5b7a54664f154d20681 /sql/sql_cache.h | |
parent | 9daa56fd5ce3ccd33c32b5a505ac1d2b2c437460 (diff) | |
download | mariadb-git-ff51b7d80ac1185acb466497570444fdee7b3e53.tar.gz |
Patch to fix bug#38551
Diffstat (limited to 'sql/sql_cache.h')
-rw-r--r-- | sql/sql_cache.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sql/sql_cache.h b/sql/sql_cache.h index f2c33eff614..15e97238335 100644 --- a/sql/sql_cache.h +++ b/sql/sql_cache.h @@ -279,6 +279,8 @@ private: Cache_status m_cache_status; + bool m_query_cache_is_disabled; + void free_query_internal(Query_cache_block *point); void invalidate_table_internal(THD *thd, uchar *key, uint32 key_length); @@ -437,6 +439,14 @@ protected: /* register query in cache */ void store_query(THD *thd, TABLE_LIST *used_tables); + /** + At startup the user has an option to disable the query cache + to avoid locking the structure_guard_mutex. + This option is enabled by explicitly setting query_cache_type=OFF + in the command line. + */ + void disable_query_cache(void) { m_query_cache_is_disabled= TRUE; } + /* Check if the query is in the cache and if this is true send the data to client. @@ -469,6 +479,8 @@ protected: friend void query_cache_end_of_result(THD *thd); friend void query_cache_abort(NET *net); + bool is_disabled(void) { return m_query_cache_is_disabled; } + bool is_flushing(void) { return (m_cache_status != Query_cache::NO_FLUSH_IN_PROGRESS); |