Commit b054fc69 authored by marko's avatar marko

Minor cleanup.

innobase_query_caching_of_table_permitted(): Make static.

ha_innobase::register_query_cache_table(): Move the function
definition from ha_innodb.h to ha_innodb.cc.  Add comments.
parent 8ac40ae7
...@@ -1136,7 +1136,7 @@ holding any InnoDB semaphores. The calling thread is holding the ...@@ -1136,7 +1136,7 @@ holding any InnoDB semaphores. The calling thread is holding the
query cache mutex, and this function will reserver the InnoDB kernel mutex. query cache mutex, and this function will reserver the InnoDB kernel mutex.
Thus, the 'rank' in sync0sync.h of the MySQL query cache mutex is above Thus, the 'rank' in sync0sync.h of the MySQL query cache mutex is above
the InnoDB kernel mutex. */ the InnoDB kernel mutex. */
static
my_bool my_bool
innobase_query_caching_of_table_permitted( innobase_query_caching_of_table_permitted(
/*======================================*/ /*======================================*/
...@@ -7307,6 +7307,33 @@ ha_innobase::cmp_ref( ...@@ -7307,6 +7307,33 @@ ha_innobase::cmp_ref(
return(0); return(0);
} }
/***********************************************************************
Ask InnoDB if a query to a table can be cached. */
my_bool
ha_innobase::register_query_cache_table(
/*====================================*/
/* out: TRUE if query caching
of the table is permitted */
THD* thd, /* in: user thread handle */
char* table_key, /* in: concatenation of database name,
the null character '\0',
and the table name */
uint key_length, /* in: length of the full name, i.e.
len(dbname) + len(tablename) + 1 */
qc_engine_callback*
call_back, /* out: pointer to function for
checking if query caching
is permitted */
ulonglong *engine_data) /* in/out: data to call_back */
{
*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));
}
char* char*
ha_innobase::get_mysql_bin_log_name() ha_innobase::get_mysql_bin_log_name()
{ {
......
...@@ -35,10 +35,6 @@ typedef struct st_innobase_share { ...@@ -35,10 +35,6 @@ typedef struct st_innobase_share {
struct row_prebuilt_struct; struct row_prebuilt_struct;
typedef struct row_prebuilt_struct row_prebuilt_t; typedef struct row_prebuilt_struct row_prebuilt_t;
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 */ /* The class defining a handle to an Innodb table */
class ha_innobase: public handler class ha_innobase: public handler
{ {
...@@ -186,14 +182,7 @@ class ha_innobase: public handler ...@@ -186,14 +182,7 @@ class ha_innobase: public handler
my_bool register_query_cache_table(THD *thd, char *table_key, my_bool register_query_cache_table(THD *thd, char *table_key,
uint key_length, uint key_length,
qc_engine_callback *call_back, qc_engine_callback *call_back,
ulonglong *engine_data) 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 char *get_mysql_bin_log_name();
static ulonglong get_mysql_bin_log_pos(); static ulonglong get_mysql_bin_log_pos();
bool primary_key_is_clustered() { return true; } bool primary_key_is_clustered() { return true; }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment