removed special ndb query cache variable

ndb will always return query cache type ASKTRANSACT
parent e5900ac2
......@@ -3025,9 +3025,6 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type)
m_transaction_on= FALSE;
else
m_transaction_on= thd->variables.ndb_use_transactions;
#ifdef HAVE_QUERY_CACHE
m_query_cache_type= thd->variables.ndb_query_cache_type;
#endif
m_active_trans= thd->transaction.all.ndb_tid ?
(NdbConnection*)thd->transaction.all.ndb_tid:
......@@ -3752,8 +3749,7 @@ ha_ndbcluster::ha_ndbcluster(TABLE *table_arg):
m_ha_not_exact_count(FALSE),
m_force_send(TRUE),
m_autoincrement_prefetch(32),
m_transaction_on(TRUE),
m_query_cache_type(0)
m_transaction_on(TRUE)
{
int i;
......@@ -4457,22 +4453,8 @@ const char* ha_ndbcluster::index_type(uint key_number)
}
uint8 ha_ndbcluster::table_cache_type()
{
DBUG_ENTER("ha_ndbcluster::table_cache_type");
switch (m_query_cache_type)
{
case 0:
DBUG_PRINT("exit",("HA_CACHE_TBL_NOCACHE"));
DBUG_RETURN(HA_CACHE_TBL_NOCACHE);
case 1:
DBUG_PRINT("exit",("HA_CACHE_TBL_ASKTRANSACT"));
DBUG_RETURN(HA_CACHE_TBL_ASKTRANSACT);
case 2:
DBUG_PRINT("exit",("HA_CACHE_TBL_TRANSACT"));
DBUG_RETURN(HA_CACHE_TBL_TRANSACT);
default:
DBUG_PRINT("exit",("HA_CACHE_TBL_NOCACHE"));
DBUG_RETURN(HA_CACHE_TBL_NOCACHE);
}
DBUG_ENTER("ha_ndbcluster::table_cache_type=HA_CACHE_TBL_ASKTRANSACT");
DBUG_RETURN(HA_CACHE_TBL_ASKTRANSACT);
}
static
......
......@@ -247,7 +247,6 @@ class ha_ndbcluster: public handler
bool m_force_send;
ha_rows m_autoincrement_prefetch;
bool m_transaction_on;
ulong m_query_cache_type;
void set_rec_per_key();
void records_update();
......
......@@ -3969,7 +3969,6 @@ enum options_mysqld
OPT_INNODB, OPT_ISAM,
OPT_NDBCLUSTER, OPT_NDB_CONNECTSTRING, OPT_NDB_USE_EXACT_COUNT,
OPT_NDB_FORCE_SEND, OPT_NDB_AUTOINCREMENT_PREFETCH_SZ,
OPT_NDB_QUERY_CACHE_TYPE,
OPT_SKIP_SAFEMALLOC,
OPT_TEMP_POOL, OPT_TX_ISOLATION,
OPT_SKIP_STACK_TRACE, OPT_SKIP_SYMLINKS,
......@@ -4429,16 +4428,6 @@ Disable with --skip-ndbcluster (will save memory).",
(gptr*) &global_system_variables.ndb_use_exact_count,
(gptr*) &global_system_variables.ndb_use_exact_count,
0, GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, 0},
#ifdef HAVE_QUERY_CACHE
{"ndb_query_cache_type", OPT_NDB_QUERY_CACHE_TYPE,
"0 = OFF = Don't cache or retrieve results. 1 = ON = Cache as query_cache_type states and "
"invalidate cache if tables are updated by other mysql servers. "
"2 = LOCAL = Cache as query_cache_type states and don't bother about what's happening on other "
"mysql servers.",
(gptr*) &global_system_variables.ndb_query_cache_type,
(gptr*) &global_system_variables.ndb_query_cache_type,
0, GET_ULONG, REQUIRED_ARG, 0, 0, 2, 0, 0, 0},
#endif
#endif
{"new", 'n', "Use very new possible 'unsafe' functions.",
(gptr*) &global_system_variables.new_mode,
......
......@@ -370,12 +370,6 @@ sys_ndb_force_send("ndb_force_send",
sys_var_thd_bool
sys_ndb_use_exact_count("ndb_use_exact_count",
&SV::ndb_use_exact_count);
#ifdef HAVE_QUERY_CACHE
sys_var_thd_enum
sys_ndb_query_cache_type("ndb_query_cache_type",
&SV::ndb_query_cache_type,
&ndb_query_cache_type_typelib);
#endif
sys_var_thd_bool
sys_ndb_use_transactions("ndb_use_transactions",
&SV::ndb_use_transactions);
......@@ -640,9 +634,6 @@ sys_var *sys_variables[]=
&sys_ndb_autoincrement_prefetch_sz,
&sys_ndb_force_send,
&sys_ndb_use_exact_count,
#ifdef HAVE_QUERY_CACHE
&sys_ndb_query_cache_type,
#endif
&sys_ndb_use_transactions,
#endif
&sys_unique_checks,
......@@ -810,9 +801,6 @@ struct show_var_st init_vars[]= {
(char*) &sys_ndb_autoincrement_prefetch_sz, SHOW_SYS},
{sys_ndb_force_send.name, (char*) &sys_ndb_force_send, SHOW_SYS},
{sys_ndb_use_exact_count.name,(char*) &sys_ndb_use_exact_count, SHOW_SYS},
#ifdef HAVE_QUERY_CACHE
{sys_ndb_query_cache_type.name,(char*) &sys_ndb_query_cache_type, SHOW_SYS},
#endif
{sys_ndb_use_transactions.name,(char*) &sys_ndb_use_transactions, SHOW_SYS},
#endif
{sys_net_buffer_length.name,(char*) &sys_net_buffer_length, SHOW_SYS},
......
......@@ -366,12 +366,6 @@ TYPELIB query_cache_type_typelib=
array_elements(query_cache_type_names)-1,"", query_cache_type_names, NULL
};
const char *ndb_query_cache_type_names[]= { "OFF", "ON", "LOCAL",NullS };
TYPELIB ndb_query_cache_type_typelib=
{
array_elements(ndb_query_cache_type_names)-1,"", ndb_query_cache_type_names, NULL
};
/*****************************************************************************
Query_cache_block_table method(s)
*****************************************************************************/
......
......@@ -422,7 +422,6 @@ protected:
};
extern Query_cache query_cache;
extern TYPELIB ndb_query_cache_type_typelib;
extern TYPELIB query_cache_type_typelib;
void query_cache_end_of_result(THD *thd);
void query_cache_abort(NET *net);
......
......@@ -403,7 +403,6 @@ struct system_variables
ulong ndb_autoincrement_prefetch_sz;
my_bool ndb_force_send;
my_bool ndb_use_exact_count;
ulong ndb_query_cache_type;
my_bool ndb_use_transactions;
#endif /* HAVE_NDBCLUSTER_DB */
my_bool old_passwords;
......
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