2007-07-25 00:13:26 +08:00
/*
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
2010-04-20 21:50:34 +08:00
| PHP Version 5 |
2007-07-25 00:13:26 +08:00
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
2014-01-03 11:04:26 +08:00
| Copyright ( c ) 2006 - 2014 The PHP Group |
2007-07-25 00:13:26 +08:00
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
| This source file is subject to version 3.01 of the PHP license , |
| that is bundled with this package in the file LICENSE , and is |
| available through the world - wide - web at the following url : |
| http : //www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world - wide - web , please send a note to |
| license @ php . net so we can mail you a copy immediately . |
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
2011-10-26 07:01:49 +08:00
| Authors : Andrey Hristov < andrey @ mysql . com > |
2007-07-25 00:13:26 +08:00
| Ulf Wendel < uwendel @ mysql . com > |
2011-10-26 07:01:49 +08:00
| Georg Richter < georg @ mysql . com > |
2007-07-25 00:13:26 +08:00
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
*/
/* $Id$ */
# ifndef MYSQLND_ENUM_N_DEF_H
# define MYSQLND_ENUM_N_DEF_H
2009-10-22 23:17:03 +08:00
# ifndef TRUE
# define TRUE 1
# endif
# ifndef FALSE
# define FALSE 0
# endif
2009-11-20 16:12:14 +08:00
# define MYSQLND_MIN_COMPRESS_LEN 0
2008-01-29 02:27:49 +08:00
# define MYSQLND_MAX_PACKET_SIZE (256L*256L*256L-1)
2007-07-25 00:13:26 +08:00
2011-01-13 05:40:05 +08:00
# define MYSQLND_ASSEMBLED_PACKET_MAX_SIZE 3UL*1024UL*1024UL*1024UL
2007-07-25 00:13:26 +08:00
# define MYSQLND_ERRMSG_SIZE 512
# define MYSQLND_SQLSTATE_LENGTH 5
# define MYSQLND_SQLSTATE_NULL "00000"
2013-04-19 21:54:35 +08:00
# define MYSQLND_MAX_ALLOWED_USER_LEN 252 /* 63 char * 4byte . MySQL supports now only 16 char, but let it be forward compatible */
2010-04-27 19:02:51 +08:00
# define MYSQLND_MAX_ALLOWED_DB_LEN 1024 /* 256 char * 4byte. MySQL supports now only 64 char in the tables, but on the FS could be different. Forward compatible. */
2009-10-08 01:33:51 +08:00
# define MYSQLND_NET_CMD_BUFFER_MIN_SIZE 4096
# define MYSQLND_NET_CMD_BUFFER_MIN_SIZE_STR "4096"
2008-04-24 22:04:58 +08:00
# define SERVER_STATUS_IN_TRANS 1 /* Transaction has started */
# define SERVER_STATUS_AUTOCOMMIT 2 /* Server in auto_commit mode */
# define SERVER_MORE_RESULTS_EXISTS 8 /* Multi query - next query exists */
2008-05-07 23:16:27 +08:00
# define SERVER_QUERY_NO_GOOD_INDEX_USED 16
# define SERVER_QUERY_NO_INDEX_USED 32
2008-04-24 22:04:58 +08:00
/*
The server was able to fulfill the clients request and opened a
read - only non - scrollable cursor for a query . This flag comes
in reply to COM_STMT_EXECUTE and COM_STMT_FETCH commands .
*/
# define SERVER_STATUS_CURSOR_EXISTS 64
/*
This flag is sent when a read - only cursor is exhausted , in reply to
COM_STMT_FETCH command .
*/
# define SERVER_STATUS_LAST_ROW_SENT 128
# define SERVER_STATUS_DB_DROPPED 256 /* A database was dropped */
# define SERVER_STATUS_NO_BACKSLASH_ESCAPES 512
2010-09-27 19:23:01 +08:00
# define SERVER_QUERY_WAS_SLOW 2048
2010-12-02 21:59:56 +08:00
# define SERVER_PS_OUT_PARAMS 4096
2008-04-24 22:04:58 +08:00
2007-07-25 00:13:26 +08:00
# define MYSQLND_NO_DATA 100
# define MYSQLND_DATA_TRUNCATED 101
# define SHA1_MAX_LENGTH 20
# define SCRAMBLE_LENGTH 20
# define SCRAMBLE_LENGTH_323 8
# define CLIENT_LONG_PASSWORD 1 /* new more secure passwords */
# define CLIENT_FOUND_ROWS 2 /* Found instead of affected rows */
# define CLIENT_LONG_FLAG 4 /* Get all column flags */
# define CLIENT_CONNECT_WITH_DB 8 /* One can specify db on connect */
# define CLIENT_NO_SCHEMA 16 /* Don't allow database.table.column */
# define CLIENT_COMPRESS 32 /* Can use compression protocol */
# define CLIENT_ODBC 64 /* Odbc client */
# define CLIENT_LOCAL_FILES 128 /* Can use LOAD DATA LOCAL */
# define CLIENT_IGNORE_SPACE 256 /* Ignore spaces before '(' */
# define CLIENT_PROTOCOL_41 512 /* New 4.1 protocol */
# define CLIENT_INTERACTIVE 1024 /* This is an interactive client */
# define CLIENT_SSL 2048 /* Switch to SSL after handshake */
# define CLIENT_IGNORE_SIGPIPE 4096 /* IGNORE sigpipes */
# define CLIENT_TRANSACTIONS 8192 /* Client knows about transactions */
# define CLIENT_RESERVED 16384 /* Old flag for 4.1 protocol */
# define CLIENT_SECURE_CONNECTION 32768 /* New 4.1 authentication */
# define CLIENT_MULTI_STATEMENTS (1UL << 16) /* Enable/disable multi-stmt support */
# define CLIENT_MULTI_RESULTS (1UL << 17) /* Enable/disable multi-results */
2009-10-01 07:13:43 +08:00
# define CLIENT_PS_MULTI_RESULTS (1UL << 18) /* Multi-results in PS-protocol */
2011-01-10 23:14:56 +08:00
# define CLIENT_PLUGIN_AUTH (1UL << 19) /* Client supports plugin authentication */
2013-01-10 01:58:29 +08:00
# define CLIENT_CONNECT_ATTRS (1UL << 20) /* Client supports connection attributes */
# define CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA (1UL << 21) /* Enable authentication response packet to be larger than 255 bytes. */
# define CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS (1UL << 22) /* Don't close the connection for a connection with expired password. */
2010-04-15 19:01:30 +08:00
# define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30)
2011-01-13 05:40:05 +08:00
# define MYSQLND_CAPABILITIES (CLIENT_LONG_PASSWORD | CLIENT_LONG_FLAG | CLIENT_TRANSACTIONS | \
CLIENT_PROTOCOL_41 | CLIENT_SECURE_CONNECTION | \
2011-01-24 20:34:47 +08:00
CLIENT_MULTI_RESULTS | CLIENT_PS_MULTI_RESULTS | CLIENT_LOCAL_FILES | CLIENT_PLUGIN_AUTH )
2010-09-01 22:47:36 +08:00
# define MYSQLND_NET_FLAG_USE_COMPRESSION 1
2007-07-25 00:13:26 +08:00
typedef enum mysqlnd_extension
{
MYSQLND_MYSQL = 0 ,
2010-10-05 22:56:49 +08:00
MYSQLND_MYSQLI
2007-07-25 00:13:26 +08:00
} enum_mysqlnd_extension ;
enum
{
MYSQLND_FETCH_ASSOC = 1 ,
MYSQLND_FETCH_NUM = 2 ,
2010-10-05 22:56:49 +08:00
MYSQLND_FETCH_BOTH = 1 | 2
2007-07-25 00:13:26 +08:00
} ;
/* Follow libmysql convention */
typedef enum func_status
{
PASS = 0 ,
2010-10-05 22:56:49 +08:00
FAIL = 1
2007-07-25 00:13:26 +08:00
} enum_func_status ;
typedef enum mysqlnd_query_type
{
QUERY_UPSERT ,
QUERY_SELECT ,
QUERY_LOAD_LOCAL
} enum_mysqlnd_query_type ;
typedef enum mysqlnd_res_type
{
MYSQLND_RES_NORMAL = 1 ,
MYSQLND_RES_PS_BUF ,
MYSQLND_RES_PS_UNBUF
} enum_mysqlnd_res_type ;
typedef enum mysqlnd_option
{
MYSQL_OPT_CONNECT_TIMEOUT ,
MYSQL_OPT_COMPRESS ,
MYSQL_OPT_NAMED_PIPE ,
MYSQL_INIT_COMMAND ,
MYSQL_READ_DEFAULT_FILE ,
MYSQL_READ_DEFAULT_GROUP ,
MYSQL_SET_CHARSET_DIR ,
MYSQL_SET_CHARSET_NAME ,
MYSQL_OPT_LOCAL_INFILE ,
MYSQL_OPT_PROTOCOL ,
MYSQL_SHARED_MEMORY_BASE_NAME ,
MYSQL_OPT_READ_TIMEOUT ,
MYSQL_OPT_WRITE_TIMEOUT ,
MYSQL_OPT_USE_RESULT ,
MYSQL_OPT_USE_REMOTE_CONNECTION ,
MYSQL_OPT_USE_EMBEDDED_CONNECTION ,
MYSQL_OPT_GUESS_CONNECTION ,
MYSQL_SET_CLIENT_IP ,
MYSQL_SECURE_AUTH ,
MYSQL_REPORT_DATA_TRUNCATION ,
MYSQL_OPT_RECONNECT ,
MYSQL_OPT_SSL_VERIFY_SERVER_CERT ,
2011-01-31 21:52:21 +08:00
MYSQL_PLUGIN_DIR ,
MYSQL_DEFAULT_AUTH ,
2013-01-10 01:58:29 +08:00
MYSQL_SERVER_PUBLIC_KEY ,
MYSQL_ENABLE_CLEARTEXT_PLUGIN ,
MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS ,
2010-08-12 20:02:02 +08:00
# if MYSQLND_UNICODE
2007-07-25 00:13:26 +08:00
MYSQLND_OPT_NUMERIC_AND_DATETIME_AS_UNICODE = 200 ,
2007-10-02 18:45:27 +08:00
# endif
2007-07-25 00:13:26 +08:00
# ifdef MYSQLND_STRING_TO_INT_CONVERSION
2008-09-16 02:10:38 +08:00
MYSQLND_OPT_INT_AND_FLOAT_NATIVE = 201 ,
2007-07-25 00:13:26 +08:00
# endif
2007-10-02 18:45:27 +08:00
MYSQLND_OPT_NET_CMD_BUFFER_SIZE = 202 ,
MYSQLND_OPT_NET_READ_BUFFER_SIZE = 203 ,
2010-04-15 19:01:30 +08:00
MYSQLND_OPT_SSL_KEY = 204 ,
MYSQLND_OPT_SSL_CERT = 205 ,
MYSQLND_OPT_SSL_CA = 206 ,
MYSQLND_OPT_SSL_CAPATH = 207 ,
MYSQLND_OPT_SSL_CIPHER = 208 ,
2011-01-13 05:40:05 +08:00
MYSQLND_OPT_SSL_PASSPHRASE = 209 ,
MYSQLND_OPT_MAX_ALLOWED_PACKET = 210 ,
MYSQLND_OPT_AUTH_PROTOCOL = 211
2007-07-25 00:13:26 +08:00
} enum_mysqlnd_option ;
2010-08-10 01:01:57 +08:00
typedef enum mysqlnd_protocol_type
{
MYSQL_PROTOCOL_DEFAULT = 0 ,
MYSQL_PROTOCOL_TCP , /* all, supported */
MYSQL_PROTOCOL_SOCKET , /* unix, supported */
MYSQL_PROTOCOL_PIPE , /* win32, not-supported */
MYSQL_PROTOCOL_MEMORY , /* win32, not-supported */
MYSQL_PROTOCOL_LAST
} enum_mysqlnd_protocol_type ;
2009-08-28 17:30:16 +08:00
2007-07-25 00:13:26 +08:00
typedef enum mysqlnd_field_types
{
MYSQL_TYPE_DECIMAL ,
MYSQL_TYPE_TINY ,
MYSQL_TYPE_SHORT ,
MYSQL_TYPE_LONG ,
MYSQL_TYPE_FLOAT ,
MYSQL_TYPE_DOUBLE ,
MYSQL_TYPE_NULL ,
MYSQL_TYPE_TIMESTAMP ,
MYSQL_TYPE_LONGLONG ,
MYSQL_TYPE_INT24 ,
MYSQL_TYPE_DATE ,
MYSQL_TYPE_TIME ,
MYSQL_TYPE_DATETIME ,
MYSQL_TYPE_YEAR ,
MYSQL_TYPE_NEWDATE ,
MYSQL_TYPE_VARCHAR ,
MYSQL_TYPE_BIT ,
MYSQL_TYPE_NEWDECIMAL = 246 ,
MYSQL_TYPE_ENUM = 247 ,
MYSQL_TYPE_SET = 248 ,
MYSQL_TYPE_TINY_BLOB = 249 ,
MYSQL_TYPE_MEDIUM_BLOB = 250 ,
MYSQL_TYPE_LONG_BLOB = 251 ,
MYSQL_TYPE_BLOB = 252 ,
MYSQL_TYPE_VAR_STRING = 253 ,
MYSQL_TYPE_STRING = 254 ,
MYSQL_TYPE_GEOMETRY = 255
} enum_mysqlnd_field_types ;
/* Please update this if there is a new type after MYSQL_TYPE_GEOMETRY */
# define MYSQL_TYPE_LAST MYSQL_TYPE_GEOMETRY
2009-08-28 17:30:16 +08:00
2007-07-25 00:13:26 +08:00
typedef enum mysqlnd_server_option
{
MYSQL_OPTION_MULTI_STATEMENTS_ON ,
MYSQL_OPTION_MULTI_STATEMENTS_OFF
} enum_mysqlnd_server_option ;
# define FIELD_TYPE_DECIMAL MYSQL_TYPE_DECIMAL
# define FIELD_TYPE_NEWDECIMAL MYSQL_TYPE_NEWDECIMAL
# define FIELD_TYPE_TINY MYSQL_TYPE_TINY
# define FIELD_TYPE_SHORT MYSQL_TYPE_SHORT
# define FIELD_TYPE_LONG MYSQL_TYPE_LONG
# define FIELD_TYPE_FLOAT MYSQL_TYPE_FLOAT
# define FIELD_TYPE_DOUBLE MYSQL_TYPE_DOUBLE
# define FIELD_TYPE_NULL MYSQL_TYPE_NULL
# define FIELD_TYPE_TIMESTAMP MYSQL_TYPE_TIMESTAMP
# define FIELD_TYPE_LONGLONG MYSQL_TYPE_LONGLONG
# define FIELD_TYPE_INT24 MYSQL_TYPE_INT24
# define FIELD_TYPE_DATE MYSQL_TYPE_DATE
# define FIELD_TYPE_TIME MYSQL_TYPE_TIME
# define FIELD_TYPE_DATETIME MYSQL_TYPE_DATETIME
# define FIELD_TYPE_YEAR MYSQL_TYPE_YEAR
# define FIELD_TYPE_NEWDATE MYSQL_TYPE_NEWDATE
# define FIELD_TYPE_ENUM MYSQL_TYPE_ENUM
# define FIELD_TYPE_SET MYSQL_TYPE_SET
# define FIELD_TYPE_TINY_BLOB MYSQL_TYPE_TINY_BLOB
# define FIELD_TYPE_MEDIUM_BLOB MYSQL_TYPE_MEDIUM_BLOB
# define FIELD_TYPE_LONG_BLOB MYSQL_TYPE_LONG_BLOB
# define FIELD_TYPE_BLOB MYSQL_TYPE_BLOB
# define FIELD_TYPE_VAR_STRING MYSQL_TYPE_VAR_STRING
# define FIELD_TYPE_STRING MYSQL_TYPE_STRING
# define FIELD_TYPE_CHAR MYSQL_TYPE_TINY
# define FIELD_TYPE_INTERVAL MYSQL_TYPE_ENUM
# define FIELD_TYPE_GEOMETRY MYSQL_TYPE_GEOMETRY
# define FIELD_TYPE_BIT MYSQL_TYPE_BIT
# define NOT_NULL_FLAG 1
# define PRI_KEY_FLAG 2
# define UNIQUE_KEY_FLAG 4
# define MULTIPLE_KEY_FLAG 8
# define BLOB_FLAG 16
# define UNSIGNED_FLAG 32
# define ZEROFILL_FLAG 64
# define BINARY_FLAG 128
# define ENUM_FLAG 256
# define AUTO_INCREMENT_FLAG 512
# define TIMESTAMP_FLAG 1024
# define SET_FLAG 2048
# define NO_DEFAULT_VALUE_FLAG 4096
2008-02-12 00:45:15 +08:00
# define ON_UPDATE_NOW_FLAG 8192
2007-07-25 00:13:26 +08:00
# define PART_KEY_FLAG 16384
# define GROUP_FLAG 32768
# define NUM_FLAG 32768
# define IS_PRI_KEY(n) ((n) & PRI_KEY_FLAG)
# define IS_NOT_NULL(n) ((n) & NOT_NULL_FLAG)
# define IS_BLOB(n) ((n) & BLOB_FLAG)
# define IS_NUM(t) ((t) <= FIELD_TYPE_INT24 || (t) == FIELD_TYPE_YEAR || (t) == FIELD_TYPE_NEWDECIMAL)
/* see mysqlnd_charset.c for more information */
# define MYSQLND_BINARY_CHARSET_NR 63
2009-08-28 17:30:16 +08:00
2007-10-02 18:45:27 +08:00
/*
2010-04-15 20:55:04 +08:00
/ - - - - - > CONN_CLOSE < - - - - - - - - - - - - - - - \
| ^ \
| | \
2007-10-02 18:45:27 +08:00
CONN_READY - > CONN_QUERY_SENT - > CONN_FETCHING_DATA
2010-04-15 20:55:04 +08:00
^ |
2007-10-02 18:45:27 +08:00
\ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /
*/
typedef enum mysqlnd_connection_state
{
CONN_ALLOCED = 0 ,
CONN_READY ,
CONN_QUERY_SENT ,
CONN_SENDING_LOAD_DATA ,
CONN_FETCHING_DATA ,
CONN_NEXT_RESULT_PENDING ,
2010-10-05 22:56:49 +08:00
CONN_QUIT_SENT /* object is "destroyed" at this stage */
2007-10-02 18:45:27 +08:00
} enum_mysqlnd_connection_state ;
2009-08-28 17:30:16 +08:00
2007-10-02 18:45:27 +08:00
typedef enum mysqlnd_stmt_state
{
MYSQLND_STMT_INITTED = 0 ,
MYSQLND_STMT_PREPARED ,
MYSQLND_STMT_EXECUTED ,
MYSQLND_STMT_WAITING_USE_OR_STORE ,
MYSQLND_STMT_USE_OR_STORE_CALLED ,
2010-10-05 22:56:49 +08:00
MYSQLND_STMT_USER_FETCHING /* fetch_row_buff or fetch_row_unbuf */
2007-10-02 18:45:27 +08:00
} enum_mysqlnd_stmt_state ;
2009-08-28 17:30:16 +08:00
2007-10-02 18:45:27 +08:00
typedef enum param_bind_flags
{
MYSQLND_PARAM_BIND_BLOB_USED = 1
} enum_param_bind_flags ;
2009-08-28 17:30:16 +08:00
2007-10-02 18:45:27 +08:00
/* PS */
enum mysqlnd_stmt_attr
{
STMT_ATTR_UPDATE_MAX_LENGTH ,
STMT_ATTR_CURSOR_TYPE ,
STMT_ATTR_PREFETCH_ROWS
} ;
2009-08-28 17:30:16 +08:00
2007-10-02 18:45:27 +08:00
enum myslqnd_cursor_type
{
CURSOR_TYPE_NO_CURSOR = 0 ,
CURSOR_TYPE_READ_ONLY = 1 ,
CURSOR_TYPE_FOR_UPDATE = 2 ,
CURSOR_TYPE_SCROLLABLE = 4
} ;
2009-08-28 17:30:16 +08:00
2007-10-02 18:45:27 +08:00
typedef enum mysqlnd_connection_close_type
{
MYSQLND_CLOSE_EXPLICIT = 0 ,
MYSQLND_CLOSE_IMPLICIT ,
MYSQLND_CLOSE_DISCONNECTED ,
MYSQLND_CLOSE_LAST /* for checking, should always be last */
} enum_connection_close_type ;
2009-08-28 17:30:16 +08:00
2007-10-02 18:45:27 +08:00
typedef enum mysqlnd_collected_stats
{
STAT_BYTES_SENT ,
STAT_BYTES_RECEIVED ,
STAT_PACKETS_SENT ,
STAT_PACKETS_RECEIVED ,
STAT_PROTOCOL_OVERHEAD_IN ,
STAT_PROTOCOL_OVERHEAD_OUT ,
2008-09-12 23:06:55 +08:00
STAT_BYTES_RECEIVED_OK ,
STAT_BYTES_RECEIVED_EOF ,
STAT_BYTES_RECEIVED_RSET_HEADER ,
STAT_BYTES_RECEIVED_RSET_FIELD_META ,
STAT_BYTES_RECEIVED_RSET_ROW ,
STAT_BYTES_RECEIVED_PREPARE_RESPONSE ,
STAT_BYTES_RECEIVED_CHANGE_USER ,
STAT_PACKETS_SENT_CMD ,
STAT_PACKETS_RECEIVED_OK ,
STAT_PACKETS_RECEIVED_EOF ,
STAT_PACKETS_RECEIVED_RSET_HEADER ,
STAT_PACKETS_RECEIVED_RSET_FIELD_META ,
STAT_PACKETS_RECEIVED_RSET_ROW ,
STAT_PACKETS_RECEIVED_PREPARE_RESPONSE ,
STAT_PACKETS_RECEIVED_CHANGE_USER ,
2007-10-02 18:45:27 +08:00
STAT_RSET_QUERY ,
STAT_NON_RSET_QUERY ,
STAT_NO_INDEX_USED ,
STAT_BAD_INDEX_USED ,
2008-05-07 23:16:27 +08:00
STAT_QUERY_WAS_SLOW ,
2007-10-02 18:45:27 +08:00
STAT_BUFFERED_SETS ,
STAT_UNBUFFERED_SETS ,
STAT_PS_BUFFERED_SETS ,
STAT_PS_UNBUFFERED_SETS ,
STAT_FLUSHED_NORMAL_SETS ,
STAT_FLUSHED_PS_SETS ,
STAT_PS_PREPARED_NEVER_EXECUTED ,
STAT_PS_PREPARED_ONCE_USED ,
STAT_ROWS_FETCHED_FROM_SERVER_NORMAL ,
STAT_ROWS_FETCHED_FROM_SERVER_PS ,
STAT_ROWS_BUFFERED_FROM_CLIENT_NORMAL ,
STAT_ROWS_BUFFERED_FROM_CLIENT_PS ,
STAT_ROWS_FETCHED_FROM_CLIENT_NORMAL_BUF ,
STAT_ROWS_FETCHED_FROM_CLIENT_NORMAL_UNBUF ,
STAT_ROWS_FETCHED_FROM_CLIENT_PS_BUF ,
STAT_ROWS_FETCHED_FROM_CLIENT_PS_UNBUF ,
STAT_ROWS_FETCHED_FROM_CLIENT_PS_CURSOR ,
2009-10-22 22:30:51 +08:00
STAT_ROWS_AFFECTED_NORMAL ,
STAT_ROWS_AFFECTED_PS ,
2007-10-02 18:45:27 +08:00
STAT_ROWS_SKIPPED_NORMAL ,
STAT_ROWS_SKIPPED_PS ,
STAT_COPY_ON_WRITE_SAVED ,
STAT_COPY_ON_WRITE_PERFORMED ,
STAT_CMD_BUFFER_TOO_SMALL ,
STAT_CONNECT_SUCCESS ,
STAT_CONNECT_FAILURE ,
STAT_CONNECT_REUSED ,
STAT_RECONNECT ,
STAT_PCONNECT_SUCCESS ,
STAT_OPENED_CONNECTIONS ,
STAT_OPENED_PERSISTENT_CONNECTIONS ,
STAT_CLOSE_EXPLICIT ,
STAT_CLOSE_IMPLICIT ,
STAT_CLOSE_DISCONNECT ,
STAT_CLOSE_IN_MIDDLE ,
STAT_FREE_RESULT_EXPLICIT ,
STAT_FREE_RESULT_IMPLICIT ,
STAT_STMT_CLOSE_EXPLICIT ,
STAT_STMT_CLOSE_IMPLICIT ,
STAT_MEM_EMALLOC_COUNT ,
2010-04-01 21:26:41 +08:00
STAT_MEM_EMALLOC_AMOUNT ,
2007-10-02 18:45:27 +08:00
STAT_MEM_ECALLOC_COUNT ,
2010-04-01 21:26:41 +08:00
STAT_MEM_ECALLOC_AMOUNT ,
2007-10-02 18:45:27 +08:00
STAT_MEM_EREALLOC_COUNT ,
2010-04-01 21:26:41 +08:00
STAT_MEM_EREALLOC_AMOUNT ,
2007-10-02 18:45:27 +08:00
STAT_MEM_EFREE_COUNT ,
2010-04-01 21:26:41 +08:00
STAT_MEM_EFREE_AMOUNT ,
2007-10-02 18:45:27 +08:00
STAT_MEM_MALLOC_COUNT ,
2010-04-01 21:26:41 +08:00
STAT_MEM_MALLOC_AMOUNT ,
2007-10-02 18:45:27 +08:00
STAT_MEM_CALLOC_COUNT ,
2010-04-01 21:26:41 +08:00
STAT_MEM_CALLOC_AMOUNT ,
2007-10-02 18:45:27 +08:00
STAT_MEM_REALLOC_COUNT ,
2010-04-01 21:26:41 +08:00
STAT_MEM_REALLOC_AMOUNT ,
2007-10-02 18:45:27 +08:00
STAT_MEM_FREE_COUNT ,
2010-04-01 21:26:41 +08:00
STAT_MEM_FREE_AMOUNT ,
2010-03-30 01:04:16 +08:00
STAT_MEM_ESTRNDUP_COUNT ,
STAT_MEM_STRNDUP_COUNT ,
STAT_MEM_ESTRDUP_COUNT ,
STAT_MEM_STRDUP_COUNT ,
2008-09-12 23:06:55 +08:00
STAT_TEXT_TYPE_FETCHED_NULL ,
STAT_TEXT_TYPE_FETCHED_BIT ,
STAT_TEXT_TYPE_FETCHED_INT8 ,
STAT_TEXT_TYPE_FETCHED_INT16 ,
STAT_TEXT_TYPE_FETCHED_INT24 ,
STAT_TEXT_TYPE_FETCHED_INT32 ,
STAT_TEXT_TYPE_FETCHED_INT64 ,
STAT_TEXT_TYPE_FETCHED_DECIMAL ,
STAT_TEXT_TYPE_FETCHED_FLOAT ,
STAT_TEXT_TYPE_FETCHED_DOUBLE ,
STAT_TEXT_TYPE_FETCHED_DATE ,
STAT_TEXT_TYPE_FETCHED_YEAR ,
STAT_TEXT_TYPE_FETCHED_TIME ,
STAT_TEXT_TYPE_FETCHED_DATETIME ,
STAT_TEXT_TYPE_FETCHED_TIMESTAMP ,
STAT_TEXT_TYPE_FETCHED_STRING ,
STAT_TEXT_TYPE_FETCHED_BLOB ,
STAT_TEXT_TYPE_FETCHED_ENUM ,
STAT_TEXT_TYPE_FETCHED_SET ,
STAT_TEXT_TYPE_FETCHED_GEOMETRY ,
STAT_TEXT_TYPE_FETCHED_OTHER ,
STAT_BINARY_TYPE_FETCHED_NULL ,
STAT_BINARY_TYPE_FETCHED_BIT ,
STAT_BINARY_TYPE_FETCHED_INT8 ,
STAT_BINARY_TYPE_FETCHED_INT16 ,
STAT_BINARY_TYPE_FETCHED_INT24 ,
STAT_BINARY_TYPE_FETCHED_INT32 ,
STAT_BINARY_TYPE_FETCHED_INT64 ,
STAT_BINARY_TYPE_FETCHED_DECIMAL ,
STAT_BINARY_TYPE_FETCHED_FLOAT ,
STAT_BINARY_TYPE_FETCHED_DOUBLE ,
STAT_BINARY_TYPE_FETCHED_DATE ,
STAT_BINARY_TYPE_FETCHED_YEAR ,
STAT_BINARY_TYPE_FETCHED_TIME ,
STAT_BINARY_TYPE_FETCHED_DATETIME ,
STAT_BINARY_TYPE_FETCHED_TIMESTAMP ,
STAT_BINARY_TYPE_FETCHED_STRING ,
STAT_BINARY_TYPE_FETCHED_BLOB ,
STAT_BINARY_TYPE_FETCHED_ENUM ,
STAT_BINARY_TYPE_FETCHED_SET ,
STAT_BINARY_TYPE_FETCHED_GEOMETRY ,
STAT_BINARY_TYPE_FETCHED_OTHER ,
2009-08-27 21:16:39 +08:00
STAT_INIT_COMMAND_EXECUTED_COUNT ,
STAT_INIT_COMMAND_FAILED_COUNT ,
2009-10-16 21:02:01 +08:00
STAT_COM_QUIT ,
STAT_COM_INIT_DB ,
STAT_COM_QUERY ,
STAT_COM_FIELD_LIST ,
STAT_COM_CREATE_DB ,
STAT_COM_DROP_DB ,
STAT_COM_REFRESH ,
STAT_COM_SHUTDOWN ,
STAT_COM_STATISTICS ,
STAT_COM_PROCESS_INFO ,
STAT_COM_CONNECT ,
STAT_COM_PROCESS_KILL ,
STAT_COM_DEBUG ,
STAT_COM_PING ,
STAT_COM_TIME ,
STAT_COM_DELAYED_INSERT ,
STAT_COM_CHANGE_USER ,
STAT_COM_BINLOG_DUMP ,
STAT_COM_TABLE_DUMP ,
STAT_COM_CONNECT_OUT ,
STAT_COM_REGISTER_SLAVE ,
STAT_COM_STMT_PREPARE ,
STAT_COM_STMT_EXECUTE ,
STAT_COM_STMT_SEND_LONG_DATA ,
STAT_COM_STMT_CLOSE ,
STAT_COM_STMT_RESET ,
STAT_COM_SET_OPTION ,
STAT_COM_STMT_FETCH ,
STAT_COM_DAEMON ,
2010-11-06 04:07:34 +08:00
STAT_BYTES_RECEIVED_PURE_DATA_TEXT ,
STAT_BYTES_RECEIVED_PURE_DATA_PS ,
2007-10-02 18:45:27 +08:00
STAT_LAST /* Should be always the last */
} enum_mysqlnd_collected_stats ;
2009-12-11 18:18:00 +08:00
/* Enums */
2010-01-12 04:10:10 +08:00
enum mysqlnd_packet_type
2009-12-11 18:18:00 +08:00
{
PROT_GREET_PACKET = 0 ,
PROT_AUTH_PACKET ,
2011-01-24 20:34:47 +08:00
PROT_AUTH_RESP_PACKET ,
PROT_CHANGE_AUTH_RESP_PACKET ,
2009-12-11 18:18:00 +08:00
PROT_OK_PACKET ,
PROT_EOF_PACKET ,
PROT_CMD_PACKET ,
PROT_RSET_HEADER_PACKET ,
PROT_RSET_FLD_PACKET ,
PROT_ROW_PACKET ,
PROT_STATS_PACKET ,
PROT_PREPARE_RESP_PACKET ,
2010-01-12 04:10:10 +08:00
PROT_CHG_USER_RESP_PACKET ,
2010-10-05 22:56:49 +08:00
PROT_LAST /* should always be last */
2009-12-11 18:18:00 +08:00
} ;
2014-01-28 21:32:59 +08:00
/*
After adding new elements please update
` mysqlnd_command_to_text ` in mysqlnd_wireprotocol . c
*/
2009-12-11 18:18:00 +08:00
enum php_mysqlnd_server_command
{
COM_SLEEP = 0 ,
COM_QUIT ,
COM_INIT_DB ,
COM_QUERY ,
COM_FIELD_LIST ,
COM_CREATE_DB ,
COM_DROP_DB ,
COM_REFRESH ,
COM_SHUTDOWN ,
COM_STATISTICS ,
COM_PROCESS_INFO ,
COM_CONNECT ,
COM_PROCESS_KILL ,
COM_DEBUG ,
COM_PING ,
COM_TIME = 15 ,
COM_DELAYED_INSERT ,
COM_CHANGE_USER ,
COM_BINLOG_DUMP ,
COM_TABLE_DUMP ,
COM_CONNECT_OUT = 20 ,
COM_REGISTER_SLAVE ,
COM_STMT_PREPARE = 22 ,
COM_STMT_EXECUTE = 23 ,
COM_STMT_SEND_LONG_DATA = 24 ,
COM_STMT_CLOSE = 25 ,
COM_STMT_RESET = 26 ,
COM_SET_OPTION = 27 ,
COM_STMT_FETCH = 28 ,
COM_DAEMON ,
2014-01-28 21:23:41 +08:00
COM_BINLOG_DUMP_GTID ,
COM_RESET_CONNECTION ,
2009-12-11 18:18:00 +08:00
COM_END
} ;
2007-10-02 18:45:27 +08:00
# define MYSQLND_DEFAULT_PREFETCH_ROWS (ulong) 1
2010-04-15 20:55:04 +08:00
# define MYSQLND_REFRESH_GRANT 1 /* Refresh grant tables */
# define MYSQLND_REFRESH_LOG 2 /* Start on new log file */
# define MYSQLND_REFRESH_TABLES 4 /* close all tables */
# define MYSQLND_REFRESH_HOSTS 8 /* Flush host cache */
# define MYSQLND_REFRESH_STATUS 16 /* Flush status variables */
# define MYSQLND_REFRESH_THREADS 32 /* Flush thread cache */
# define MYSQLND_REFRESH_SLAVE 64 /* Reset master info and restart slave */
# define MYSQLND_REFRESH_MASTER 128 /* Remove all bin logs in the index */
# define MYSQLND_REFRESH_BACKUP_LOG 0x200000L
2007-10-02 18:45:27 +08:00
2007-07-25 00:13:26 +08:00
# endif /* MYSQLND_ENUM_N_DEF_H */
/*
* Local variables :
* tab - width : 4
* c - basic - offset : 4
* End :
* vim600 : noet sw = 4 ts = 4 fdm = marker
* vim < 600 : noet sw = 4 ts = 4
*/