1#ifndef OPT_COSTCONSTANTCACHE_INCLUDED
2#define OPT_COSTCONSTANTCACHE_INCLUDED
140 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
Cost_model_constants * create_defaults() const
Create default cost constants.
Definition: opt_costconstantcache.cc:125
void init()
Initialize the cost module.
Definition: opt_costconstantcache.cc:72
~Cost_constant_cache()
Destructor for the cost constant cache.
Definition: opt_costconstantcache.cc:66
void reload()
Reload all cost constants from the configuration tables.
Definition: opt_costconstantcache.cc:111
bool m_inited
Definition: opt_costconstantcache.h:188
Cost_model_constants * current_cost_constants
The current set of cost constants that will be used by new sessions.
Definition: opt_costconstantcache.h:180
void update_current_cost_constants(Cost_model_constants *new_cost_constants)
Replace the current cost constants with a new set of cost constants.
Definition: opt_costconstantcache.cc:132
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:186
const Cost_model_constants * get_cost_constants()
Get the currently used set of cost constants.
Definition: opt_costconstantcache.h:116
void close()
Close the cost constant cache.
Definition: opt_costconstantcache.cc:89
void release_cost_constants(const Cost_model_constants *cost_constants)
Releases the cost constant set.
Definition: opt_costconstantcache.h:139
Cost_constant_cache()
Creates an empty cost constant cache.
Definition: opt_costconstantcache.cc:63
Set of all cost constants used by the server and all storage engines.
Definition: opt_costconstants.h:417
unsigned int dec_ref_count()
Decrement the reference counter for this cost constant set.
Definition: opt_costconstants.h:503
void inc_ref_count()
Increment the reference counter for this cost constant set.
Definition: opt_costconstants.h:492
#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:449
void init_optimizer_cost_module(bool enable_plugins)
Initializes the optimizer cost module.
Definition: opt_costconstantcache.cc:438
void reload_optimizer_cost_constants()
Reloads the optimizer cost constants from the cost constant tables.
Definition: opt_costconstantcache.cc:457
Instrumentation helpers for mutexes.
An instrumented mutex structure.
Definition: mysql_mutex_bits.h:50