summaryrefslogtreecommitdiff
path: root/sql/handler.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/handler.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/handler.h')
-rw-r--r--sql/handler.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/sql/handler.h b/sql/handler.h
index fbc27f4729b..7fffd1a0cb9 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -116,6 +116,11 @@
#define HA_OPTION_NO_DELAY_KEY_WRITE (1L << 18)
#define HA_MAX_REC_LENGTH 65535
+/* Table caching type */
+#define HA_CACHE_TBL_NONTRANSACT 0
+#define HA_CACHE_TBL_ASKTRANSACT 1
+#define HA_CACHE_TBL_TRANSACT 2
+
enum db_type { DB_TYPE_UNKNOWN=0,DB_TYPE_DIAB_ISAM=1,
DB_TYPE_HASH,DB_TYPE_MISAM,DB_TYPE_PISAM,
DB_TYPE_RMS_ISAM, DB_TYPE_HEAP, DB_TYPE_ISAM,
@@ -343,6 +348,16 @@ public:
virtual THR_LOCK_DATA **store_lock(THD *thd,
THR_LOCK_DATA **to,
enum thr_lock_type lock_type)=0;
+
+ /* Type of table for caching query */
+ virtual uint8 table_cache_type() { return HA_CACHE_TBL_NONTRANSACT; }
+ /*
+ Is query with this cable cachable (have sense only for ASKTRANSACT
+ tables)
+ */
+ static bool caching_allowed(THD* thd, char* table_key,
+ uint key_length, uint8 cahe_type);
+
};
/* Some extern variables used with handlers */