1 /* 2 +----------------------------------------------------------------------+ 3 | PHP Version 5 | 4 +----------------------------------------------------------------------+ 5 | Copyright (c) 2006-2013 The PHP Group | 6 +----------------------------------------------------------------------+ 7 | This source file is subject to version 3.01 of the PHP license, | 8 | that is bundled with this package in the file LICENSE, and is | 9 | available through the world-wide-web at the following url: | 10 | http://www.php.net/license/3_01.txt | 11 | If you did not receive a copy of the PHP license and are unable to | 12 | obtain it through the world-wide-web, please send a note to | 13 | license@php.net so we can mail you a copy immediately. | 14 +----------------------------------------------------------------------+ 15 | Authors: Georg Richter <georg@mysql.com> | 16 | Andrey Hristov <andrey@mysql.com> | 17 | Ulf Wendel <uwendel@mysql.com> | 18 +----------------------------------------------------------------------+ 19 */ 20 21 /* $Id$ */ 22 #ifndef MYSQLND_ENUM_N_DEF_H 23 #define MYSQLND_ENUM_N_DEF_H 24 25 #ifndef TRUE 26 #define TRUE 1 27 #endif 28 29 #ifndef FALSE 30 #define FALSE 0 31 #endif 32 33 34 #define MYSQLND_MIN_COMPRESS_LEN 0 35 36 #define MYSQLND_MAX_PACKET_SIZE (256L*256L*256L-1) 37 38 #define MYSQLND_ERRMSG_SIZE 512 39 #define MYSQLND_SQLSTATE_LENGTH 5 40 #define MYSQLND_SQLSTATE_NULL "00000" 41 42 #define MYSQLND_MAX_ALLOWED_USER_LEN 252 /* 63 char * 4byte . MySQL supports now only 16 char, but let it be forward compatible */ 43 #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. */ 44 45 #define MYSQLND_NET_CMD_BUFFER_MIN_SIZE 4096 46 #define MYSQLND_NET_CMD_BUFFER_MIN_SIZE_STR "4096" 47 48 #define SERVER_STATUS_IN_TRANS 1 /* Transaction has started */ 49 #define SERVER_STATUS_AUTOCOMMIT 2 /* Server in auto_commit mode */ 50 #define SERVER_MORE_RESULTS_EXISTS 8 /* Multi query - next query exists */ 51 #define SERVER_QUERY_NO_GOOD_INDEX_USED 16 52 #define SERVER_QUERY_NO_INDEX_USED 32 53 /* 54 The server was able to fulfill the clients request and opened a 55 read-only non-scrollable cursor for a query. This flag comes 56 in reply to COM_STMT_EXECUTE and COM_STMT_FETCH commands. 57 */ 58 #define SERVER_STATUS_CURSOR_EXISTS 64 59 /* 60 This flag is sent when a read-only cursor is exhausted, in reply to 61 COM_STMT_FETCH command. 62 */ 63 #define SERVER_STATUS_LAST_ROW_SENT 128 64 #define SERVER_STATUS_DB_DROPPED 256 /* A database was dropped */ 65 #define SERVER_STATUS_NO_BACKSLASH_ESCAPES 512 66 #define SERVER_QUERY_WAS_SLOW 2048 67 #define SERVER_PS_OUT_PARAMS 4096 68 69 #define MYSQLND_NO_DATA 100 70 #define MYSQLND_DATA_TRUNCATED 101 71 72 #define SHA1_MAX_LENGTH 20 73 #define SCRAMBLE_LENGTH 20 74 #define SCRAMBLE_LENGTH_323 8 75 76 #define CLIENT_LONG_PASSWORD 1 /* new more secure passwords */ 77 #define CLIENT_FOUND_ROWS 2 /* Found instead of affected rows */ 78 #define CLIENT_LONG_FLAG 4 /* Get all column flags */ 79 #define CLIENT_CONNECT_WITH_DB 8 /* One can specify db on connect */ 80 #define CLIENT_NO_SCHEMA 16 /* Don't allow database.table.column */ 81 #define CLIENT_COMPRESS 32 /* Can use compression protocol */ 82 #define CLIENT_ODBC 64 /* Odbc client */ 83 #define CLIENT_LOCAL_FILES 128 /* Can use LOAD DATA LOCAL */ 84 #define CLIENT_IGNORE_SPACE 256 /* Ignore spaces before '(' */ 85 #define CLIENT_PROTOCOL_41 512 /* New 4.1 protocol */ 86 #define CLIENT_INTERACTIVE 1024 /* This is an interactive client */ 87 #define CLIENT_SSL 2048 /* Switch to SSL after handshake */ 88 #define CLIENT_IGNORE_SIGPIPE 4096 /* IGNORE sigpipes */ 89 #define CLIENT_TRANSACTIONS 8192 /* Client knows about transactions */ 90 #define CLIENT_RESERVED 16384 /* Old flag for 4.1 protocol */ 91 #define CLIENT_SECURE_CONNECTION 32768 /* New 4.1 authentication */ 92 #define CLIENT_MULTI_STATEMENTS (1UL << 16) /* Enable/disable multi-stmt support */ 93 #define CLIENT_MULTI_RESULTS (1UL << 17) /* Enable/disable multi-results */ 94 #define CLIENT_PS_MULTI_RESULTS (1UL << 18) /* Multi-results in PS-protocol */ 95 #define CLIENT_PLUGIN_AUTH (1UL << 19) /* Client supports plugin authentication */ 96 97 #define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30) 98 99 100 #define MYSQLND_NET_FLAG_USE_COMPRESSION 1 101 102 typedef enum mysqlnd_extension 103 { 104 MYSQLND_MYSQL = 0, 105 MYSQLND_MYSQLI 106 } enum_mysqlnd_extension; 107 108 enum 109 { 110 MYSQLND_FETCH_ASSOC = 1, 111 MYSQLND_FETCH_NUM = 2, 112 MYSQLND_FETCH_BOTH = 1|2 113 }; 114 115 /* Follow libmysql convention */ 116 typedef enum func_status 117 { 118 PASS = 0, 119 FAIL = 1 120 } enum_func_status; 121 122 typedef enum mysqlnd_query_type 123 { 124 QUERY_UPSERT, 125 QUERY_SELECT, 126 QUERY_LOAD_LOCAL 127 } enum_mysqlnd_query_type; 128 129 typedef enum mysqlnd_res_type 130 { 131 MYSQLND_RES_NORMAL = 1, 132 MYSQLND_RES_PS_BUF, 133 MYSQLND_RES_PS_UNBUF 134 } enum_mysqlnd_res_type; 135 136 typedef enum mysqlnd_option 137 { 138 MYSQL_OPT_CONNECT_TIMEOUT, 139 MYSQL_OPT_COMPRESS, 140 MYSQL_OPT_NAMED_PIPE, 141 MYSQL_INIT_COMMAND, 142 MYSQL_READ_DEFAULT_FILE, 143 MYSQL_READ_DEFAULT_GROUP, 144 MYSQL_SET_CHARSET_DIR, 145 MYSQL_SET_CHARSET_NAME, 146 MYSQL_OPT_LOCAL_INFILE, 147 MYSQL_OPT_PROTOCOL, 148 MYSQL_SHARED_MEMORY_BASE_NAME, 149 MYSQL_OPT_READ_TIMEOUT, 150 MYSQL_OPT_WRITE_TIMEOUT, 151 MYSQL_OPT_USE_RESULT, 152 MYSQL_OPT_USE_REMOTE_CONNECTION, 153 MYSQL_OPT_USE_EMBEDDED_CONNECTION, 154 MYSQL_OPT_GUESS_CONNECTION, 155 MYSQL_SET_CLIENT_IP, 156 MYSQL_SECURE_AUTH, 157 MYSQL_REPORT_DATA_TRUNCATION, 158 MYSQL_OPT_RECONNECT, 159 MYSQL_OPT_SSL_VERIFY_SERVER_CERT, 160 MYSQL_PLUGIN_DIR, 161 MYSQL_DEFAULT_AUTH, 162 #if MYSQLND_UNICODE 163 MYSQLND_OPT_NUMERIC_AND_DATETIME_AS_UNICODE = 200, 164 #endif 165 #ifdef MYSQLND_STRING_TO_INT_CONVERSION 166 MYSQLND_OPT_INT_AND_FLOAT_NATIVE = 201, 167 #endif 168 MYSQLND_OPT_NET_CMD_BUFFER_SIZE = 202, 169 MYSQLND_OPT_NET_READ_BUFFER_SIZE = 203, 170 MYSQLND_OPT_SSL_KEY = 204, 171 MYSQLND_OPT_SSL_CERT = 205, 172 MYSQLND_OPT_SSL_CA = 206, 173 MYSQLND_OPT_SSL_CAPATH = 207, 174 MYSQLND_OPT_SSL_CIPHER = 208, 175 MYSQLND_OPT_SSL_PASSPHRASE = 209 176 } enum_mysqlnd_option; 177 178 typedef enum mysqlnd_protocol_type 179 { 180 MYSQL_PROTOCOL_DEFAULT = 0, 181 MYSQL_PROTOCOL_TCP, /* all, supported */ 182 MYSQL_PROTOCOL_SOCKET, /* unix, supported */ 183 MYSQL_PROTOCOL_PIPE, /* win32, not-supported */ 184 MYSQL_PROTOCOL_MEMORY, /* win32, not-supported */ 185 MYSQL_PROTOCOL_LAST 186 } enum_mysqlnd_protocol_type; 187 188 typedef enum mysqlnd_field_types 189 { 190 MYSQL_TYPE_DECIMAL, 191 MYSQL_TYPE_TINY, 192 MYSQL_TYPE_SHORT, 193 MYSQL_TYPE_LONG, 194 MYSQL_TYPE_FLOAT, 195 MYSQL_TYPE_DOUBLE, 196 MYSQL_TYPE_NULL, 197 MYSQL_TYPE_TIMESTAMP, 198 MYSQL_TYPE_LONGLONG, 199 MYSQL_TYPE_INT24, 200 MYSQL_TYPE_DATE, 201 MYSQL_TYPE_TIME, 202 MYSQL_TYPE_DATETIME, 203 MYSQL_TYPE_YEAR, 204 MYSQL_TYPE_NEWDATE, 205 MYSQL_TYPE_VARCHAR, 206 MYSQL_TYPE_BIT, 207 MYSQL_TYPE_NEWDECIMAL=246, 208 MYSQL_TYPE_ENUM=247, 209 MYSQL_TYPE_SET=248, 210 MYSQL_TYPE_TINY_BLOB=249, 211 MYSQL_TYPE_MEDIUM_BLOB=250, 212 MYSQL_TYPE_LONG_BLOB=251, 213 MYSQL_TYPE_BLOB=252, 214 MYSQL_TYPE_VAR_STRING=253, 215 MYSQL_TYPE_STRING=254, 216 MYSQL_TYPE_GEOMETRY=255 217 } enum_mysqlnd_field_types; 218 219 /* Please update this if there is a new type after MYSQL_TYPE_GEOMETRY */ 220 #define MYSQL_TYPE_LAST MYSQL_TYPE_GEOMETRY 221 222 223 typedef enum mysqlnd_server_option 224 { 225 MYSQL_OPTION_MULTI_STATEMENTS_ON, 226 MYSQL_OPTION_MULTI_STATEMENTS_OFF 227 } enum_mysqlnd_server_option; 228 229 230 #define FIELD_TYPE_DECIMAL MYSQL_TYPE_DECIMAL 231 #define FIELD_TYPE_NEWDECIMAL MYSQL_TYPE_NEWDECIMAL 232 #define FIELD_TYPE_TINY MYSQL_TYPE_TINY 233 #define FIELD_TYPE_SHORT MYSQL_TYPE_SHORT 234 #define FIELD_TYPE_LONG MYSQL_TYPE_LONG 235 #define FIELD_TYPE_FLOAT MYSQL_TYPE_FLOAT 236 #define FIELD_TYPE_DOUBLE MYSQL_TYPE_DOUBLE 237 #define FIELD_TYPE_NULL MYSQL_TYPE_NULL 238 #define FIELD_TYPE_TIMESTAMP MYSQL_TYPE_TIMESTAMP 239 #define FIELD_TYPE_LONGLONG MYSQL_TYPE_LONGLONG 240 #define FIELD_TYPE_INT24 MYSQL_TYPE_INT24 241 #define FIELD_TYPE_DATE MYSQL_TYPE_DATE 242 #define FIELD_TYPE_TIME MYSQL_TYPE_TIME 243 #define FIELD_TYPE_DATETIME MYSQL_TYPE_DATETIME 244 #define FIELD_TYPE_YEAR MYSQL_TYPE_YEAR 245 #define FIELD_TYPE_NEWDATE MYSQL_TYPE_NEWDATE 246 #define FIELD_TYPE_ENUM MYSQL_TYPE_ENUM 247 #define FIELD_TYPE_SET MYSQL_TYPE_SET 248 #define FIELD_TYPE_TINY_BLOB MYSQL_TYPE_TINY_BLOB 249 #define FIELD_TYPE_MEDIUM_BLOB MYSQL_TYPE_MEDIUM_BLOB 250 #define FIELD_TYPE_LONG_BLOB MYSQL_TYPE_LONG_BLOB 251 #define FIELD_TYPE_BLOB MYSQL_TYPE_BLOB 252 #define FIELD_TYPE_VAR_STRING MYSQL_TYPE_VAR_STRING 253 #define FIELD_TYPE_STRING MYSQL_TYPE_STRING 254 #define FIELD_TYPE_CHAR MYSQL_TYPE_TINY 255 #define FIELD_TYPE_INTERVAL MYSQL_TYPE_ENUM 256 #define FIELD_TYPE_GEOMETRY MYSQL_TYPE_GEOMETRY 257 #define FIELD_TYPE_BIT MYSQL_TYPE_BIT 258 259 #define NOT_NULL_FLAG 1 260 #define PRI_KEY_FLAG 2 261 #define UNIQUE_KEY_FLAG 4 262 #define MULTIPLE_KEY_FLAG 8 263 #define BLOB_FLAG 16 264 #define UNSIGNED_FLAG 32 265 #define ZEROFILL_FLAG 64 266 #define BINARY_FLAG 128 267 #define ENUM_FLAG 256 268 #define AUTO_INCREMENT_FLAG 512 269 #define TIMESTAMP_FLAG 1024 270 #define SET_FLAG 2048 271 #define NO_DEFAULT_VALUE_FLAG 4096 272 #define ON_UPDATE_NOW_FLAG 8192 273 #define PART_KEY_FLAG 16384 274 #define GROUP_FLAG 32768 275 #define NUM_FLAG 32768 276 277 #define IS_PRI_KEY(n) ((n) & PRI_KEY_FLAG) 278 #define IS_NOT_NULL(n) ((n) & NOT_NULL_FLAG) 279 #define IS_BLOB(n) ((n) & BLOB_FLAG) 280 #define IS_NUM(t) ((t) <= FIELD_TYPE_INT24 || (t) == FIELD_TYPE_YEAR || (t) == FIELD_TYPE_NEWDECIMAL) 281 282 283 /* see mysqlnd_charset.c for more information */ 284 #define MYSQLND_BINARY_CHARSET_NR 63 285 286 287 /* 288 /-----> CONN_CLOSE <---------------\ 289 | ^ \ 290 | | \ 291 CONN_READY -> CONN_QUERY_SENT -> CONN_FETCHING_DATA 292 ^ | 293 \-------------------------------------/ 294 */ 295 typedef enum mysqlnd_connection_state 296 { 297 CONN_ALLOCED = 0, 298 CONN_READY, 299 CONN_QUERY_SENT, 300 CONN_SENDING_LOAD_DATA, 301 CONN_FETCHING_DATA, 302 CONN_NEXT_RESULT_PENDING, 303 CONN_QUIT_SENT /* object is "destroyed" at this stage */ 304 } enum_mysqlnd_connection_state; 305 306 307 typedef enum mysqlnd_stmt_state 308 { 309 MYSQLND_STMT_INITTED = 0, 310 MYSQLND_STMT_PREPARED, 311 MYSQLND_STMT_EXECUTED, 312 MYSQLND_STMT_WAITING_USE_OR_STORE, 313 MYSQLND_STMT_USE_OR_STORE_CALLED, 314 MYSQLND_STMT_USER_FETCHING /* fetch_row_buff or fetch_row_unbuf */ 315 } enum_mysqlnd_stmt_state; 316 317 318 typedef enum param_bind_flags 319 { 320 MYSQLND_PARAM_BIND_BLOB_USED = 1 321 } enum_param_bind_flags; 322 323 324 /* PS */ 325 enum mysqlnd_stmt_attr 326 { 327 STMT_ATTR_UPDATE_MAX_LENGTH, 328 STMT_ATTR_CURSOR_TYPE, 329 STMT_ATTR_PREFETCH_ROWS 330 }; 331 332 enum myslqnd_cursor_type 333 { 334 CURSOR_TYPE_NO_CURSOR= 0, 335 CURSOR_TYPE_READ_ONLY= 1, 336 CURSOR_TYPE_FOR_UPDATE= 2, 337 CURSOR_TYPE_SCROLLABLE= 4 338 }; 339 340 typedef enum mysqlnd_connection_close_type 341 { 342 MYSQLND_CLOSE_EXPLICIT = 0, 343 MYSQLND_CLOSE_IMPLICIT, 344 MYSQLND_CLOSE_DISCONNECTED, 345 MYSQLND_CLOSE_LAST /* for checking, should always be last */ 346 } enum_connection_close_type; 347 348 349 typedef enum mysqlnd_collected_stats 350 { 351 STAT_BYTES_SENT, 352 STAT_BYTES_RECEIVED, 353 STAT_PACKETS_SENT, 354 STAT_PACKETS_RECEIVED, 355 STAT_PROTOCOL_OVERHEAD_IN, 356 STAT_PROTOCOL_OVERHEAD_OUT, 357 STAT_BYTES_RECEIVED_OK, 358 STAT_BYTES_RECEIVED_EOF, 359 STAT_BYTES_RECEIVED_RSET_HEADER, 360 STAT_BYTES_RECEIVED_RSET_FIELD_META, 361 STAT_BYTES_RECEIVED_RSET_ROW, 362 STAT_BYTES_RECEIVED_PREPARE_RESPONSE, 363 STAT_BYTES_RECEIVED_CHANGE_USER, 364 STAT_PACKETS_SENT_CMD, 365 STAT_PACKETS_RECEIVED_OK, 366 STAT_PACKETS_RECEIVED_EOF, 367 STAT_PACKETS_RECEIVED_RSET_HEADER, 368 STAT_PACKETS_RECEIVED_RSET_FIELD_META, 369 STAT_PACKETS_RECEIVED_RSET_ROW, 370 STAT_PACKETS_RECEIVED_PREPARE_RESPONSE, 371 STAT_PACKETS_RECEIVED_CHANGE_USER, 372 STAT_RSET_QUERY, 373 STAT_NON_RSET_QUERY, 374 STAT_NO_INDEX_USED, 375 STAT_BAD_INDEX_USED, 376 STAT_QUERY_WAS_SLOW, 377 STAT_BUFFERED_SETS, 378 STAT_UNBUFFERED_SETS, 379 STAT_PS_BUFFERED_SETS, 380 STAT_PS_UNBUFFERED_SETS, 381 STAT_FLUSHED_NORMAL_SETS, 382 STAT_FLUSHED_PS_SETS, 383 STAT_PS_PREPARED_NEVER_EXECUTED, 384 STAT_PS_PREPARED_ONCE_USED, 385 STAT_ROWS_FETCHED_FROM_SERVER_NORMAL, 386 STAT_ROWS_FETCHED_FROM_SERVER_PS, 387 STAT_ROWS_BUFFERED_FROM_CLIENT_NORMAL, 388 STAT_ROWS_BUFFERED_FROM_CLIENT_PS, 389 STAT_ROWS_FETCHED_FROM_CLIENT_NORMAL_BUF, 390 STAT_ROWS_FETCHED_FROM_CLIENT_NORMAL_UNBUF, 391 STAT_ROWS_FETCHED_FROM_CLIENT_PS_BUF, 392 STAT_ROWS_FETCHED_FROM_CLIENT_PS_UNBUF, 393 STAT_ROWS_FETCHED_FROM_CLIENT_PS_CURSOR, 394 STAT_ROWS_AFFECTED_NORMAL, 395 STAT_ROWS_AFFECTED_PS, 396 STAT_ROWS_SKIPPED_NORMAL, 397 STAT_ROWS_SKIPPED_PS, 398 STAT_COPY_ON_WRITE_SAVED, 399 STAT_COPY_ON_WRITE_PERFORMED, 400 STAT_CMD_BUFFER_TOO_SMALL, 401 STAT_CONNECT_SUCCESS, 402 STAT_CONNECT_FAILURE, 403 STAT_CONNECT_REUSED, 404 STAT_RECONNECT, 405 STAT_PCONNECT_SUCCESS, 406 STAT_OPENED_CONNECTIONS, 407 STAT_OPENED_PERSISTENT_CONNECTIONS, 408 STAT_CLOSE_EXPLICIT, 409 STAT_CLOSE_IMPLICIT, 410 STAT_CLOSE_DISCONNECT, 411 STAT_CLOSE_IN_MIDDLE, 412 STAT_FREE_RESULT_EXPLICIT, 413 STAT_FREE_RESULT_IMPLICIT, 414 STAT_STMT_CLOSE_EXPLICIT, 415 STAT_STMT_CLOSE_IMPLICIT, 416 STAT_MEM_EMALLOC_COUNT, 417 STAT_MEM_EMALLOC_AMOUNT, 418 STAT_MEM_ECALLOC_COUNT, 419 STAT_MEM_ECALLOC_AMOUNT, 420 STAT_MEM_EREALLOC_COUNT, 421 STAT_MEM_EREALLOC_AMOUNT, 422 STAT_MEM_EFREE_COUNT, 423 STAT_MEM_EFREE_AMOUNT, 424 STAT_MEM_MALLOC_COUNT, 425 STAT_MEM_MALLOC_AMOUNT, 426 STAT_MEM_CALLOC_COUNT, 427 STAT_MEM_CALLOC_AMOUNT, 428 STAT_MEM_REALLOC_COUNT, 429 STAT_MEM_REALLOC_AMOUNT, 430 STAT_MEM_FREE_COUNT, 431 STAT_MEM_FREE_AMOUNT, 432 STAT_MEM_ESTRNDUP_COUNT, 433 STAT_MEM_STRNDUP_COUNT, 434 STAT_MEM_ESTRDUP_COUNT, 435 STAT_MEM_STRDUP_COUNT, 436 STAT_TEXT_TYPE_FETCHED_NULL, 437 STAT_TEXT_TYPE_FETCHED_BIT, 438 STAT_TEXT_TYPE_FETCHED_INT8, 439 STAT_TEXT_TYPE_FETCHED_INT16, 440 STAT_TEXT_TYPE_FETCHED_INT24, 441 STAT_TEXT_TYPE_FETCHED_INT32, 442 STAT_TEXT_TYPE_FETCHED_INT64, 443 STAT_TEXT_TYPE_FETCHED_DECIMAL, 444 STAT_TEXT_TYPE_FETCHED_FLOAT, 445 STAT_TEXT_TYPE_FETCHED_DOUBLE, 446 STAT_TEXT_TYPE_FETCHED_DATE, 447 STAT_TEXT_TYPE_FETCHED_YEAR, 448 STAT_TEXT_TYPE_FETCHED_TIME, 449 STAT_TEXT_TYPE_FETCHED_DATETIME, 450 STAT_TEXT_TYPE_FETCHED_TIMESTAMP, 451 STAT_TEXT_TYPE_FETCHED_STRING, 452 STAT_TEXT_TYPE_FETCHED_BLOB, 453 STAT_TEXT_TYPE_FETCHED_ENUM, 454 STAT_TEXT_TYPE_FETCHED_SET, 455 STAT_TEXT_TYPE_FETCHED_GEOMETRY, 456 STAT_TEXT_TYPE_FETCHED_OTHER, 457 STAT_BINARY_TYPE_FETCHED_NULL, 458 STAT_BINARY_TYPE_FETCHED_BIT, 459 STAT_BINARY_TYPE_FETCHED_INT8, 460 STAT_BINARY_TYPE_FETCHED_INT16, 461 STAT_BINARY_TYPE_FETCHED_INT24, 462 STAT_BINARY_TYPE_FETCHED_INT32, 463 STAT_BINARY_TYPE_FETCHED_INT64, 464 STAT_BINARY_TYPE_FETCHED_DECIMAL, 465 STAT_BINARY_TYPE_FETCHED_FLOAT, 466 STAT_BINARY_TYPE_FETCHED_DOUBLE, 467 STAT_BINARY_TYPE_FETCHED_DATE, 468 STAT_BINARY_TYPE_FETCHED_YEAR, 469 STAT_BINARY_TYPE_FETCHED_TIME, 470 STAT_BINARY_TYPE_FETCHED_DATETIME, 471 STAT_BINARY_TYPE_FETCHED_TIMESTAMP, 472 STAT_BINARY_TYPE_FETCHED_STRING, 473 STAT_BINARY_TYPE_FETCHED_BLOB, 474 STAT_BINARY_TYPE_FETCHED_ENUM, 475 STAT_BINARY_TYPE_FETCHED_SET, 476 STAT_BINARY_TYPE_FETCHED_GEOMETRY, 477 STAT_BINARY_TYPE_FETCHED_OTHER, 478 STAT_INIT_COMMAND_EXECUTED_COUNT, 479 STAT_INIT_COMMAND_FAILED_COUNT, 480 STAT_COM_QUIT, 481 STAT_COM_INIT_DB, 482 STAT_COM_QUERY, 483 STAT_COM_FIELD_LIST, 484 STAT_COM_CREATE_DB, 485 STAT_COM_DROP_DB, 486 STAT_COM_REFRESH, 487 STAT_COM_SHUTDOWN, 488 STAT_COM_STATISTICS, 489 STAT_COM_PROCESS_INFO, 490 STAT_COM_CONNECT, 491 STAT_COM_PROCESS_KILL, 492 STAT_COM_DEBUG, 493 STAT_COM_PING, 494 STAT_COM_TIME, 495 STAT_COM_DELAYED_INSERT, 496 STAT_COM_CHANGE_USER, 497 STAT_COM_BINLOG_DUMP, 498 STAT_COM_TABLE_DUMP, 499 STAT_COM_CONNECT_OUT, 500 STAT_COM_REGISTER_SLAVE, 501 STAT_COM_STMT_PREPARE, 502 STAT_COM_STMT_EXECUTE, 503 STAT_COM_STMT_SEND_LONG_DATA, 504 STAT_COM_STMT_CLOSE, 505 STAT_COM_STMT_RESET, 506 STAT_COM_SET_OPTION, 507 STAT_COM_STMT_FETCH, 508 STAT_COM_DAEMON, 509 STAT_BYTES_RECEIVED_PURE_DATA_TEXT, 510 STAT_BYTES_RECEIVED_PURE_DATA_PS, 511 STAT_LAST /* Should be always the last */ 512 } enum_mysqlnd_collected_stats; 513 514 515 /* Enums */ 516 enum mysqlnd_packet_type 517 { 518 PROT_GREET_PACKET= 0, 519 PROT_AUTH_PACKET, 520 PROT_OK_PACKET, 521 PROT_EOF_PACKET, 522 PROT_CMD_PACKET, 523 PROT_RSET_HEADER_PACKET, 524 PROT_RSET_FLD_PACKET, 525 PROT_ROW_PACKET, 526 PROT_STATS_PACKET, 527 PROT_PREPARE_RESP_PACKET, 528 PROT_CHG_USER_RESP_PACKET, 529 PROT_LAST /* should always be last */ 530 }; 531 532 533 enum php_mysqlnd_server_command 534 { 535 COM_SLEEP = 0, 536 COM_QUIT, 537 COM_INIT_DB, 538 COM_QUERY, 539 COM_FIELD_LIST, 540 COM_CREATE_DB, 541 COM_DROP_DB, 542 COM_REFRESH, 543 COM_SHUTDOWN, 544 COM_STATISTICS, 545 COM_PROCESS_INFO, 546 COM_CONNECT, 547 COM_PROCESS_KILL, 548 COM_DEBUG, 549 COM_PING, 550 COM_TIME = 15, 551 COM_DELAYED_INSERT, 552 COM_CHANGE_USER, 553 COM_BINLOG_DUMP, 554 COM_TABLE_DUMP, 555 COM_CONNECT_OUT = 20, 556 COM_REGISTER_SLAVE, 557 COM_STMT_PREPARE = 22, 558 COM_STMT_EXECUTE = 23, 559 COM_STMT_SEND_LONG_DATA = 24, 560 COM_STMT_CLOSE = 25, 561 COM_STMT_RESET = 26, 562 COM_SET_OPTION = 27, 563 COM_STMT_FETCH = 28, 564 COM_DAEMON, 565 COM_END 566 }; 567 568 569 #define MYSQLND_DEFAULT_PREFETCH_ROWS (ulong) 1 570 571 #define MYSQLND_REFRESH_GRANT 1 /* Refresh grant tables */ 572 #define MYSQLND_REFRESH_LOG 2 /* Start on new log file */ 573 #define MYSQLND_REFRESH_TABLES 4 /* close all tables */ 574 #define MYSQLND_REFRESH_HOSTS 8 /* Flush host cache */ 575 #define MYSQLND_REFRESH_STATUS 16 /* Flush status variables */ 576 #define MYSQLND_REFRESH_THREADS 32 /* Flush thread cache */ 577 #define MYSQLND_REFRESH_SLAVE 64 /* Reset master info and restart slave */ 578 #define MYSQLND_REFRESH_MASTER 128 /* Remove all bin logs in the index */ 579 #define MYSQLND_REFRESH_BACKUP_LOG 0x200000L 580 581 #endif /* MYSQLND_ENUM_N_DEF_H */ 582 583 584 /* 585 * Local variables: 586 * tab-width: 4 587 * c-basic-offset: 4 588 * End: 589 * vim600: noet sw=4 ts=4 fdm=marker 590 * vim<600: noet sw=4 ts=4 591 */ 592