MySQL 9.1.0
Source Code Documentation
|
#include <stddef.h>
#include <map>
#include <string>
#include <unordered_set>
#include "map_helpers.h"
#include "my_alloc.h"
#include "my_inttypes.h"
#include "my_psi_config.h"
#include "mysql/components/services/bits/mysql_mutex_bits.h"
#include "mysql/components/services/bits/psi_bits.h"
#include "mysql/psi/mysql_mutex.h"
#include "sql/psi_memory_key.h"
#include "sql_string.h"
Go to the source code of this file.
Classes | |
struct | st_persist_var |
STRUCT st_persist_var. More... | |
struct | st_persist_var_hash |
STRUCT st_persist_var_hash. More... | |
class | Persisted_variables_cache |
struct | Persisted_variables_cache::Key_info |
Typedefs | |
using | Persisted_variables_umap = malloc_unordered_map< std::string, st_persist_var > |
using | Persisted_variables_uset = malloc_unordered_set< st_persist_var, st_persist_var_hash > |
Functions | |
void | my_init_persist_psi_keys (void) |
CLASS Persisted_variables_cache Holds <name,value> pair of all options which needs to be persisted to a file. More... | |
using Persisted_variables_umap = malloc_unordered_map<std::string, st_persist_var> |
void my_init_persist_psi_keys | ( | void | ) |
CLASS Persisted_variables_cache Holds <name,value> pair of all options which needs to be persisted to a file.
When first SET PERSIST statement is executed we instantiate Persisted_variables_cache which loads the config file if present into m_persisted_dynamic_variables set. This is a singleton operation. m_persisted_dynamic_variables is an in-memory copy of config file itself. If the SET statement passes then this in-memory is updated and flushed to file as an atomic operation.
Next SET PERSIST statement would only update the in-memory copy and sync to config file instead of loading the file again.