summaryrefslogtreecommitdiff
path: root/sql/sql_cache.h
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2002-11-03 10:15:14 +0200
committerunknown <bell@sanja.is.com.ua>2002-11-03 10:15:14 +0200
commitc987bc2a5e716b61fb907ed9ca9087a3fa148cc7 (patch)
treefeab8ca130dab7caf8716a9f1f3dac2c75847e17 /sql/sql_cache.h
parent4358ac0c9f58ea8fa9e7fdb2374e81bdc144d93c (diff)
downloadmariadb-git-c987bc2a5e716b61fb907ed9ca9087a3fa148cc7.tar.gz
new innodb query cache behaviour (recommit because of problem with 4.1 repository pushing)
fixed bug in quqry cache dbd transaction processing mysql-test/r/innodb_cache.result: new innodb query cache behaviour sql/ha_berkeley.h: new innodb query cache behaviour sql/ha_innodb.cc: new innodb query cache behaviour sql/ha_innodb.h: new innodb query cache behaviour sql/handler.cc: new innodb query cache behaviour fixed bug in transaction support of bdb sql/handler.h: new innodb query cache behaviour sql/sql_cache.cc: new innodb query cache behaviour sql/sql_cache.h: new innodb query cache behaviour
Diffstat (limited to 'sql/sql_cache.h')
-rw-r--r--sql/sql_cache.h26
1 files changed, 18 insertions, 8 deletions
diff --git a/sql/sql_cache.h b/sql/sql_cache.h
index f19e6630da5..7726fc3aef1 100644
--- a/sql/sql_cache.h
+++ b/sql/sql_cache.h
@@ -115,18 +115,21 @@ struct Query_cache_query
Query_cache_block *res;
NET *wri;
ulong len;
+ uint8 tbls_type;
inline void init_n_lock();
void unlock_n_destroy();
inline ulonglong found_rows() { return limit_found_rows; }
- inline void found_rows(ulonglong rows) { limit_found_rows = rows; }
+ inline void found_rows(ulonglong rows) { limit_found_rows= rows; }
inline Query_cache_block *result() { return res; }
- inline void result(Query_cache_block *p) { res=p; }
+ inline void result(Query_cache_block *p) { res= p; }
inline NET *writer() { return wri; }
- inline void writer(NET *p) { wri=p; }
+ inline void writer(NET *p) { wri= p; }
+ inline uint8 tables_type() { return tbls_type; }
+ inline void tables_type(uint8 type) { tbls_type= type; }
inline ulong length() { return len; }
- inline ulong add(ulong packet_len) { return(len += packet_len); }
- inline void length(ulong length) { len = length; }
+ inline ulong add(ulong packet_len) { return(len+= packet_len); }
+ inline void length(ulong length) { len= length; }
inline gptr query()
{
return (gptr)(((byte*)this)+
@@ -144,10 +147,16 @@ struct Query_cache_query
struct Query_cache_table
{
char *tbl;
+ uint key_len;
+ uint8 table_type;
inline char *db() { return (char *) data(); }
inline char *table() { return tbl; }
- inline void table(char *table) { tbl = table; }
+ inline void table(char *table) { tbl= table; }
+ inline uint key_length() { return key_len; }
+ inline void key_length(uint len) { key_len= len; }
+ inline uint8 type() { return table_type; }
+ inline void type(uint8 t) { table_type= t; }
inline gptr data()
{
return (gptr)(((byte*)this)+
@@ -276,7 +285,7 @@ protected:
TABLE_COUNTER_TYPE tables);
my_bool insert_table(uint key_len, char *key,
Query_cache_block_table *node,
- uint32 db_length);
+ uint32 db_length, uint8 cache_type);
void unlink_table(Query_cache_block_table *node);
Query_cache_block *get_free_block (ulong len, my_bool not_less,
ulong min);
@@ -334,7 +343,8 @@ protected:
(query without tables not cached)
*/
TABLE_COUNTER_TYPE is_cacheable(THD *thd, uint32 query_len, char *query,
- LEX *lex, TABLE_LIST *tables_used);
+ LEX *lex, TABLE_LIST *tables_used,
+ uint8 *tables_type);
public:
Query_cache(ulong query_cache_limit = ULONG_MAX,