1#ifndef OPT_COSTCONSTANTCACHE_INCLUDED
2#define OPT_COSTCONSTANTCACHE_INCLUDED
139 assert(cost_constants !=
nullptr);
155 if (ref_count == 0)
delete cost;
This class implements a cache for "cost constant sets".
Definition: opt_costconstantcache.h:58
Cost_model_constants * create_defaults() const
Create default cost constants.
Definition: opt_costconstantcache.cc:124
void init()
Initialize the cost module.
Definition: opt_costconstantcache.cc:71
~Cost_constant_cache()
Destructor for the cost constant cache.
Definition: opt_costconstantcache.cc:65
void reload()
Reload all cost constants from the configuration tables.
Definition: opt_costconstantcache.cc:110
bool m_inited
Definition: opt_costconstantcache.h:187
Cost_model_constants * current_cost_constants
The current set of cost constants that will be used by new sessions.
Definition: opt_costconstantcache.h:179
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:131
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:185
const Cost_model_constants * get_cost_constants()
Get the currently used set of cost constants.
Definition: opt_costconstantcache.h:115
void close()
Close the cost constant cache.
Definition: opt_costconstantcache.cc:88
void release_cost_constants(const Cost_model_constants *cost_constants)
Releases the cost constant set.
Definition: opt_costconstantcache.h:138
Cost_constant_cache()
Creates an empty cost constant cache.
Definition: opt_costconstantcache.cc:62
Set of all cost constants used by the server and all storage engines.
Definition: opt_costconstants.h:416
unsigned int dec_ref_count()
Decrement the reference counter for this cost constant set.
Definition: opt_costconstants.h:502
void inc_ref_count()
Increment the reference counter for this cost constant set.
Definition: opt_costconstants.h:491
#define mysql_mutex_lock(M)
Definition: mysql_mutex.h:49
#define mysql_mutex_unlock(M)
Definition: mysql_mutex.h:56
ABI for instrumented mutexes.
void delete_optimizer_cost_module()
Deletes the optimizer cost module.
Definition: opt_costconstantcache.cc:448
void init_optimizer_cost_module(bool enable_plugins)
Initializes the optimizer cost module.
Definition: opt_costconstantcache.cc:437
void reload_optimizer_cost_constants()
Reloads the optimizer cost constants from the cost constant tables.
Definition: opt_costconstantcache.cc:456
Instrumentation helpers for mutexes.
An instrumented mutex structure.
Definition: mysql_mutex_bits.h:49