MySQL 5.6.14 Source Code Document
|
Go to the source code of this file.
Classes | |
struct | meta_column |
struct | meta_index |
struct | option_value |
struct | option |
struct | meta_cfg_info |
Macros | |
#define | MCI_CFG_DB_NAME "innodb_memcache" |
#define | MCI_CFG_CONTAINER_TABLE "containers" |
#define | MCI_CFG_CACHE_POLICIES "cache_policies" |
#define | MCI_CFG_CONFIG_OPTIONS "config_options" |
#define | MAX_TABLE_NAME_LEN 192 |
#define | MAX_DATABASE_NAME_LEN MAX_TABLE_NAME_LEN |
#define | MAX_FULL_NAME_LEN (MAX_TABLE_NAME_LEN + MAX_DATABASE_NAME_LEN + 14) |
#define | COLUMN_SEPARATOR "separator" |
#define | TABLE_MAP_SEPARATOR "table_map_delimiter" |
#define | MAX_DELIMITER_LEN 32 |
#define | GET_OPTION(meta_info, option, val, val_len) |
Typedefs | |
typedef void * | hash_node_t |
typedef struct meta_column | meta_column_t |
typedef enum container | container_t |
typedef enum cache_policy | cache_policy_t |
typedef enum config_opt | config_opt_t |
typedef enum meta_use_idx | meta_use_idx_t |
typedef struct meta_index | meta_index_t |
typedef enum meta_cache_opt | meta_cache_opt_t |
typedef enum option_id | option_id_t |
typedef struct option_value | option_value_t |
typedef struct option | option_t |
typedef struct meta_cfg_info | meta_cfg_info_t |
Enumerations | |
enum | container { CONTAINER_NAME, CONTAINER_DB, CONTAINER_TABLE, CONTAINER_KEY, CONTAINER_VALUE, CONTAINER_FLAG, CONTAINER_CAS, CONTAINER_EXP, CONTAINER_NUM_COLS } |
enum | cache_policy { CACHE_POLICY_NAME, CACHE_POLICY_GET, CACHE_POLICY_SET, CACHE_POLICY_DEL, CACHE_POLICY_FLUSH, CACHE_POLICY_NUM_COLS } |
enum | config_opt { CONFIG_OPT_KEY, CONFIG_OPT_VALUE, CONFIG_OPT_NUM_COLS } |
enum | meta_use_idx { META_USE_NO_INDEX = 1, META_USE_CLUSTER, META_USE_SECONDARY } |
enum | meta_cache_opt { META_CACHE_OPT_INNODB = 1, META_CACHE_OPT_DEFAULT, META_CACHE_OPT_MIX, META_CACHE_OPT_DISABLE, META_CACHE_NUM_OPT } |
enum | option_id { OPTION_ID_COL_SEP, OPTION_ID_TBL_MAP_SEP, OPTION_ID_NUM_OPTIONS, OPT_port = 1, OPT_socket, OPT_compress, OPT_password, OPT_pipe, OPT_timeout, OPT_user, OPT_init_command, OPT_host, OPT_database, OPT_debug, OPT_return_found_rows, OPT_ssl_key, OPT_ssl_cert, OPT_ssl_ca, OPT_ssl_capath, OPT_character_sets_dir, OPT_default_character_set, OPT_interactive_timeout, OPT_connect_timeout, OPT_local_infile, OPT_disable_local_infile, OPT_ssl_cipher, OPT_max_allowed_packet, OPT_protocol, OPT_shared_memory_base_name, OPT_multi_results, OPT_multi_statements, OPT_multi_queries, OPT_secure_auth, OPT_report_data_truncation, OPT_plugin_dir, OPT_default_auth, OPT_bind_address, OPT_ssl_crl, OPT_ssl_crlpath, OPT_enable_cleartext_plugin, OPT_keep_this_one_last } |
Functions | |
meta_cfg_info_t * | innodb_config (const char *name, size_t name_len, hash_table_t **meta_hash) |
bool | innodb_verify (meta_cfg_info_t *info) |
void | innodb_config_free (meta_cfg_info_t *item) |
meta_cfg_info_t * | innodb_config_meta_hash_init (hash_table_t *meta_hash) |
Created 03/15/2011 Jimmy Yang
Definition in file innodb_config.h.
#define COLUMN_SEPARATOR "separator" |
The "names" in the "config_option" table to identify possible
config options. Both are optional. "COLUMN_SEPARATOR" is the delimiter that separates multiple columns and "TABLE_MAP_SEPARATOR" is the delimiter that separates table map name and key value
Definition at line 148 of file innodb_config.h.
#define GET_OPTION | ( | meta_info, | |
option, | |||
val, | |||
val_len | |||
) |
Get configure option value. If the value is not configured by
user, obtain its default value from "config_option_names"
meta_info | metadata structure contains configure options |
option | option whose value to get |
val | value to fetch |
val_len | value length |
Definition at line 184 of file innodb_config.h.
#define MAX_DELIMITER_LEN 32 |
Maximum delimiter length
Definition at line 161 of file innodb_config.h.
#define MAX_TABLE_NAME_LEN 192 |
Max table name length as defined in univ.i
Definition at line 49 of file innodb_config.h.
typedef enum cache_policy cache_policy_t |
columns in the "cache_policy" table
typedef enum config_opt config_opt_t |
columns in the "config_options" table
typedef enum container container_t |
Following are enums defining column IDs indexing into each of three
system tables Columns in the "containers" system table, this maps the Memcached operation to a consistent InnoDB table
typedef enum meta_cache_opt meta_cache_opt_t |
Cache options, tells if we will used Memcached default engine or InnoDB
Memcached engine to handle the request
typedef struct meta_cfg_info meta_cfg_info_t |
In memory structure contains most necessary metadata info
to configure an InnoDB Memcached engine
typedef struct meta_column meta_column_t |
structure describes each column's basic info (name, field_id etc.)
typedef struct meta_index meta_index_t |
Describes the index's name and ID of the index on the "key" column
typedef enum meta_use_idx meta_use_idx_t |
Following are some value defines describes the options that configures
the InnoDB Memcached Values to set up "m_use_idx" field of "meta_index_t" structure, indicating whether we will use cluster or secondary index on the "key" column to perform the search. Please note the index must be unique index
enum cache_policy |
columns in the "cache_policy" table
Definition at line 86 of file innodb_config.h.
enum config_opt |
columns in the "config_options" table
CONFIG_OPT_KEY |
key column in the "config_option" table |
CONFIG_OPT_VALUE |
value column |
CONFIG_OPT_NUM_COLS |
number of columns (currently 2) in table |
Definition at line 101 of file innodb_config.h.
enum container |
Following are enums defining column IDs indexing into each of three
system tables Columns in the "containers" system table, this maps the Memcached operation to a consistent InnoDB table
Definition at line 68 of file innodb_config.h.
enum meta_cache_opt |
Cache options, tells if we will used Memcached default engine or InnoDB
Memcached engine to handle the request
META_CACHE_OPT_INNODB |
Use InnoDB Memcached Engine only |
META_CACHE_OPT_DEFAULT |
Use Default Memcached Engine only |
META_CACHE_OPT_MIX |
Use both, first use default memcached engine |
META_CACHE_OPT_DISABLE |
This operation is disabled |
META_CACHE_NUM_OPT |
Number of options |
Definition at line 133 of file innodb_config.h.
enum meta_use_idx |
Following are some value defines describes the options that configures
the InnoDB Memcached Values to set up "m_use_idx" field of "meta_index_t" structure, indicating whether we will use cluster or secondary index on the "key" column to perform the search. Please note the index must be unique index
Definition at line 114 of file innodb_config.h.
enum option_id |
OPTION_ID_COL_SEP |
ID for character(s) separating multiple column mapping |
OPTION_ID_TBL_MAP_SEP |
ID for character(s) separating table map name and key |
OPTION_ID_NUM_OPTIONS |
number of options |
Definition at line 152 of file innodb_config.h.
meta_cfg_info_t* innodb_config | ( | const char * | name, |
size_t | name_len, | ||
hash_table_t ** | meta_hash | ||
) |
This function opens the default configuration table, and find the table and column info that used for InnoDB Memcached, and set up InnoDB Memcached's meta_cfg_info_t structure. If the "name" parameter is not NULL, it will find the specified setting in the "container" table. If "name" field is NULL, it will then look for setting with the name of "default". Otherwise, it returns the setting corresponding to the first row of the configure table.
If the hash table (meta_hash) is NULL, then initialise the hash table with data in the configure tables. And return the "default" item. If there is no setting named "default" then use the first row in the table. This is currently only used at the engine initialization time. If the hash table (meta_hash) is created, then look for the meta-data based on specified configuration name parameter. If such metadata does not exist in the hash table, then add such metadata into hash table.
name | in: config option name |
name_len | in: name length |
meta_hash | in/out: engine hash table. If NULL, it will be created and initialized |
Definition at line 1173 of file innodb_config.c.
void innodb_config_free | ( | meta_cfg_info_t * | item | ) |
This function frees meta info structure in/own: meta info structure
This function frees meta info structures
item | in: meta info structure |
Definition at line 68 of file innodb_config.c.
meta_cfg_info_t* innodb_config_meta_hash_init | ( | hash_table_t * | meta_hash | ) |
This function opens the "containers" table, reads in all rows and instantiates the metadata hash table.
This function opens the "containers" table, reads in all rows and instantiates the metadata hash table.
meta_hash | in/out: InnoDB Memcached engine |
Definition at line 505 of file innodb_config.c.
bool innodb_verify | ( | meta_cfg_info_t * | info | ) |
This function verifies the table configuration information, and fills in columns used for memcached functionalities (cas, exp etc.)
This function verifies the table configuration information, and fills in columns used for memcached functionalities (cas, exp etc.)
info | in: meta info structure |
Definition at line 1122 of file innodb_config.c.