summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_wireprotocol.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mysqlnd/mysqlnd_wireprotocol.h')
-rw-r--r--ext/mysqlnd/mysqlnd_wireprotocol.h32
1 files changed, 18 insertions, 14 deletions
diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.h b/ext/mysqlnd/mysqlnd_wireprotocol.h
index 26dd4c65ae..5238715987 100644
--- a/ext/mysqlnd/mysqlnd_wireprotocol.h
+++ b/ext/mysqlnd/mysqlnd_wireprotocol.h
@@ -1,8 +1,8 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 5 |
+ | PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2013 The PHP Group |
+ | Copyright (c) 2006-2014 The PHP Group |
+----------------------------------------------------------------------+
| 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 |
@@ -28,7 +28,7 @@
#define MYSQLND_HEADER_SIZE 4
#define COMPRESSED_HEADER_SIZE 3
-#define MYSQLND_NULL_LENGTH (unsigned long) ~0
+#define MYSQLND_NULL_LENGTH (zend_ulong) ~0
/* Used in mysqlnd_debug.c */
PHPAPI extern const char mysqlnd_read_header_name[];
@@ -90,20 +90,20 @@ typedef struct st_mysqlnd_packet_greet {
/* Client authenticates */
typedef struct st_mysqlnd_packet_auth {
MYSQLND_PACKET_HEADER header;
- uint32_t client_flags;
- uint32_t max_packet_size;
- uint8_t charset_no;
const char *user;
const zend_uchar *auth_data;
size_t auth_data_len;
const char *db;
const char *auth_plugin_name;
+ uint32_t client_flags;
+ uint32_t max_packet_size;
+ uint8_t charset_no;
/* Here the packet ends. This is user supplied data */
- size_t db_len;
zend_bool send_auth_data;
zend_bool is_change_user_packet;
zend_bool silent;
HashTable *connect_attr;
+ size_t db_len;
} MYSQLND_PACKET_AUTH;
/* Auth response packet */
@@ -185,7 +185,7 @@ typedef struct st_mysqlnd_packet_rset_header {
error_no != 0 => error
others => result set -> Read res_field packets up to field_count
*/
- unsigned long field_count;
+ zend_ulong field_count;
/*
These are filled if no SELECT query. For SELECT warning_count
and server status are in the last row packet, the EOF packet.
@@ -218,7 +218,7 @@ typedef struct st_mysqlnd_packet_res_field {
/* Row packet */
typedef struct st_mysqlnd_packet_row {
MYSQLND_PACKET_HEADER header;
- zval **fields;
+ zval *fields;
uint32_t field_count;
zend_bool eof;
/*
@@ -258,7 +258,7 @@ typedef struct st_mysqlnd_packet_prepare_response {
MYSQLND_PACKET_HEADER header;
/* also known as field_count 0x00=OK , 0xFF=error */
unsigned char error_code;
- unsigned long stmt_id;
+ zend_ulong stmt_id;
unsigned int field_count;
unsigned int param_count;
unsigned int warning_count;
@@ -300,18 +300,22 @@ typedef struct st_mysqlnd_packet_sha256_pk_request_response {
PHPAPI void php_mysqlnd_scramble(zend_uchar * const buffer, const zend_uchar * const scramble, const zend_uchar * const pass, size_t pass_len);
-unsigned long php_mysqlnd_net_field_length(zend_uchar **packet);
+zend_ulong php_mysqlnd_net_field_length(zend_uchar **packet);
zend_uchar * php_mysqlnd_net_store_length(zend_uchar *packet, uint64_t length);
+size_t php_mysqlnd_net_store_length_size(uint64_t length);
PHPAPI const extern char * const mysqlnd_empty_string;
-
-enum_func_status php_mysqlnd_rowp_read_binary_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval ** fields,
+enum_func_status php_mysqlnd_rowp_read_binary_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval * fields,
unsigned int field_count, const MYSQLND_FIELD * fields_metadata,
zend_bool as_int_or_float, MYSQLND_STATS * stats TSRMLS_DC);
-enum_func_status php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval ** fields,
+enum_func_status php_mysqlnd_rowp_read_text_protocol_zval(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval * fields,
+ unsigned int field_count, const MYSQLND_FIELD * fields_metadata,
+ zend_bool as_int_or_float, MYSQLND_STATS * stats TSRMLS_DC);
+
+enum_func_status php_mysqlnd_rowp_read_text_protocol_c(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval * fields,
unsigned int field_count, const MYSQLND_FIELD * fields_metadata,
zend_bool as_int_or_float, MYSQLND_STATS * stats TSRMLS_DC);