1#ifndef OPT_COSTCONSTANTCACHE_INCLUDED
2#define OPT_COSTCONSTANTCACHE_INCLUDED
142 assert(cost_constants !=
nullptr);
156 if (ref_count == 0)
delete cost;
This class implements a cache for "cost constant sets".
Definition: opt_costconstantcache.h:59
void init()
Initialize the cost module.
Definition: opt_costconstantcache.cc:65
~Cost_constant_cache()
Destructor for the cost constant cache.
Definition: opt_costconstantcache.cc:58
Cost_model_constants * create_defaults(Optimizer optimizer) const
Create default cost constants.
Definition: opt_costconstantcache.cc:147
void reload()
Reload all cost constants from the configuration tables.
Definition: opt_costconstantcache.cc:121
bool m_inited
Definition: opt_costconstantcache.h:196
Cost_model_constants * current_cost_constants
The current set of cost constants that will be used by new sessions.
Definition: opt_costconstantcache.h:182
const Cost_model_constants * get_cost_constants_hypergraph()
Definition: opt_costconstantcache.h:119
Cost_model_constants * current_cost_constants_hypergraph
The current set of cost constants that will be used with the hypergraph optimizer by new sessions.
Definition: opt_costconstantcache.h:188
mysql_mutex_t LOCK_cost_const
Mutex protecting the pointer to the current cost constant set and reference counting on all cost cons...
Definition: opt_costconstantcache.h:194
const Cost_model_constants * get_cost_constants()
Get the currently used set of cost constants.
Definition: opt_costconstantcache.h:105
void close()
Close the cost constant cache.
Definition: opt_costconstantcache.cc:94
void release_cost_constants(const Cost_model_constants *cost_constants)
Releases the cost constant set.
Definition: opt_costconstantcache.h:141
void update_current_cost_constants(Cost_model_constants *new_cost_constants, Optimizer optimizer)
Replace the current cost constants with a new set of cost constants.
Definition: opt_costconstantcache.cc:153
Set of all cost constants used by the server and all storage engines.
Definition: opt_costconstants.h:435
unsigned int dec_ref_count()
Decrement the reference counter for this cost constant set.
Definition: opt_costconstants.h:521
void inc_ref_count()
Increment the reference counter for this cost constant set.
Definition: opt_costconstants.h:510
#define mysql_mutex_lock(M)
Definition: mysql_mutex.h:50
#define mysql_mutex_unlock(M)
Definition: mysql_mutex.h:57
ABI for instrumented mutexes.
void delete_optimizer_cost_module()
Deletes the optimizer cost module.
Definition: opt_costconstantcache.cc:468
void init_optimizer_cost_module(bool enable_plugins)
Initializes the optimizer cost module.
Definition: opt_costconstantcache.cc:457
void reload_optimizer_cost_constants()
Reloads the optimizer cost constants from the cost constant tables.
Definition: opt_costconstantcache.cc:476
Optimizer
Definition: opt_costconstants.h:39
Instrumentation helpers for mutexes.
An instrumented mutex structure.
Definition: mysql_mutex_bits.h:50