summaryrefslogtreecommitdiff
path: root/sql/sql_cache.h
diff options
context:
space:
mode:
authormsvensson@neptunus.homeip.net <>2005-02-03 09:33:48 +0100
committermsvensson@neptunus.homeip.net <>2005-02-03 09:33:48 +0100
commit3181f5d2b68a195471d9bac1c07f3c3be719d521 (patch)
tree124933fc3f5e4d884003ee7d669c299d2fef2fb1 /sql/sql_cache.h
parent459fa7f1f9489a5a90bb1d7c65bf869ae5f48e82 (diff)
parentefd5ed2f9e7c671bebd05ae2d2a776d55f8f857c (diff)
downloadmariadb-git-3181f5d2b68a195471d9bac1c07f3c3be719d521.tar.gz
Merged "query cache for ndb" to 5.0
Diffstat (limited to 'sql/sql_cache.h')
-rw-r--r--sql/sql_cache.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/sql/sql_cache.h b/sql/sql_cache.h
index 93d89aeae4f..e7116c7718a 100644
--- a/sql/sql_cache.h
+++ b/sql/sql_cache.h
@@ -146,6 +146,10 @@ struct Query_cache_table
char *tbl;
uint32 key_len;
uint8 table_type;
+ /* unique for every engine reference */
+ qc_engine_callback callback_func;
+ /* data need by some engines */
+ ulonglong engine_data_buff;
inline char *db() { return (char *) data(); }
inline char *table() { return tbl; }
@@ -154,6 +158,10 @@ struct Query_cache_table
inline void key_length(uint32 len) { key_len= len; }
inline uint8 type() { return table_type; }
inline void type(uint8 t) { table_type= t; }
+ inline qc_engine_callback callback() { return callback_func; }
+ inline void callback(qc_engine_callback fn){ callback_func= fn; }
+ inline ulonglong engine_data() { return engine_data_buff; }
+ inline void engine_data(ulonglong data) { engine_data_buff= data; }
inline gptr data()
{
return (gptr)(((byte*)this)+
@@ -282,7 +290,9 @@ protected:
TABLE_COUNTER_TYPE tables);
my_bool insert_table(uint key_len, char *key,
Query_cache_block_table *node,
- uint32 db_length, uint8 cache_type);
+ uint32 db_length, uint8 cache_type,
+ qc_engine_callback callback,
+ ulonglong engine_data);
void unlink_table(Query_cache_block_table *node);
Query_cache_block *get_free_block (ulong len, my_bool not_less,
ulong min);