MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
innodb_engine.c File Reference
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <pthread.h>
#include <arpa/inet.h>
#include "default_engine.h"
#include <memcached/util.h>
#include <memcached/config_parser.h>
#include <unistd.h>
#include "innodb_engine.h"
#include "innodb_engine_private.h"
#include "innodb_api.h"
#include "hash_item_util.h"
#include "innodb_cb_api.h"
Include dependency graph for innodb_engine.c:

Go to the source code of this file.

Classes

struct  eng_config_info

Macros

#define KEY_MAX_LENGTH   250
#define BK_COMMIT_THREAD_SLEEP_INTERVAL   5
#define BK_MAX_PROCESS_COMMIT   5
#define CONN_IDLE_TIME_TO_BK_COMMIT   5

Typedefs

typedef struct eng_config_info eng_config_info_t

Enumerations

enum  conn_mode { CONN_MODE_READ, CONN_MODE_WRITE, CONN_MODE_NONE }

Functions

int handler_unlock_table (void *my_thd, void *my_table, int my_lock_mode)
ENGINE_ERROR_CODE create_my_default_instance (uint64_t, GET_SERVER_API, ENGINE_HANDLE **)
ENGINE_ERROR_CODE create_instance (uint64_t interface, GET_SERVER_API get_server_api, ENGINE_HANDLE **handle)
void handler_close_thd (void *)

Variables

option_t config_option_names []

Detailed Description

InnoDB Memcached Engine code

Extracted and modified from NDB memcached project 04/12/2011 Jimmy Yang

Definition in file innodb_engine.c.

Macro Definition Documentation

#define BK_COMMIT_THREAD_SLEEP_INTERVAL   5
Time (in seconds) that background thread sleeps before it wakes

up and commit idle connection transactions

Definition at line 49 of file innodb_engine.c.

#define BK_MAX_PROCESS_COMMIT   5
Maximum number of connections that background thread processes each

time

Definition at line 53 of file innodb_engine.c.

#define CONN_IDLE_TIME_TO_BK_COMMIT   5
Minimum time (in seconds) that a connection has been idle, that makes

it candidate for background thread to commit it

Definition at line 57 of file innodb_engine.c.

#define KEY_MAX_LENGTH   250

Define also present in daemon/memcached.h

Definition at line 45 of file innodb_engine.c.

Typedef Documentation

InnoDB Memcached engine configuration info

Enumeration Type Documentation

enum conn_mode
Defines for connection initialization to indicate if we will

do a read or write operation, or in the case of CONN_MODE_NONE, just get the connection's conn_data structure

Definition at line 682 of file innodb_engine.c.

Function Documentation

ENGINE_ERROR_CODE create_instance ( uint64_t  interface,
GET_SERVER_API  get_server_api,
ENGINE_HANDLE **  handle 
)

Create InnoDB Memcached Engine.

Returns
ENGINE_SUCCESS if successful, otherwise, error code
Parameters
interfacein: protocol version, currently always 1
get_server_apiin: Callback the engines may call to get the public server interface
handleout: Engine handle

Definition at line 145 of file innodb_engine.c.

void handler_close_thd ( void *  my_thd)

Close the handler

Parameters
my_thdin: THD

Definition at line 360 of file handler_api.cc.

Here is the call graph for this function:

int handler_unlock_table ( void *  my_thd,
void *  my_table,
int  mode 
)
Check the input key name implies a table mapping switch. The name

would start with "@@", and in the format of "@@new_table_mapping.key" or simply "@@new_table_mapping" Unlock a table and commit the transaction return 0 if fail to commit the transaction in: lock mode

Unlock a table and commit the transaction return 0 if failed to commit the transaction

Parameters
my_thdin: thread
my_tablein: Table metadata
modein: mode

Definition at line 380 of file handler_api.cc.

Here is the call graph for this function:

Variable Documentation

option_t config_option_names[]

Configure options enum IDs, their "names" and their default value

Definition at line 38 of file innodb_config.c.