From c081ce628f0d76d44784d7bb8e06428b06142ac0 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Fri, 3 Jan 2014 11:08:10 +0800 Subject: Bump year --- ext/mysqlnd/mysqlnd_wireprotocol.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/mysqlnd/mysqlnd_wireprotocol.h') diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.h b/ext/mysqlnd/mysqlnd_wireprotocol.h index 26dd4c65ae..4bd33592bf 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.h +++ b/ext/mysqlnd/mysqlnd_wireprotocol.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | 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 | -- cgit v1.2.1 From 0c90c207a71b90cc840d449a1952f16edd64cb4b Mon Sep 17 00:00:00 2001 From: Andrey Hristov Date: Fri, 24 Jan 2014 11:39:24 +0200 Subject: Backport refactoring from php-src --- ext/mysqlnd/mysqlnd_wireprotocol.h | 1 + 1 file changed, 1 insertion(+) (limited to 'ext/mysqlnd/mysqlnd_wireprotocol.h') diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.h b/ext/mysqlnd/mysqlnd_wireprotocol.h index 4bd33592bf..be71d06508 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.h +++ b/ext/mysqlnd/mysqlnd_wireprotocol.h @@ -302,6 +302,7 @@ PHPAPI void php_mysqlnd_scramble(zend_uchar * const buffer, const zend_uchar * c unsigned long 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; -- cgit v1.2.1 From 63791d055ad64762c3f63e08ca7ad8ba1f44e0ab Mon Sep 17 00:00:00 2001 From: Andrey Hristov Date: Thu, 10 Apr 2014 16:44:54 +0300 Subject: New result fetching mode for mysqlnd, which should use less memory but implies more memory copy. The old method is still available and can be used. It stays as default. Choosing the method is through a flag to mysqli_query()/mysqli_real_query() New mode can be forced with an INI setting, for all extensions that support this mode (ext/mysql and mysqli, because PDO due to it's architecture can't support it) The setting is mysqlnd.fetch_data_copy=[0|1] --- ext/mysqlnd/mysqlnd_wireprotocol.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ext/mysqlnd/mysqlnd_wireprotocol.h') diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.h b/ext/mysqlnd/mysqlnd_wireprotocol.h index be71d06508..7e8b9624ac 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.h +++ b/ext/mysqlnd/mysqlnd_wireprotocol.h @@ -312,7 +312,11 @@ enum_func_status php_mysqlnd_rowp_read_binary_protocol(MYSQLND_MEMORY_POOL_CHUNK 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); -- cgit v1.2.1 From 6288bb8ffefe9cf9648b8d2190729c087b5c2586 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Tue, 17 Jun 2014 17:50:54 +0800 Subject: Refactoring mysqlnd (incompleted, only mysqlnd ext compilable) --- ext/mysqlnd/mysqlnd_wireprotocol.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ext/mysqlnd/mysqlnd_wireprotocol.h') diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.h b/ext/mysqlnd/mysqlnd_wireprotocol.h index 7e8b9624ac..165e18ba13 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.h +++ b/ext/mysqlnd/mysqlnd_wireprotocol.h @@ -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; /* @@ -307,16 +307,16 @@ 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_zval(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, +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); -- cgit v1.2.1 From 92a708989380bfb5d5da00665895025398bdbc91 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Mon, 23 Jun 2014 19:12:15 +0800 Subject: Use zend_string in mysqlnd --- ext/mysqlnd/mysqlnd_wireprotocol.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'ext/mysqlnd/mysqlnd_wireprotocol.h') diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.h b/ext/mysqlnd/mysqlnd_wireprotocol.h index 165e18ba13..6360512f96 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.h +++ b/ext/mysqlnd/mysqlnd_wireprotocol.h @@ -304,8 +304,6 @@ unsigned long 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, unsigned int field_count, const MYSQLND_FIELD * fields_metadata, -- cgit v1.2.1 From 8ce23d8f4fc5df0daec05642df8ead016f00fc32 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Wed, 25 Jun 2014 00:42:20 +0800 Subject: Don't use zend_string for other fields (only name here is enough) --- ext/mysqlnd/mysqlnd_wireprotocol.h | 1 + 1 file changed, 1 insertion(+) (limited to 'ext/mysqlnd/mysqlnd_wireprotocol.h') diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.h b/ext/mysqlnd/mysqlnd_wireprotocol.h index 6360512f96..bd87d9e757 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.h +++ b/ext/mysqlnd/mysqlnd_wireprotocol.h @@ -304,6 +304,7 @@ unsigned long 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, unsigned int field_count, const MYSQLND_FIELD * fields_metadata, -- cgit v1.2.1 From bdbf47df181bdafc1b2bc2df1d23815f01510b88 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Tue, 19 Aug 2014 16:51:06 +0200 Subject: ported mysql and mysqlnd --- ext/mysqlnd/mysqlnd_wireprotocol.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ext/mysqlnd/mysqlnd_wireprotocol.h') diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.h b/ext/mysqlnd/mysqlnd_wireprotocol.h index bd87d9e757..059cfb2416 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.h +++ b/ext/mysqlnd/mysqlnd_wireprotocol.h @@ -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 (php_uint_t) ~0 /* Used in mysqlnd_debug.c */ PHPAPI extern const char mysqlnd_read_header_name[]; @@ -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; + php_uint_t 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. @@ -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; + php_uint_t stmt_id; unsigned int field_count; unsigned int param_count; unsigned int warning_count; @@ -300,7 +300,7 @@ 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); +php_uint_t 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); -- cgit v1.2.1 From c3e3c98ec666812daaaca896cf5ef758a8a6df14 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Mon, 25 Aug 2014 19:24:55 +0200 Subject: master renames phase 1 --- ext/mysqlnd/mysqlnd_wireprotocol.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ext/mysqlnd/mysqlnd_wireprotocol.h') diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.h b/ext/mysqlnd/mysqlnd_wireprotocol.h index 059cfb2416..b40808d595 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.h +++ b/ext/mysqlnd/mysqlnd_wireprotocol.h @@ -28,7 +28,7 @@ #define MYSQLND_HEADER_SIZE 4 #define COMPRESSED_HEADER_SIZE 3 -#define MYSQLND_NULL_LENGTH (php_uint_t) ~0 +#define MYSQLND_NULL_LENGTH (zend_ulong) ~0 /* Used in mysqlnd_debug.c */ PHPAPI extern const char mysqlnd_read_header_name[]; @@ -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 */ - php_uint_t 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. @@ -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; - php_uint_t stmt_id; + zend_ulong stmt_id; unsigned int field_count; unsigned int param_count; unsigned int warning_count; @@ -300,7 +300,7 @@ 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); -php_uint_t 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); -- cgit v1.2.1 From 65100a64744c16e313e1d716945093a55b1a7a20 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Sun, 14 Sep 2014 09:40:56 +0200 Subject: reduce the struct size by 8 byte on 64 bit --- ext/mysqlnd/mysqlnd_wireprotocol.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ext/mysqlnd/mysqlnd_wireprotocol.h') diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.h b/ext/mysqlnd/mysqlnd_wireprotocol.h index b40808d595..c64e6ccc78 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.h +++ b/ext/mysqlnd/mysqlnd_wireprotocol.h @@ -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 */ -- cgit v1.2.1 From d0cb715373c3fbe9dc095378ec5ed8c71f799f67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Schl=C3=BCter?= Date: Fri, 19 Sep 2014 18:33:14 +0200 Subject: s/PHP 5/PHP 7/ --- ext/mysqlnd/mysqlnd_wireprotocol.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/mysqlnd/mysqlnd_wireprotocol.h') diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.h b/ext/mysqlnd/mysqlnd_wireprotocol.h index c64e6ccc78..5238715987 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.h +++ b/ext/mysqlnd/mysqlnd_wireprotocol.h @@ -1,6 +1,6 @@ /* +----------------------------------------------------------------------+ - | PHP Version 5 | + | PHP Version 7 | +----------------------------------------------------------------------+ | Copyright (c) 2006-2014 The PHP Group | +----------------------------------------------------------------------+ -- cgit v1.2.1