MySQL 9.0.0
Source Code Documentation
|
#include "sql/opt_costconstantcache.h"
#include <memory>
#include "m_string.h"
#include "my_dbug.h"
#include "mysql/components/services/log_builtins.h"
#include "mysql/components/services/log_shared.h"
#include "mysql/my_loglevel.h"
#include "mysql/strings/m_ctype.h"
#include "mysqld_error.h"
#include "sql/current_thd.h"
#include "sql/field.h"
#include "sql/iterators/row_iterator.h"
#include "sql/mysqld.h"
#include "sql/opt_costmodel.h"
#include "sql/sql_base.h"
#include "sql/sql_class.h"
#include "sql/sql_const.h"
#include "sql/sql_executor.h"
#include "sql/sql_lex.h"
#include "sql/sql_tmp_table.h"
#include "sql/table.h"
#include "sql/transaction.h"
#include "sql_string.h"
#include "template_utils.h"
#include "thr_lock.h"
#include "thr_mutex.h"
Functions | |
static void | read_cost_constants (Cost_model_constants *cost_constants) |
Read the cost configuration tables and update the cost constant set. More... | |
static void | report_server_cost_warnings (const LEX_CSTRING &cost_name, double value, cost_constant_error error) |
Write warnings about illegal entries in the server_cost table. More... | |
static void | report_engine_cost_warnings (const LEX_CSTRING &se_name, int storage_category, const LEX_CSTRING &cost_name, double value, cost_constant_error error) |
Write warnings about illegal entries in the engine_cost table. More... | |
static void | read_server_cost_constants (THD *thd, TABLE *table, Cost_model_constants *cost_constants) |
Read the table that contains the cost constants for the server. More... | |
static void | read_engine_cost_constants (THD *thd, TABLE *table, Cost_model_constants *cost_constants) |
Read the table that contains the cost constants for the storage engines. More... | |
void | init_optimizer_cost_module (bool enable_plugins) |
Initializes the optimizer cost module. More... | |
void | delete_optimizer_cost_module () |
Deletes the optimizer cost module. More... | |
void | reload_optimizer_cost_constants () |
Reloads the optimizer cost constants from the cost constant tables. More... | |
Variables | |
Cost_constant_cache * | cost_constant_cache = nullptr |
void delete_optimizer_cost_module | ( | ) |
Deletes the optimizer cost module.
This should be called when the server stops to release allocated resources.
void init_optimizer_cost_module | ( | bool | enable_plugins | ) |
Initializes the optimizer cost module.
This should be done during startup from mysqld.cc.
|
static |
Read the cost configuration tables and update the cost constant set.
The const constant set must be initialized with default values when calling this function.
cost_constants | set with cost constants |
|
static |
Read the table that contains the cost constants for the storage engines.
The table must already be opened. The cost constant object is updated with cost constants found in the configuration table.
thd | the THD | |
table | the table to read from | |
[in,out] | cost_constants | cost constant object |
|
static |
Read the table that contains the cost constants for the server.
The table must already be opened. The cost constant object is updated with cost constants found in the configuration table.
thd | the THD | |
table | the table to read from | |
[in,out] | cost_constants | cost constant object |
void reload_optimizer_cost_constants | ( | ) |
Reloads the optimizer cost constants from the cost constant tables.
|
static |
Write warnings about illegal entries in the engine_cost table.
The warnings are written to the MySQL error log.
se_name | name of storage engine |
storage_category | device type |
cost_name | name of the cost constant |
value | value it was attempted set to |
error | error status |
|
static |
Write warnings about illegal entries in the server_cost table.
The warnings are written to the MySQL error log.
cost_name | name of the cost constant |
value | value it was attempted set to |
error | error status |
Cost_constant_cache* cost_constant_cache = nullptr |