diff options
author | unknown <tomas@poseidon.ndb.mysql.com> | 2004-11-24 11:56:51 +0000 |
---|---|---|
committer | unknown <tomas@poseidon.ndb.mysql.com> | 2004-11-24 11:56:51 +0000 |
commit | 35502d45e0d95428524cc8d65bd029bd4c56c5e6 (patch) | |
tree | d86695b0474eeb86f64c657158352d647493cfd3 /sql/ha_innodb.h | |
parent | eeca93750d987ca55cadb97b33bdb67fed8aefac (diff) | |
download | mariadb-git-35502d45e0d95428524cc8d65bd029bd4c56c5e6.tar.gz |
sql/ha_innodb.cc
enabled query cache for ndb
modified engine interface somewhat
sql/ha_innodb.h
enabled query cache for ndb
modified engine interface somewhat
sql/ha_ndbcluster.cc
enabled query cache for ndb
modified engine interface somewhat
ndb will only allow caching and retrieval if running autocommit
- return false, but do not invalidate
commit count is used as engine data, i.e.
- store commit count before store of cache
- allow retrieval if commit count has not changed on a table
- invalidate if commit count has changed
sql/ha_ndbcluster.h
enabled query cache for ndb
modified engine interface somewhat
sql/handler.cc
enabled query cache for ndb
modified engine interface somewhat
sql/handler.h
enabled query cache for ndb
modified engine interface somewhat
new virtual handler method cached_table_registration called on each table before alowing store in query cache
- return TRUE - ok to cache, FALSE - not allowed to cache, invalidate queries if engine_data below has changed
- sets ulonglong (engine_data) that is stored in query cache for each table
- sets callback to be called for each table before usage of cached query, callback = 0 -> no check later
sql/mysql_priv.h
enabled query cache for ndb
modified engine interface somewhat
callcack prototype for callback to engine before query cache retrieval
sql/sql_cache.cc
enabled query cache for ndb
modified engine interface somewhat
if callback is set on table in cache, do callback to check if allowed to use cache
if not allowed to use cache, check if engine_data has changed, if so, invalidate all queries with that table
+ changes to store and pass callback and engine_data around
sql/sql_cache.h
enabled query cache for ndb
modified engine interface somewhat
changes to store callback and engine_data
sql/table.h
enabled query cache for ndb
modified engine interface somewhat
changes to store callback and engine_data
sql/ha_innodb.cc:
enabled query cache for ndb
modified engine interface somewhat
sql/ha_innodb.h:
enabled query cache for ndb
modified engine interface somewhat
sql/ha_ndbcluster.cc:
enabled query cache for ndb
modified engine interface somewhat
ndb will only allow caching and retrieval if running autocommit
- return false, but do not invalidate
commit count is used as engine data, i.e.
- store commit count before store of cache
- allow retrieval if commit count has not changed on a table
- invalidate if commit count has changed
sql/ha_ndbcluster.h:
enabled query cache for ndb
modified engine interface somewhat
sql/handler.cc:
enabled query cache for ndb
modified engine interface somewhat
sql/handler.h:
enabled query cache for ndb
modified engine interface somewhat
new virtual handler method cached_table_registration called on each table before alowing store in query cache
- return TRUE - ok to cache, FALSE - not allowed to cache, invalidate queries if engine_data below has changed
- sets ulonglong (engine_data) that is stored in query cache for each table
- sets callback to be called for each table before usage of cached query, callback = 0 -> no check later
sql/mysql_priv.h:
enabled query cache for ndb
modified engine interface somewhat
callcack prototype for callback to engine before query cache retrieval
sql/sql_cache.cc:
enabled query cache for ndb
modified engine interface somewhat
if callback is set on table in cache, do callback to check if allowed to use cache
if not allowed to use cache, check if engine_data has changed, if so, invalidate all queries with that table
+ changes to store and pass callback and engine_data around
sql/sql_cache.h:
enabled query cache for ndb
modified engine interface somewhat
changes to store callback and engine_data
sql/table.h:
enabled query cache for ndb
modified engine interface somewhat
changes to store callback and engine_data
Diffstat (limited to 'sql/ha_innodb.h')
-rw-r--r-- | sql/ha_innodb.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/sql/ha_innodb.h b/sql/ha_innodb.h index e76a966c6b9..e3b058d0b42 100644 --- a/sql/ha_innodb.h +++ b/sql/ha_innodb.h @@ -33,6 +33,10 @@ typedef struct st_innobase_share { } INNOBASE_SHARE; +my_bool innobase_query_caching_of_table_permitted(THD* thd, char* full_name, + uint full_name_len, + ulonglong *unused); + /* The class defining a handle to an Innodb table */ class ha_innobase: public handler { @@ -168,6 +172,20 @@ class ha_innobase: public handler void init_table_handle_for_HANDLER(); longlong get_auto_increment(); uint8 table_cache_type() { return HA_CACHE_TBL_ASKTRANSACT; } + /* + ask handler about permission to cache table during query registration + */ + my_bool cached_table_registration(THD *thd, char *table_key, + uint key_length, + qc_engine_callback *call_back, + ulonglong *engine_data) + { + *call_back= innobase_query_caching_of_table_permitted; + *engine_data= 0; + return innobase_query_caching_of_table_permitted(thd, table_key, + key_length, + engine_data); + } static char *get_mysql_bin_log_name(); static ulonglong get_mysql_bin_log_pos(); @@ -233,8 +251,6 @@ int innobase_close_connection(THD *thd); int innobase_drop_database(char *path); int innodb_show_status(THD* thd); -my_bool innobase_query_caching_of_table_permitted(THD* thd, char* full_name, - uint full_name_len); void innobase_release_temporary_latches(void* innobase_tid); void innobase_store_binlog_offset_and_flush_log(char *binlog_name,longlong offset); |