summaryrefslogtreecommitdiff
path: root/sql/sql_cache.h
diff options
context:
space:
mode:
authorGuilhem Bichot <guilhem@mysql.com>2009-08-04 13:25:19 +0200
committerGuilhem Bichot <guilhem@mysql.com>2009-08-04 13:25:19 +0200
commitb57e4dbd88671df86e2cf39aff5178976d710b64 (patch)
tree32be2bfec3ca062c65566c60ecf59b673d1f97e9 /sql/sql_cache.h
parent1a0c2153a036296785dcdfa7b5f4974515616e11 (diff)
parent94efc1c6b084ed531b513e70fb66e7b7a1186b56 (diff)
downloadmariadb-git-b57e4dbd88671df86e2cf39aff5178976d710b64.tar.gz
Creation of mysql-trunk = {summit + "Innodb plugin replacing the builtin"}:
bzr branch mysql-5.1-performance-version mysql-trunk # Summit cd mysql-trunk bzr merge mysql-5.1-innodb_plugin # which is 5.1 + Innodb plugin bzr rm innobase # remove the builtin Next step: build, test fixes.
Diffstat (limited to 'sql/sql_cache.h')
-rw-r--r--sql/sql_cache.h23
1 files changed, 10 insertions, 13 deletions
diff --git a/sql/sql_cache.h b/sql/sql_cache.h
index 15e97238335..a8636381956 100644
--- a/sql/sql_cache.h
+++ b/sql/sql_cache.h
@@ -272,12 +272,12 @@ public:
private:
+#ifndef DBUG_OFF
+ my_thread_id m_cache_lock_thread_id;
+#endif
pthread_cond_t COND_cache_status_changed;
-
- enum Cache_status { NO_FLUSH_IN_PROGRESS, FLUSH_IN_PROGRESS,
- TABLE_FLUSH_IN_PROGRESS };
-
- Cache_status m_cache_status;
+ enum Cache_lock_status { UNLOCKED, LOCKED_NO_WAIT, LOCKED };
+ Cache_lock_status m_cache_lock_status;
bool m_query_cache_is_disabled;
@@ -382,8 +382,6 @@ protected:
Query_cache_block *pprev);
my_bool join_results(ulong join_limit);
- void wait_while_table_flush_is_in_progress(bool *interrupt);
-
/*
Following function control structure_guard_mutex
by themself or don't need structure_guard_mutex
@@ -480,12 +478,6 @@ protected:
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);
- }
-
/*
The following functions are only used when debugging
We don't protect these with ifndef DBUG_OFF to not have to recompile
@@ -503,6 +495,11 @@ protected:
Query_cache_block_table * point,
const char *name);
my_bool in_blocks(Query_cache_block * point);
+
+ bool try_lock(void);
+ void lock(void);
+ void lock_and_suspend(void);
+ void unlock(void);
};
extern Query_cache query_cache;