Back to index

php5  5.3.10
mysqlnd_enum_n_def.h
Go to the documentation of this file.
00001 /*
00002   +----------------------------------------------------------------------+
00003   | PHP Version 5                                                        |
00004   +----------------------------------------------------------------------+
00005   | Copyright (c) 2006-2012 The PHP Group                                |
00006   +----------------------------------------------------------------------+
00007   | This source file is subject to version 3.01 of the PHP license,      |
00008   | that is bundled with this package in the file LICENSE, and is        |
00009   | available through the world-wide-web at the following url:           |
00010   | http://www.php.net/license/3_01.txt                                  |
00011   | If you did not receive a copy of the PHP license and are unable to   |
00012   | obtain it through the world-wide-web, please send a note to          |
00013   | license@php.net so we can mail you a copy immediately.               |
00014   +----------------------------------------------------------------------+
00015   | Authors: Georg Richter <georg@mysql.com>                             |
00016   |          Andrey Hristov <andrey@mysql.com>                           |
00017   |          Ulf Wendel <uwendel@mysql.com>                              |
00018   +----------------------------------------------------------------------+
00019 */
00020 
00021 /* $Id: mysqlnd_enum_n_def.h 321634 2012-01-01 13:15:04Z felipe $ */
00022 #ifndef MYSQLND_ENUM_N_DEF_H
00023 #define MYSQLND_ENUM_N_DEF_H
00024 
00025 #ifndef TRUE
00026 #define TRUE 1
00027 #endif
00028 
00029 #ifndef FALSE
00030 #define FALSE 0
00031 #endif
00032 
00033 
00034 #define MYSQLND_MIN_COMPRESS_LEN 0
00035 
00036 #define MYSQLND_MAX_PACKET_SIZE (256L*256L*256L-1)
00037 
00038 #define MYSQLND_ERRMSG_SIZE               512
00039 #define MYSQLND_SQLSTATE_LENGTH           5
00040 #define MYSQLND_SQLSTATE_NULL             "00000"
00041 
00042 #define MYSQLND_MAX_ALLOWED_USER_LEN      256           /* 64 char * 4byte . MySQL supports now only 16 char, but let it be forward compatible */
00043 #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. */
00044 
00045 #define MYSQLND_NET_CMD_BUFFER_MIN_SIZE                 4096
00046 #define MYSQLND_NET_CMD_BUFFER_MIN_SIZE_STR             "4096"
00047 
00048 #define SERVER_STATUS_IN_TRANS                                 1      /* Transaction has started */
00049 #define SERVER_STATUS_AUTOCOMMIT                        2      /* Server in auto_commit mode */
00050 #define SERVER_MORE_RESULTS_EXISTS                      8      /* Multi query - next query exists */
00051 #define SERVER_QUERY_NO_GOOD_INDEX_USED   16
00052 #define SERVER_QUERY_NO_INDEX_USED        32
00053 /*
00054   The server was able to fulfill the clients request and opened a
00055   read-only non-scrollable cursor for a query. This flag comes
00056   in reply to COM_STMT_EXECUTE and COM_STMT_FETCH commands.
00057 */
00058 #define SERVER_STATUS_CURSOR_EXISTS                            64
00059 /*
00060   This flag is sent when a read-only cursor is exhausted, in reply to
00061   COM_STMT_FETCH command.
00062 */
00063 #define SERVER_STATUS_LAST_ROW_SENT                            128
00064 #define SERVER_STATUS_DB_DROPPED                        256 /* A database was dropped */
00065 #define SERVER_STATUS_NO_BACKSLASH_ESCAPES              512
00066 #define SERVER_QUERY_WAS_SLOW                                  2048
00067 #define SERVER_PS_OUT_PARAMS                     4096
00068 
00069 #define MYSQLND_NO_DATA                   100
00070 #define MYSQLND_DATA_TRUNCATED     101
00071 
00072 #define SHA1_MAX_LENGTH 20
00073 #define SCRAMBLE_LENGTH 20
00074 #define SCRAMBLE_LENGTH_323 8
00075 
00076 #define CLIENT_LONG_PASSWORD              1             /* new more secure passwords */
00077 #define CLIENT_FOUND_ROWS                 2             /* Found instead of affected rows */
00078 #define CLIENT_LONG_FLAG                  4             /* Get all column flags */
00079 #define CLIENT_CONNECT_WITH_DB            8             /* One can specify db on connect */
00080 #define CLIENT_NO_SCHEMA                  16            /* Don't allow database.table.column */
00081 #define CLIENT_COMPRESS                          32            /* Can use compression protocol */
00082 #define CLIENT_ODBC                              64            /* Odbc client */
00083 #define CLIENT_LOCAL_FILES                128           /* Can use LOAD DATA LOCAL */
00084 #define CLIENT_IGNORE_SPACE               256           /* Ignore spaces before '(' */
00085 #define CLIENT_PROTOCOL_41                512           /* New 4.1 protocol */
00086 #define CLIENT_INTERACTIVE                1024   /* This is an interactive client */
00087 #define CLIENT_SSL                               2048   /* Switch to SSL after handshake */
00088 #define CLIENT_IGNORE_SIGPIPE             4096   /* IGNORE sigpipes */
00089 #define CLIENT_TRANSACTIONS               8192   /* Client knows about transactions */
00090 #define CLIENT_RESERVED                          16384  /* Old flag for 4.1 protocol */
00091 #define CLIENT_SECURE_CONNECTION   32768  /* New 4.1 authentication */
00092 #define CLIENT_MULTI_STATEMENTS           (1UL << 16) /* Enable/disable multi-stmt support */
00093 #define CLIENT_MULTI_RESULTS              (1UL << 17) /* Enable/disable multi-results */
00094 #define CLIENT_PS_MULTI_RESULTS           (1UL << 18) /* Multi-results in PS-protocol */
00095 #define CLIENT_PLUGIN_AUTH                (1UL << 19) /* Client supports plugin authentication */
00096 
00097 #define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30)
00098 
00099 
00100 #define MYSQLND_NET_FLAG_USE_COMPRESSION 1
00101 
00102 typedef enum mysqlnd_extension
00103 {
00104        MYSQLND_MYSQL = 0,
00105        MYSQLND_MYSQLI
00106 } enum_mysqlnd_extension;
00107 
00108 enum
00109 {
00110        MYSQLND_FETCH_ASSOC = 1,
00111        MYSQLND_FETCH_NUM = 2,
00112        MYSQLND_FETCH_BOTH = 1|2
00113 };
00114 
00115 /* Follow libmysql convention */
00116 typedef enum func_status
00117 {
00118        PASS = 0,
00119        FAIL = 1
00120 } enum_func_status;
00121 
00122 typedef enum mysqlnd_query_type
00123 {
00124        QUERY_UPSERT,
00125        QUERY_SELECT,
00126        QUERY_LOAD_LOCAL
00127 } enum_mysqlnd_query_type;
00128 
00129 typedef enum mysqlnd_res_type
00130 {
00131        MYSQLND_RES_NORMAL = 1,
00132        MYSQLND_RES_PS_BUF,
00133        MYSQLND_RES_PS_UNBUF
00134 } enum_mysqlnd_res_type;
00135 
00136 typedef enum mysqlnd_option
00137 {
00138        MYSQL_OPT_CONNECT_TIMEOUT,
00139        MYSQL_OPT_COMPRESS,
00140        MYSQL_OPT_NAMED_PIPE,
00141        MYSQL_INIT_COMMAND,
00142        MYSQL_READ_DEFAULT_FILE,
00143        MYSQL_READ_DEFAULT_GROUP,
00144        MYSQL_SET_CHARSET_DIR,
00145        MYSQL_SET_CHARSET_NAME,
00146        MYSQL_OPT_LOCAL_INFILE,
00147        MYSQL_OPT_PROTOCOL,
00148        MYSQL_SHARED_MEMORY_BASE_NAME,
00149        MYSQL_OPT_READ_TIMEOUT,
00150        MYSQL_OPT_WRITE_TIMEOUT,
00151        MYSQL_OPT_USE_RESULT,
00152        MYSQL_OPT_USE_REMOTE_CONNECTION,
00153        MYSQL_OPT_USE_EMBEDDED_CONNECTION,
00154        MYSQL_OPT_GUESS_CONNECTION,
00155        MYSQL_SET_CLIENT_IP,
00156        MYSQL_SECURE_AUTH,
00157        MYSQL_REPORT_DATA_TRUNCATION,
00158        MYSQL_OPT_RECONNECT,
00159        MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
00160        MYSQL_PLUGIN_DIR,
00161        MYSQL_DEFAULT_AUTH,
00162 #if MYSQLND_UNICODE
00163        MYSQLND_OPT_NUMERIC_AND_DATETIME_AS_UNICODE = 200,
00164 #endif
00165 #ifdef MYSQLND_STRING_TO_INT_CONVERSION
00166        MYSQLND_OPT_INT_AND_FLOAT_NATIVE = 201,
00167 #endif
00168        MYSQLND_OPT_NET_CMD_BUFFER_SIZE = 202,
00169        MYSQLND_OPT_NET_READ_BUFFER_SIZE = 203,
00170        MYSQLND_OPT_SSL_KEY = 204,
00171        MYSQLND_OPT_SSL_CERT = 205,
00172        MYSQLND_OPT_SSL_CA = 206,
00173        MYSQLND_OPT_SSL_CAPATH = 207,
00174        MYSQLND_OPT_SSL_CIPHER = 208,
00175        MYSQLND_OPT_SSL_PASSPHRASE = 209
00176 } enum_mysqlnd_option;
00177 
00178 typedef enum mysqlnd_protocol_type
00179 {
00180        MYSQL_PROTOCOL_DEFAULT = 0,
00181        MYSQL_PROTOCOL_TCP,         /* all, supported */
00182        MYSQL_PROTOCOL_SOCKET,      /* unix, supported */
00183        MYSQL_PROTOCOL_PIPE, /* win32, not-supported */
00184        MYSQL_PROTOCOL_MEMORY,      /* win32, not-supported */
00185        MYSQL_PROTOCOL_LAST
00186 } enum_mysqlnd_protocol_type;
00187 
00188 typedef enum mysqlnd_field_types
00189 {
00190        MYSQL_TYPE_DECIMAL,
00191        MYSQL_TYPE_TINY,
00192        MYSQL_TYPE_SHORT,
00193        MYSQL_TYPE_LONG,
00194        MYSQL_TYPE_FLOAT,
00195        MYSQL_TYPE_DOUBLE,
00196        MYSQL_TYPE_NULL,
00197        MYSQL_TYPE_TIMESTAMP,
00198        MYSQL_TYPE_LONGLONG,
00199        MYSQL_TYPE_INT24,
00200        MYSQL_TYPE_DATE,
00201        MYSQL_TYPE_TIME,
00202        MYSQL_TYPE_DATETIME,
00203        MYSQL_TYPE_YEAR,
00204        MYSQL_TYPE_NEWDATE,
00205        MYSQL_TYPE_VARCHAR,
00206        MYSQL_TYPE_BIT,
00207        MYSQL_TYPE_NEWDECIMAL=246,
00208        MYSQL_TYPE_ENUM=247,
00209        MYSQL_TYPE_SET=248,
00210        MYSQL_TYPE_TINY_BLOB=249,
00211        MYSQL_TYPE_MEDIUM_BLOB=250,
00212        MYSQL_TYPE_LONG_BLOB=251,
00213        MYSQL_TYPE_BLOB=252,
00214        MYSQL_TYPE_VAR_STRING=253,
00215        MYSQL_TYPE_STRING=254,
00216        MYSQL_TYPE_GEOMETRY=255
00217 } enum_mysqlnd_field_types;
00218 
00219 /* Please update this if there is a new type after MYSQL_TYPE_GEOMETRY */
00220 #define MYSQL_TYPE_LAST            MYSQL_TYPE_GEOMETRY
00221 
00222 
00223 typedef enum mysqlnd_server_option
00224 {
00225        MYSQL_OPTION_MULTI_STATEMENTS_ON,
00226        MYSQL_OPTION_MULTI_STATEMENTS_OFF
00227 } enum_mysqlnd_server_option;
00228 
00229 
00230 #define FIELD_TYPE_DECIMAL         MYSQL_TYPE_DECIMAL
00231 #define FIELD_TYPE_NEWDECIMAL      MYSQL_TYPE_NEWDECIMAL
00232 #define FIELD_TYPE_TINY                   MYSQL_TYPE_TINY
00233 #define FIELD_TYPE_SHORT           MYSQL_TYPE_SHORT
00234 #define FIELD_TYPE_LONG                   MYSQL_TYPE_LONG
00235 #define FIELD_TYPE_FLOAT           MYSQL_TYPE_FLOAT
00236 #define FIELD_TYPE_DOUBLE          MYSQL_TYPE_DOUBLE
00237 #define FIELD_TYPE_NULL                   MYSQL_TYPE_NULL
00238 #define FIELD_TYPE_TIMESTAMP       MYSQL_TYPE_TIMESTAMP
00239 #define FIELD_TYPE_LONGLONG        MYSQL_TYPE_LONGLONG
00240 #define FIELD_TYPE_INT24           MYSQL_TYPE_INT24
00241 #define FIELD_TYPE_DATE                   MYSQL_TYPE_DATE
00242 #define FIELD_TYPE_TIME                   MYSQL_TYPE_TIME
00243 #define FIELD_TYPE_DATETIME        MYSQL_TYPE_DATETIME
00244 #define FIELD_TYPE_YEAR                   MYSQL_TYPE_YEAR
00245 #define FIELD_TYPE_NEWDATE         MYSQL_TYPE_NEWDATE
00246 #define FIELD_TYPE_ENUM                   MYSQL_TYPE_ENUM
00247 #define FIELD_TYPE_SET                    MYSQL_TYPE_SET
00248 #define FIELD_TYPE_TINY_BLOB       MYSQL_TYPE_TINY_BLOB
00249 #define FIELD_TYPE_MEDIUM_BLOB     MYSQL_TYPE_MEDIUM_BLOB
00250 #define FIELD_TYPE_LONG_BLOB       MYSQL_TYPE_LONG_BLOB
00251 #define FIELD_TYPE_BLOB                   MYSQL_TYPE_BLOB
00252 #define FIELD_TYPE_VAR_STRING      MYSQL_TYPE_VAR_STRING
00253 #define FIELD_TYPE_STRING          MYSQL_TYPE_STRING
00254 #define FIELD_TYPE_CHAR                   MYSQL_TYPE_TINY
00255 #define FIELD_TYPE_INTERVAL        MYSQL_TYPE_ENUM
00256 #define FIELD_TYPE_GEOMETRY        MYSQL_TYPE_GEOMETRY
00257 #define FIELD_TYPE_BIT                    MYSQL_TYPE_BIT
00258 
00259 #define NOT_NULL_FLAG                         1
00260 #define PRI_KEY_FLAG                   2
00261 #define UNIQUE_KEY_FLAG                       4
00262 #define MULTIPLE_KEY_FLAG              8
00263 #define BLOB_FLAG                            16
00264 #define UNSIGNED_FLAG                        32
00265 #define ZEROFILL_FLAG                        64
00266 #define BINARY_FLAG                         128
00267 #define ENUM_FLAG                           256
00268 #define AUTO_INCREMENT_FLAG          512
00269 #define TIMESTAMP_FLAG                     1024
00270 #define SET_FLAG                           2048
00271 #define NO_DEFAULT_VALUE_FLAG       4096
00272 #define ON_UPDATE_NOW_FLAG          8192
00273 #define PART_KEY_FLAG                     16384
00274 #define GROUP_FLAG                        32768
00275 #define NUM_FLAG                          32768
00276 
00277 #define IS_PRI_KEY(n)       ((n) & PRI_KEY_FLAG)
00278 #define IS_NOT_NULL(n)      ((n) & NOT_NULL_FLAG)
00279 #define IS_BLOB(n)          ((n) & BLOB_FLAG)
00280 #define IS_NUM(t)           ((t) <= FIELD_TYPE_INT24 || (t) == FIELD_TYPE_YEAR || (t) == FIELD_TYPE_NEWDECIMAL)
00281 
00282 
00283 /* see mysqlnd_charset.c for more information */
00284 #define MYSQLND_BINARY_CHARSET_NR  63
00285 
00286 
00287 /*
00288               /-----> CONN_CLOSE  <---------------\
00289               |           ^                         \
00290               |           |                         \
00291        CONN_READY -> CONN_QUERY_SENT -> CONN_FETCHING_DATA
00292               ^                                      |
00293               \-------------------------------------/
00294 */
00295 typedef enum mysqlnd_connection_state
00296 {
00297        CONN_ALLOCED = 0,
00298        CONN_READY,
00299        CONN_QUERY_SENT,
00300        CONN_SENDING_LOAD_DATA,
00301        CONN_FETCHING_DATA,
00302        CONN_NEXT_RESULT_PENDING,
00303        CONN_QUIT_SENT /* object is "destroyed" at this stage */
00304 } enum_mysqlnd_connection_state;
00305 
00306 
00307 typedef enum mysqlnd_stmt_state
00308 {
00309        MYSQLND_STMT_INITTED = 0,
00310        MYSQLND_STMT_PREPARED,
00311        MYSQLND_STMT_EXECUTED,
00312        MYSQLND_STMT_WAITING_USE_OR_STORE,
00313        MYSQLND_STMT_USE_OR_STORE_CALLED,
00314        MYSQLND_STMT_USER_FETCHING /* fetch_row_buff or fetch_row_unbuf */
00315 } enum_mysqlnd_stmt_state;
00316 
00317 
00318 typedef enum param_bind_flags
00319 {
00320        MYSQLND_PARAM_BIND_BLOB_USED = 1
00321 } enum_param_bind_flags;
00322 
00323 
00324 /* PS */
00325 enum mysqlnd_stmt_attr
00326 {
00327        STMT_ATTR_UPDATE_MAX_LENGTH,
00328        STMT_ATTR_CURSOR_TYPE,
00329        STMT_ATTR_PREFETCH_ROWS
00330 };
00331 
00332 enum myslqnd_cursor_type
00333 {
00334        CURSOR_TYPE_NO_CURSOR= 0,
00335        CURSOR_TYPE_READ_ONLY= 1,
00336        CURSOR_TYPE_FOR_UPDATE= 2,
00337        CURSOR_TYPE_SCROLLABLE= 4
00338 };
00339 
00340 typedef enum mysqlnd_connection_close_type
00341 {
00342        MYSQLND_CLOSE_EXPLICIT = 0,
00343        MYSQLND_CLOSE_IMPLICIT,
00344        MYSQLND_CLOSE_DISCONNECTED,
00345        MYSQLND_CLOSE_LAST   /* for checking, should always be last */
00346 } enum_connection_close_type;
00347 
00348 
00349 typedef enum mysqlnd_collected_stats
00350 {
00351        STAT_BYTES_SENT,
00352        STAT_BYTES_RECEIVED,
00353        STAT_PACKETS_SENT,
00354        STAT_PACKETS_RECEIVED,
00355        STAT_PROTOCOL_OVERHEAD_IN,
00356        STAT_PROTOCOL_OVERHEAD_OUT,
00357        STAT_BYTES_RECEIVED_OK,
00358        STAT_BYTES_RECEIVED_EOF,
00359        STAT_BYTES_RECEIVED_RSET_HEADER,
00360        STAT_BYTES_RECEIVED_RSET_FIELD_META,
00361        STAT_BYTES_RECEIVED_RSET_ROW,
00362        STAT_BYTES_RECEIVED_PREPARE_RESPONSE,
00363        STAT_BYTES_RECEIVED_CHANGE_USER,
00364        STAT_PACKETS_SENT_CMD,
00365        STAT_PACKETS_RECEIVED_OK,
00366        STAT_PACKETS_RECEIVED_EOF,
00367        STAT_PACKETS_RECEIVED_RSET_HEADER,
00368        STAT_PACKETS_RECEIVED_RSET_FIELD_META,
00369        STAT_PACKETS_RECEIVED_RSET_ROW,
00370        STAT_PACKETS_RECEIVED_PREPARE_RESPONSE,
00371        STAT_PACKETS_RECEIVED_CHANGE_USER,
00372        STAT_RSET_QUERY,
00373        STAT_NON_RSET_QUERY,
00374        STAT_NO_INDEX_USED,
00375        STAT_BAD_INDEX_USED,
00376        STAT_QUERY_WAS_SLOW,
00377        STAT_BUFFERED_SETS,
00378        STAT_UNBUFFERED_SETS,
00379        STAT_PS_BUFFERED_SETS,
00380        STAT_PS_UNBUFFERED_SETS,
00381        STAT_FLUSHED_NORMAL_SETS,
00382        STAT_FLUSHED_PS_SETS,
00383        STAT_PS_PREPARED_NEVER_EXECUTED,
00384        STAT_PS_PREPARED_ONCE_USED,
00385        STAT_ROWS_FETCHED_FROM_SERVER_NORMAL,
00386        STAT_ROWS_FETCHED_FROM_SERVER_PS,
00387        STAT_ROWS_BUFFERED_FROM_CLIENT_NORMAL,
00388        STAT_ROWS_BUFFERED_FROM_CLIENT_PS,
00389        STAT_ROWS_FETCHED_FROM_CLIENT_NORMAL_BUF,
00390        STAT_ROWS_FETCHED_FROM_CLIENT_NORMAL_UNBUF,
00391        STAT_ROWS_FETCHED_FROM_CLIENT_PS_BUF,
00392        STAT_ROWS_FETCHED_FROM_CLIENT_PS_UNBUF,
00393        STAT_ROWS_FETCHED_FROM_CLIENT_PS_CURSOR,
00394        STAT_ROWS_AFFECTED_NORMAL,
00395        STAT_ROWS_AFFECTED_PS,
00396        STAT_ROWS_SKIPPED_NORMAL,
00397        STAT_ROWS_SKIPPED_PS,
00398        STAT_COPY_ON_WRITE_SAVED,
00399        STAT_COPY_ON_WRITE_PERFORMED,
00400        STAT_CMD_BUFFER_TOO_SMALL,
00401        STAT_CONNECT_SUCCESS,
00402        STAT_CONNECT_FAILURE,
00403        STAT_CONNECT_REUSED,
00404        STAT_RECONNECT,
00405        STAT_PCONNECT_SUCCESS,
00406        STAT_OPENED_CONNECTIONS,
00407        STAT_OPENED_PERSISTENT_CONNECTIONS,
00408        STAT_CLOSE_EXPLICIT,
00409        STAT_CLOSE_IMPLICIT,
00410        STAT_CLOSE_DISCONNECT,
00411        STAT_CLOSE_IN_MIDDLE,
00412        STAT_FREE_RESULT_EXPLICIT,
00413        STAT_FREE_RESULT_IMPLICIT,
00414        STAT_STMT_CLOSE_EXPLICIT,
00415        STAT_STMT_CLOSE_IMPLICIT,
00416        STAT_MEM_EMALLOC_COUNT,
00417        STAT_MEM_EMALLOC_AMOUNT,
00418        STAT_MEM_ECALLOC_COUNT,
00419        STAT_MEM_ECALLOC_AMOUNT,
00420        STAT_MEM_EREALLOC_COUNT,
00421        STAT_MEM_EREALLOC_AMOUNT,
00422        STAT_MEM_EFREE_COUNT,
00423        STAT_MEM_EFREE_AMOUNT,
00424        STAT_MEM_MALLOC_COUNT,
00425        STAT_MEM_MALLOC_AMOUNT,
00426        STAT_MEM_CALLOC_COUNT,
00427        STAT_MEM_CALLOC_AMOUNT,
00428        STAT_MEM_REALLOC_COUNT,
00429        STAT_MEM_REALLOC_AMOUNT,
00430        STAT_MEM_FREE_COUNT,
00431        STAT_MEM_FREE_AMOUNT,
00432        STAT_MEM_ESTRNDUP_COUNT,
00433        STAT_MEM_STRNDUP_COUNT,
00434        STAT_MEM_ESTRDUP_COUNT,
00435        STAT_MEM_STRDUP_COUNT,
00436        STAT_TEXT_TYPE_FETCHED_NULL,
00437        STAT_TEXT_TYPE_FETCHED_BIT,
00438        STAT_TEXT_TYPE_FETCHED_INT8,
00439        STAT_TEXT_TYPE_FETCHED_INT16,
00440        STAT_TEXT_TYPE_FETCHED_INT24,
00441        STAT_TEXT_TYPE_FETCHED_INT32,
00442        STAT_TEXT_TYPE_FETCHED_INT64,
00443        STAT_TEXT_TYPE_FETCHED_DECIMAL,
00444        STAT_TEXT_TYPE_FETCHED_FLOAT,
00445        STAT_TEXT_TYPE_FETCHED_DOUBLE,
00446        STAT_TEXT_TYPE_FETCHED_DATE,
00447        STAT_TEXT_TYPE_FETCHED_YEAR,
00448        STAT_TEXT_TYPE_FETCHED_TIME,
00449        STAT_TEXT_TYPE_FETCHED_DATETIME,
00450        STAT_TEXT_TYPE_FETCHED_TIMESTAMP,
00451        STAT_TEXT_TYPE_FETCHED_STRING,
00452        STAT_TEXT_TYPE_FETCHED_BLOB,
00453        STAT_TEXT_TYPE_FETCHED_ENUM,
00454        STAT_TEXT_TYPE_FETCHED_SET,
00455        STAT_TEXT_TYPE_FETCHED_GEOMETRY,
00456        STAT_TEXT_TYPE_FETCHED_OTHER,
00457        STAT_BINARY_TYPE_FETCHED_NULL,
00458        STAT_BINARY_TYPE_FETCHED_BIT,
00459        STAT_BINARY_TYPE_FETCHED_INT8,
00460        STAT_BINARY_TYPE_FETCHED_INT16,
00461        STAT_BINARY_TYPE_FETCHED_INT24,
00462        STAT_BINARY_TYPE_FETCHED_INT32,
00463        STAT_BINARY_TYPE_FETCHED_INT64,
00464        STAT_BINARY_TYPE_FETCHED_DECIMAL,
00465        STAT_BINARY_TYPE_FETCHED_FLOAT,
00466        STAT_BINARY_TYPE_FETCHED_DOUBLE,
00467        STAT_BINARY_TYPE_FETCHED_DATE,
00468        STAT_BINARY_TYPE_FETCHED_YEAR,
00469        STAT_BINARY_TYPE_FETCHED_TIME,
00470        STAT_BINARY_TYPE_FETCHED_DATETIME,
00471        STAT_BINARY_TYPE_FETCHED_TIMESTAMP,
00472        STAT_BINARY_TYPE_FETCHED_STRING,
00473        STAT_BINARY_TYPE_FETCHED_BLOB,
00474        STAT_BINARY_TYPE_FETCHED_ENUM,
00475        STAT_BINARY_TYPE_FETCHED_SET,
00476        STAT_BINARY_TYPE_FETCHED_GEOMETRY,
00477        STAT_BINARY_TYPE_FETCHED_OTHER,
00478        STAT_INIT_COMMAND_EXECUTED_COUNT,
00479        STAT_INIT_COMMAND_FAILED_COUNT,
00480        STAT_COM_QUIT,
00481        STAT_COM_INIT_DB,
00482        STAT_COM_QUERY,
00483        STAT_COM_FIELD_LIST,
00484        STAT_COM_CREATE_DB,
00485        STAT_COM_DROP_DB,
00486        STAT_COM_REFRESH,
00487        STAT_COM_SHUTDOWN,
00488        STAT_COM_STATISTICS,
00489        STAT_COM_PROCESS_INFO,
00490        STAT_COM_CONNECT,
00491        STAT_COM_PROCESS_KILL,
00492        STAT_COM_DEBUG,
00493        STAT_COM_PING,
00494        STAT_COM_TIME,
00495        STAT_COM_DELAYED_INSERT,
00496        STAT_COM_CHANGE_USER,
00497        STAT_COM_BINLOG_DUMP,
00498        STAT_COM_TABLE_DUMP,
00499        STAT_COM_CONNECT_OUT,
00500        STAT_COM_REGISTER_SLAVE,
00501        STAT_COM_STMT_PREPARE,
00502        STAT_COM_STMT_EXECUTE,
00503        STAT_COM_STMT_SEND_LONG_DATA,
00504        STAT_COM_STMT_CLOSE,
00505        STAT_COM_STMT_RESET,
00506        STAT_COM_SET_OPTION,
00507        STAT_COM_STMT_FETCH,
00508        STAT_COM_DAEMON,
00509        STAT_BYTES_RECEIVED_PURE_DATA_TEXT,
00510        STAT_BYTES_RECEIVED_PURE_DATA_PS,
00511        STAT_LAST /* Should be always the last */
00512 } enum_mysqlnd_collected_stats;
00513 
00514 
00515 /* Enums */
00516 enum mysqlnd_packet_type
00517 {
00518        PROT_GREET_PACKET= 0,
00519        PROT_AUTH_PACKET,
00520        PROT_OK_PACKET,
00521        PROT_EOF_PACKET,
00522        PROT_CMD_PACKET,
00523        PROT_RSET_HEADER_PACKET,
00524        PROT_RSET_FLD_PACKET,
00525        PROT_ROW_PACKET,
00526        PROT_STATS_PACKET,
00527        PROT_PREPARE_RESP_PACKET,
00528        PROT_CHG_USER_RESP_PACKET,
00529        PROT_LAST /* should always be last */
00530 };
00531 
00532 
00533 enum php_mysqlnd_server_command
00534 {
00535        COM_SLEEP = 0,
00536        COM_QUIT,
00537        COM_INIT_DB,
00538        COM_QUERY,
00539        COM_FIELD_LIST,
00540        COM_CREATE_DB,
00541        COM_DROP_DB,
00542        COM_REFRESH,
00543        COM_SHUTDOWN,
00544        COM_STATISTICS,
00545        COM_PROCESS_INFO,
00546        COM_CONNECT,
00547        COM_PROCESS_KILL,
00548        COM_DEBUG,
00549        COM_PING,
00550        COM_TIME = 15,
00551        COM_DELAYED_INSERT,
00552        COM_CHANGE_USER,
00553        COM_BINLOG_DUMP,
00554        COM_TABLE_DUMP,
00555        COM_CONNECT_OUT = 20,
00556        COM_REGISTER_SLAVE,
00557        COM_STMT_PREPARE = 22,
00558        COM_STMT_EXECUTE = 23,
00559        COM_STMT_SEND_LONG_DATA = 24,
00560        COM_STMT_CLOSE = 25,
00561        COM_STMT_RESET = 26,
00562        COM_SET_OPTION = 27,
00563        COM_STMT_FETCH = 28,
00564        COM_DAEMON,
00565        COM_END
00566 };
00567 
00568 
00569 #define MYSQLND_DEFAULT_PREFETCH_ROWS (ulong) 1
00570 
00571 #define MYSQLND_REFRESH_GRANT             1      /* Refresh grant tables */
00572 #define MYSQLND_REFRESH_LOG               2      /* Start on new log file */
00573 #define MYSQLND_REFRESH_TABLES            4      /* close all tables */
00574 #define MYSQLND_REFRESH_HOSTS             8      /* Flush host cache */
00575 #define MYSQLND_REFRESH_STATUS            16     /* Flush status variables */
00576 #define MYSQLND_REFRESH_THREADS           32     /* Flush thread cache */
00577 #define MYSQLND_REFRESH_SLAVE             64     /* Reset master info and restart slave */
00578 #define MYSQLND_REFRESH_MASTER            128    /* Remove all bin logs in the index */
00579 #define MYSQLND_REFRESH_BACKUP_LOG 0x200000L
00580 
00581 #endif /* MYSQLND_ENUM_N_DEF_H */
00582 
00583 
00584 /*
00585  * Local variables:
00586  * tab-width: 4
00587  * c-basic-offset: 4
00588  * End:
00589  * vim600: noet sw=4 ts=4 fdm=marker
00590  * vim<600: noet sw=4 ts=4
00591  */