andrey Fri Oct 31 20:32:17 2008 UTC
Modified files: (Branch: PHP_5_3)
/php-src/ext/mysqlnd mysqlnd.c mysqlnd_libmysql_compat.h
mysqlnd_portability.h mysqlnd_priv.h
mysqlnd_ps.c mysqlnd_ps_codec.c
mysqlnd_result.c mysqlnd_statistics.h
mysqlnd_structs.h mysqlnd_wireprotocol.c
mysqlnd_wireprotocol.h
Log:
MFB:
64bit fixes:
- fixes to sprintf modifiers, cleaning warnings
- use _t types, like uint64_t instead of uint64, thus skipping series of
typedefs.
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.c?r1=1.5.2.29&r2=1.5.2.30&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd.c
diff -u php-src/ext/mysqlnd/mysqlnd.c:1.5.2.29
php-src/ext/mysqlnd/mysqlnd.c:1.5.2.30
--- php-src/ext/mysqlnd/mysqlnd.c:1.5.2.29 Mon Oct 27 17:21:22 2008
+++ php-src/ext/mysqlnd/mysqlnd.c Fri Oct 31 20:32:17 2008
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mysqlnd.c,v 1.5.2.29 2008/10/27 17:21:22 johannes Exp $ */
+/* $Id: mysqlnd.c,v 1.5.2.30 2008/10/31 20:32:17 andrey Exp $ */
#include "php.h"
#include "mysqlnd.h"
#include "mysqlnd_wireprotocol.h"
@@ -1372,7 +1372,7 @@
/* {{{ mysqlnd_conn::insert_id */
-static uint64
+static uint64_t
MYSQLND_METHOD(mysqlnd_conn, insert_id)(const MYSQLND * const conn)
{
return conn->upsert_status.last_insert_id;
@@ -1381,7 +1381,7 @@
/* {{{ mysqlnd_conn::affected_rows */
-static uint64
+static uint64_t
MYSQLND_METHOD(mysqlnd_conn, affected_rows)(const MYSQLND * const conn)
{
return conn->upsert_status.affected_rows;
@@ -1460,7 +1460,7 @@
/* {{{ mysqlnd_conn::thread_id */
-static uint64
+static uint64_t
MYSQLND_METHOD(mysqlnd_conn, thread_id)(const MYSQLND * const conn)
{
return conn->thread_id;
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_libmysql_compat.h?r1=1.1.2.8&r2=1.1.2.9&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_libmysql_compat.h
diff -u php-src/ext/mysqlnd/mysqlnd_libmysql_compat.h:1.1.2.8
php-src/ext/mysqlnd/mysqlnd_libmysql_compat.h:1.1.2.9
--- php-src/ext/mysqlnd/mysqlnd_libmysql_compat.h:1.1.2.8 Wed May 7
15:14:26 2008
+++ php-src/ext/mysqlnd/mysqlnd_libmysql_compat.h Fri Oct 31 20:32:17 2008
@@ -31,7 +31,7 @@
#define MYSQL_ROW MYSQLND_ROW_C
#define MYSQL MYSQLND
#define my_bool zend_bool
-#define my_ulonglong uint64
+#define my_ulonglong uint64_t
#define MYSQL_VERSION_ID MYSQLND_VERSION_ID
#define MYSQL_SERVER_VERSION MYSQLND_VERSION
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_portability.h?r1=1.4.2.5&r2=1.4.2.6&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_portability.h
diff -u php-src/ext/mysqlnd/mysqlnd_portability.h:1.4.2.5
php-src/ext/mysqlnd/mysqlnd_portability.h:1.4.2.6
--- php-src/ext/mysqlnd/mysqlnd_portability.h:1.4.2.5 Wed Jan 23 19:11:28 2008
+++ php-src/ext/mysqlnd/mysqlnd_portability.h Fri Oct 31 20:32:17 2008
@@ -61,36 +61,36 @@
/* Typdefs for easyier portability */
-#ifndef HAVE_INT8
#ifndef HAVE_INT8_T
-typedef signed char int8; /* Signed integer >= 8 bits
*/
+#ifndef HAVE_INT8
+typedef signed char int8_t; /* Signed integer >= 8 bits
*/
#else
-typedef int8_t int8; /* Signed integer >= 8 bits
*/
+typedef int8 int8_t; /* Signed integer >= 8 bits
*/
#endif
#endif
-#ifndef HAVE_UINT8
#ifndef HAVE_UINT8_T
-typedef unsigned char uint8; /* Unsigned integer >= 8 bits */
+#ifndef HAVE_UINT8
+typedef unsigned char uint8_t; /* Unsigned integer >= 8 bits */
#else
-typedef uint8_t uint8; /* Signed integer >= 8 bits
*/
+typedef uint8 uint8_t; /* Signed integer >= 8 bits
*/
#endif
#endif
-#ifndef HAVE_INT16
#ifndef HAVE_INT16_T
-typedef signed short int16; /* Signed integer >= 16 bits */
+#ifndef HAVE_INT16
+typedef signed short int16_t; /* Signed integer >= 16 bits */
#else
-typedef int16_t int16; /* Signed integer >= 16 bits */
+typedef int16 int16_t; /* Signed integer >= 16 bits */
#endif
#endif
-#ifndef HAVE_UINT16
#ifndef HAVE_UINT16_T
-typedef unsigned short uint16; /* Signed integer >= 16 bits */
+#ifndef HAVE_UINT16
+typedef unsigned short uint16_t; /* Signed integer >= 16 bits */
#else
-typedef uint16_t uint16; /* Signed integer >= 16 bits */
+typedef uint16 uint16_t; /* Signed integer >= 16 bits */
#endif
#endif
@@ -98,134 +98,136 @@
typedef unsigned char uchar; /* Short for unsigned char */
#endif
-#ifndef HAVE_INT32
-#ifdef HAVE_INT32_T
-typedef int32_t int32;
+#ifndef HAVE_INT32_T
+#ifdef HAVE_INT32
+typedef int32 int32_t;
#elif SIZEOF_INT == 4
-typedef signed int int32;
+typedef signed int int32_t;
#elif SIZEOF_LONG == 4
-typedef signed long int32;
+typedef signed long int32_t;
#else
error "Neither int nor long is of 4 bytes width"
#endif
-#endif /* HAVE_INT32 */
+#endif /* HAVE_INT32_T */
-#ifndef HAVE_UINT32
-#ifdef HAVE_UINT32_T
-typedef uint32_t uint32;
+#ifndef HAVE_UINT32_T
+#ifdef HAVE_UINT32
+typedef uint32 uint32_t;
#elif SIZEOF_INT == 4
-typedef unsigned int uint32;
+typedef unsigned int uint32_t;
#elif SIZEOF_LONG == 4
-typedef unsigned long uint32;
+typedef unsigned long uint32_t;
#else
#error "Neither int nor long is of 4 bytes width"
#endif
-#endif /* HAVE_UINT32 */
+#endif /* HAVE_UINT32_T */
-#ifndef HAVE_INT64
-#ifdef HAVE_INT64_T
-typedef int64_t int64;
+#ifndef HAVE_INT64_T
+#ifdef HAVE_INT64
+typedef int64 int64_t;
#elif SIZEOF_INT == 8
-typedef signed int int64;
+typedef signed int int64_t;
#elif SIZEOF_LONG == 8
-typedef signed long int64;
+typedef signed long int64_t;
#elif SIZEOF_LONG_LONG == 8
#ifdef PHP_WIN32
-typedef __int64 int64;
+typedef __int64 int64_t;
#else
-typedef signed long long int64;
+typedef signed long long int64_t;
#endif
#else
#error "Neither int nor long nor long long is of 8 bytes width"
#endif
-#endif /* HAVE_INT64 */
+#endif /* HAVE_INT64_T */
-#ifndef HAVE_UINT64
-#ifdef HAVE_UINT64_T
-typedef uint64_t uint64;
+#ifndef HAVE_UINT64_T
+#ifdef HAVE_UINT64
+typedef uint64 uint64_t;
#elif SIZEOF_INT == 8
-typedef unsigned int uint64;
+typedef unsigned int uint64_t;
#elif SIZEOF_LONG == 8
-typedef unsigned long uint64;
+typedef unsigned long uint64_t;
#elif SIZEOF_LONG_LONG == 8
#ifdef PHP_WIN32
-typedef unsigned __int64 uint64;
+typedef unsigned __int64 uint64_t;
#else
-typedef unsigned long long uint64;
+typedef unsigned long long uint64_t;
#endif
#else
#error "Neither int nor long nor long long is of 8 bytes width"
#endif
-#endif /* HAVE_INT64 */
+#endif /* HAVE_INT64_T */
#ifdef PHP_WIN32
#define MYSQLND_LLU_SPEC "%I64u"
#define MYSQLND_LL_SPEC "%I64d"
+#define MYSQLND_SZ_T_SPEC "%Id"
#ifndef L64
#define L64(x) x##i64
#endif
#else
#define MYSQLND_LLU_SPEC "%llu"
#define MYSQLND_LL_SPEC "%lld"
+#define MYSQLND_SZ_T_SPEC "%zd"
#ifndef L64
#define L64(x) x##LL
#endif
#endif
-typedef int64 longlong;
-typedef uint64 ulonglong;
+typedef int64_t longlong;
+typedef uint64_t ulonglong;
#define int1store(T,A) do { *((zend_uchar*) (T)) = (A); } while(0)
-#define uint1korr(A) (*(((uint8*)(A))))
+#define uint1korr(A) (*(((uint8_t*)(A))))
/* Bit values are sent in reverted order of bytes, compared to normal !!! */
-#define bit_uint2korr(A) ((uint16) (((uint16) (((uchar*) (A))[1])) +\
-
((uint16) (((uchar*) (A))[0]) << 8)))
-#define bit_uint3korr(A) ((uint32) (((uint32) (((uchar*) (A))[2])) +\
-
(((uint32) (((uchar*) (A))[1])) << 8) +\
-
(((uint32) (((uchar*) (A))[0])) << 16)))
-
-#define bit_uint4korr(A) ((uint32) (((uint32) (((uchar*) (A))[3])) +\
-
(((uint32) (((uchar*) (A))[2])) << 8) +\
-
(((uint32) (((uchar*) (A))[1])) << 16) +\
-
(((uint32) (((uchar*) (A))[0])) << 24)))
-
-#define bit_uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[4])) +\
- (((uint32) ((uchar) (A)[3])) << 8) +\
- (((uint32) ((uchar) (A)[2])) << 16) +\
- (((uint32) ((uchar) (A)[1])) << 24)) +\
+#define bit_uint2korr(A) ((uint16_t) (((uint16_t) (((uchar*) (A))[1])) +\
+
((uint16_t) (((uchar*) (A))[0]) << 8)))
+#define bit_uint3korr(A) ((uint32_t) (((uint32_t) (((uchar*) (A))[2])) +\
+
(((uint32_t) (((uchar*) (A))[1])) << 8) +\
+
(((uint32_t) (((uchar*) (A))[0])) << 16)))
+
+#define bit_uint4korr(A) ((uint32_t) (((uint32_t) (((uchar*) (A))[3])) +\
+
(((uint32_t) (((uchar*) (A))[2])) << 8) +\
+
(((uint32_t) (((uchar*) (A))[1])) << 16) +\
+
(((uint32_t) (((uchar*) (A))[0])) << 24)))
+
+#define bit_uint5korr(A) ((ulonglong)(((uint32_t) ((uchar) (A)[4])) +\
+ (((uint32_t) ((uchar) (A)[3])) << 8) +\
+ (((uint32_t) ((uchar) (A)[2])) << 16) +\
+ (((uint32_t) ((uchar) (A)[1])) << 24)) +\
(((ulonglong) ((uchar) (A)[0])) << 32))
-#define bit_uint6korr(A) ((ulonglong)(((uint32) (((uchar*) (A))[5])) +\
-
(((uint32) (((uchar*) (A))[4])) << 8) +\
-
(((uint32) (((uchar*) (A))[3])) << 16) +\
-
(((uint32) (((uchar*) (A))[2])) << 24)) +\
-
(((ulonglong) (((uint32) (((uchar*) (A))[1])) +\
-
(((uint32) (((uchar*) (A))[0]) << 8)))) << 32))
-
-#define bit_uint7korr(A) ((ulonglong)(((uint32) (((uchar*) (A))[6])) +\
-
(((uint32) (((uchar*) (A))[5])) << 8) +\
-
(((uint32) (((uchar*) (A))[4])) << 16) +\
-
(((uint32) (((uchar*) (A))[3])) << 24)) +\
-
(((ulonglong) (((uint32) (((uchar*) (A))[2])) +\
-
(((uint32) (((uchar*) (A))[1])) << 8) +\
-
(((uint32) (((uchar*) (A))[0])) << 16))) << 32))
-
-
-#define bit_uint8korr(A) ((ulonglong)(((uint32) (((uchar*) (A))[7])) +\
-
(((uint32) (((uchar*) (A))[6])) << 8) +\
-
(((uint32) (((uchar*) (A))[5])) << 16) +\
-
(((uint32) (((uchar*) (A))[4])) << 24)) +\
-
(((ulonglong) (((uint32) (((uchar*) (A))[3])) +\
-
(((uint32) (((uchar*) (A))[2])) << 8) +\
-
(((uint32) (((uchar*) (A))[1])) << 16) +\
-
(((uint32) (((uchar*) (A))[0])) << 24))) << 32))
+#define bit_uint6korr(A) ((ulonglong)(((uint32_t) (((uchar*) (A))[5])) +\
+
(((uint32_t) (((uchar*) (A))[4])) << 8) +\
+
(((uint32_t) (((uchar*) (A))[3])) << 16) +\
+
(((uint32_t) (((uchar*) (A))[2])) << 24)) +\
+
(((ulonglong) (((uint32_t) (((uchar*) (A))[1])) +\
+
(((uint32_t) (((uchar*) (A))[0]) << 8)))) << 32))
+
+#define bit_uint7korr(A) ((ulonglong)(((uint32_t) (((uchar*) (A))[6])) +\
+
(((uint32_t) (((uchar*) (A))[5])) << 8) +\
+
(((uint32_t) (((uchar*) (A))[4])) << 16) +\
+
(((uint32_t) (((uchar*) (A))[3])) << 24)) +\
+
(((ulonglong) (((uint32_t) (((uchar*) (A))[2])) +\
+
(((uint32_t) (((uchar*) (A))[1])) << 8) +\
+
(((uint32_t) (((uchar*) (A))[0])) << 16))) << 32))
+
+
+#define bit_uint8korr(A) ((ulonglong)(((uint32_t) (((uchar*) (A))[7])) +\
+
(((uint32_t) (((uchar*) (A))[6])) << 8) +\
+
(((uint32_t) (((uchar*) (A))[5])) << 16) +\
+
(((uint32_t) (((uchar*) (A))[4])) << 24)) +\
+
(((ulonglong) (((uint32_t) (((uchar*) (A))[3])) +\
+
(((uint32_t) (((uchar*) (A))[2])) << 8) +\
+
(((uint32_t) (((uchar*) (A))[1])) << 16) +\
+
(((uint32_t) (((uchar*) (A))[0])) << 24))) << 32))
/*
@@ -235,31 +237,31 @@
/* Optimized store functions for Intel x86, non-valid for WIN64 */
#if defined(__i386__) && !defined(_WIN64)
-#define sint2korr(A) (*((int16 *) (A)))
-#define sint3korr(A) ((int32) ((((uchar) (A)[2]) & 128) ? \
- (((uint32) 255L << 24) | \
- (((uint32) (uchar) (A)[2]) << 16) |\
- (((uint32) (uchar) (A)[1]) << 8) | \
- ((uint32) (uchar) (A)[0])) : \
- (((uint32) (uchar) (A)[2]) << 16) |\
- (((uint32) (uchar) (A)[1]) << 8) | \
- ((uint32) (uchar) (A)[0])))
+#define sint2korr(A) (*((int16_t *) (A)))
+#define sint3korr(A) ((int32_t) ((((uchar) (A)[2]) & 128) ? \
+ (((uint32_t) 255L << 24) | \
+ (((uint32_t) (uchar) (A)[2]) << 16) |\
+ (((uint32_t) (uchar) (A)[1]) << 8) | \
+ ((uint32_t) (uchar) (A)[0])) : \
+ (((uint32_t) (uchar) (A)[2]) << 16) |\
+ (((uint32_t) (uchar) (A)[1]) << 8) | \
+ ((uint32_t) (uchar) (A)[0])))
#define sint4korr(A) (*((long *) (A)))
-#define uint2korr(A) (*((uint16 *) (A)))
-#define uint3korr(A) (uint32) (((uint32) ((uchar) (A)[0])) +\
- (((uint32) ((uchar) (A)[1])) << 8) +\
- (((uint32) ((uchar) (A)[2])) << 16))
+#define uint2korr(A) (*((uint16_t *) (A)))
+#define uint3korr(A) (uint32_t) (((uint32_t) ((uchar) (A)[0])) +\
+ (((uint32_t) ((uchar) (A)[1])) << 8) +\
+ (((uint32_t) ((uchar) (A)[2])) << 16))
#define uint4korr(A) (*((unsigned long *) (A)))
#define uint8korr(A) (*((ulonglong *) (A)))
#define sint8korr(A) (*((longlong *) (A)))
-#define int2store(T,A) *((uint16*) (T))= (uint16) (A)
+#define int2store(T,A) *((uint16_t*) (T))= (uint16_t) (A)
#define int3store(T,A) { \
*(T)= (uchar) ((A));\
- *(T+1)=(uchar) (((uint) (A) >> 8));\
+ *(T+1)=(uchar) (((uint32_t) (A) >> 8));\
*(T+2)=(uchar) (((A) >> 16)); }
#define int4store(T,A) *((long *) (T))= (long) (A)
#define int5store(T,A) { \
@@ -278,7 +280,7 @@
*(((uchar *)(T))+4))=(uchar) (((A) >> 32)); \
*(((uchar *)(T))+5))=(uchar) (((A) >> 40)); }
-#define int8store(T,A) *((ulonglong *) (T))= (ulonglong) (A)
+#define int8_tstore(T,A) *((ulonglong *) (T))= (ulonglong) (A)
typedef union {
double v;
@@ -298,53 +300,53 @@
#endif /* __i386__ */
#ifndef sint2korr
-#define sint2korr(A) (int16) (((int16) ((uchar) (A)[0])) +\
- ((int16) ((int16) (A)[1]) << 8))
-#define sint3korr(A) ((int32) ((((uchar) (A)[2]) & 128) ? \
- (((uint32) 255L << 24) | \
- (((uint32) (uchar) (A)[2]) << 16) |\
- (((uint32) (uchar) (A)[1]) << 8) | \
- ((uint32) (uchar) (A)[0])) : \
- (((uint32) (uchar) (A)[2]) << 16) |\
- (((uint32) (uchar) (A)[1]) << 8) | \
- ((uint32) (uchar) (A)[0])))
-#define sint4korr(A) (int32) (((int32) ((uchar) (A)[0])) +\
- (((int32) ((uchar) (A)[1]) << 8)) +\
- (((int32) ((uchar) (A)[2]) << 16)) +\
- (((int32) ((int16) (A)[3]) << 24)))
+#define sint2korr(A) (int16_t) (((int16_t) ((uchar) (A)[0])) +\
+ ((int16_t) ((int16_t) (A)[1]) << 8))
+#define sint3korr(A) ((int32_t) ((((uchar) (A)[2]) & 128) ? \
+ (((uint32_t) 255L << 24) | \
+ (((uint32_t) (uchar) (A)[2]) << 16) |\
+ (((uint32_t) (uchar) (A)[1]) << 8) | \
+ ((uint32_t) (uchar) (A)[0])) : \
+ (((uint32_t) (uchar) (A)[2]) << 16) |\
+ (((uint32_t) (uchar) (A)[1]) << 8) | \
+ ((uint32_t) (uchar) (A)[0])))
+#define sint4korr(A) (int32_t) (((int32_t) ((uchar) (A)[0])) +\
+ (((int32_t) ((uchar) (A)[1]) << 8)) +\
+ (((int32_t) ((uchar) (A)[2]) << 16)) +\
+ (((int32_t) ((int16_t) (A)[3]) << 24)))
#define sint8korr(A) (longlong) uint8korr(A)
-#define uint2korr(A) (uint16) (((uint16) ((uchar) (A)[0])) +\
- ((uint16) ((uchar) (A)[1]) << 8))
-#define uint3korr(A) (uint32) (((uint32) ((uchar) (A)[0])) +\
- (((uint32) ((uchar) (A)[1])) << 8) +\
- (((uint32) ((uchar) (A)[2])) << 16))
-#define uint4korr(A) (uint32) (((uint32) ((uchar) (A)[0])) +\
- (((uint32) ((uchar) (A)[1])) << 8) +\
- (((uint32) ((uchar) (A)[2])) << 16) +\
- (((uint32) ((uchar) (A)[3])) << 24))
-
-
-#define bit_uint8korr(A) ((ulonglong)(((uint32) (((uchar*) (A))[7])) +\
-
(((uint32) (((uchar*) (A))[6])) << 8) +\
-
(((uint32) (((uchar*) (A))[5])) << 16) +\
-
(((uint32) (((uchar*) (A))[4])) << 24)) +\
-
(((ulonglong) (((uint32) (((uchar*) (A))[3])) +\
-
(((uint32) (((uchar*) (A))[2])) << 8) +\
-
(((uint32) (((uchar*) (A))[1])) << 16) +\
-
(((uint32) (((uchar*) (A))[0])) << 24))) << 32))
-
-#define uint8korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\
-
(((uint32) ((uchar) (A)[1])) << 8) +\
-
(((uint32) ((uchar) (A)[2])) << 16) +\
-
(((uint32) ((uchar) (A)[3])) << 24)) +\
-
(((ulonglong) (((uint32) ((uchar) (A)[4])) +\
-
(((uint32) ((uchar) (A)[5])) << 8) +\
-
(((uint32) ((uchar) (A)[6])) << 16) +\
-
(((uint32) ((uchar) (A)[7])) << 24))) << 32))
+#define uint2korr(A) (uint16_t) (((uint16_t) ((uchar) (A)[0])) +\
+ ((uint16_t) ((uchar) (A)[1]) << 8))
+#define uint3korr(A) (uint32_t) (((uint32_t) ((uchar) (A)[0])) +\
+ (((uint32_t) ((uchar) (A)[1])) << 8) +\
+ (((uint32_t) ((uchar) (A)[2])) << 16))
+#define uint4korr(A) (uint32_t) (((uint32_t) ((uchar) (A)[0])) +\
+ (((uint32_t) ((uchar) (A)[1])) << 8) +\
+ (((uint32_t) ((uchar) (A)[2])) << 16) +\
+ (((uint32_t) ((uchar) (A)[3])) << 24))
+
+
+#define bit_uint8korr(A) ((ulonglong)(((uint32_t) (((uchar*) (A))[7])) +\
+
(((uint32_t) (((uchar*) (A))[6])) << 8) +\
+
(((uint32_t) (((uchar*) (A))[5])) << 16) +\
+
(((uint32_t) (((uchar*) (A))[4])) << 24)) +\
+
(((ulonglong) (((uint32_t) (((uchar*) (A))[3])) +\
+
(((uint32_t) (((uchar*) (A))[2])) << 8) +\
+
(((uint32_t) (((uchar*) (A))[1])) << 16) +\
+
(((uint32_t) (((uchar*) (A))[0])) << 24))) << 32))
+
+#define uint8korr(A) ((ulonglong)(((uint32_t) ((uchar) (A)[0])) +\
+
(((uint32_t) ((uchar) (A)[1])) << 8) +\
+
(((uint32_t) ((uchar) (A)[2])) << 16) +\
+
(((uint32_t) ((uchar) (A)[3])) << 24)) +\
+
(((ulonglong) (((uint32_t) ((uchar) (A)[4])) +\
+
(((uint32_t) ((uchar) (A)[5])) << 8) +\
+
(((uint32_t) ((uchar) (A)[6])) << 16) +\
+
(((uint32_t) ((uchar) (A)[7])) << 24))) << 32))
-#define int2store(T,A) do { uint def_temp= (uint) (A) ;\
+#define int2store(T,A) do { uint32_t def_temp= (uint32_t) (A) ;\
*((uchar*) (T)) = (uchar)(def_temp); \
*((uchar*) (T+1)) = (uchar)((def_temp >> 8)); } while (0)
#define int3store(T,A) do { /*lint -save -e734 */\
@@ -371,7 +373,7 @@
*(((char *)(T))+3) = (char)(((A) >> 24)); \
*(((char *)(T))+4) = (char)(((A) >> 32)); \
*(((char *)(T))+5) = (char)(((A) >> 40)); } while (0)
-#define int8store(T,A) { uint def_temp= (uint) (A), def_temp2= (uint)
((A) >> 32); \
+#define int8store(T,A) { uint32_t def_temp= (uint32_t) (A), def_temp2=
(uint32_t) ((A) >> 32); \
int4store((T),def_temp); \
int4store((T+4),def_temp2); \
}
@@ -447,24 +449,24 @@
#ifdef WORDS_BIGENDIAN
-#define ushortget(V,M) { V = (uint16) (((uint16) ((uchar) (M)[1]))+\
- ((uint16) ((uint16) (M)[0]) << 8)); }
-#define shortget(V,M) { V = (short) (((short) ((uchar) (M)[1]))+\
- ((short) ((short) (M)[0]) << 8)); }
-#define longget(V,M) do { int32 def_temp;\
+#define ushortget(V,M) { V = (uint16_t) (((uint16_t) ((uchar) (M)[1]))+\
+ ((uint16_t) ((uint16_t) (M)[0]) <<
8)); }
+#define shortget(V,M) { V = (int16_t) (((int16_t) ((uchar) (M)[1]))+\
+ ((int16_t) ((int16_t) (M)[0]) << 8)); }
+#define longget(V,M) do { int32_t def_temp;\
((char*) &def_temp)[0]=(M)[0];\
((char*) &def_temp)[1]=(M)[1];\
((char*) &def_temp)[2]=(M)[2];\
((char*) &def_temp)[3]=(M)[3];\
(V)=def_temp; } while (0)
-#define ulongget(V,M) do { uint32 def_temp;\
+#define ulongget(V,M) do { uint32_t def_temp;\
((char*) &def_temp)[0]=(M)[0];\
((char*) &def_temp)[1]=(M)[1];\
((char*) &def_temp)[2]=(M)[2];\
((char*) &def_temp)[3]=(M)[3];\
(V)=def_temp; } while (0)
#define shortstore(T,A) do { \
- uint def_temp=(uint) (A) ;\
+ uint32_t def_temp=(uint32_t) (A) ;\
*(((char *)(T))+1)=(char)(def_temp); \
*(((char *)(T))+0)=(char)(def_temp >> 8); } while (0)
#define longstore(T,A) do { \
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_priv.h?r1=1.4.2.13&r2=1.4.2.14&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_priv.h
diff -u php-src/ext/mysqlnd/mysqlnd_priv.h:1.4.2.13
php-src/ext/mysqlnd/mysqlnd_priv.h:1.4.2.14
--- php-src/ext/mysqlnd/mysqlnd_priv.h:1.4.2.13 Tue Aug 19 10:42:11 2008
+++ php-src/ext/mysqlnd/mysqlnd_priv.h Fri Oct 31 20:32:17 2008
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mysqlnd_priv.h,v 1.4.2.13 2008/08/19 10:42:11 johannes Exp $ */
+/* $Id: mysqlnd_priv.h,v 1.4.2.14 2008/10/31 20:32:17 andrey Exp $ */
#ifndef MYSQLND_PRIV_H
#define MYSQLND_PRIV_H
@@ -98,7 +98,7 @@
#define MAX_CHARSET_LEN 32
-#define SET_ERROR_AFF_ROWS(s) (s)->upsert_status.affected_rows = (uint64) ~0
+#define SET_ERROR_AFF_ROWS(s) (s)->upsert_status.affected_rows = (uint64_t) ~0
/* Error handling */
#define SET_NEW_MESSAGE(buf, buf_len, message, len, persistent) \
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_ps.c?r1=1.3.2.19&r2=1.3.2.20&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_ps.c
diff -u php-src/ext/mysqlnd/mysqlnd_ps.c:1.3.2.19
php-src/ext/mysqlnd/mysqlnd_ps.c:1.3.2.20
--- php-src/ext/mysqlnd/mysqlnd_ps.c:1.3.2.19 Mon Oct 27 17:21:22 2008
+++ php-src/ext/mysqlnd/mysqlnd_ps.c Fri Oct 31 20:32:17 2008
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mysqlnd_ps.c,v 1.3.2.19 2008/10/27 17:21:22 johannes Exp $ */
+/* $Id: mysqlnd_ps.c,v 1.3.2.20 2008/10/31 20:32:17 andrey Exp $ */
#include "php.h"
#include "mysqlnd.h"
#include "mysqlnd_wireprotocol.h"
@@ -724,7 +724,7 @@
zval **current_row = set->data_cursor;
if (NULL == current_row[0]) {
- uint64 row_num = (set->data_cursor - set->data)
/ field_count;
+ uint64_t row_num = (set->data_cursor -
set->data) / field_count;
set->initialized_rows++;
result->m.row_decoder(set->row_buffers[row_num],
current_row,
@@ -1284,7 +1284,7 @@
php_error_docref(NULL TSRMLS_CC, E_WARNING, "There was
an error "
"while sending long
data. Probably max_allowed_packet_size "
"is smaller than the
data. You have to increase it or send "
- "smaller chunks of
data. Answer was %u bytes long.", packet_len);
+ "smaller chunks of
data. Answer was "MYSQLND_SZ_T_SPEC" bytes long.", packet_len);
SET_STMT_ERROR(stmt, CR_CONNECTION_ERROR,
UNKNOWN_SQLSTATE,
"Server responded to
COM_STMT_SEND_LONG_DATA.");
ret = FAIL;
@@ -1564,7 +1564,7 @@
/* {{{ mysqlnd_stmt::insert_id */
-static uint64
+static uint64_t
MYSQLND_METHOD(mysqlnd_stmt, insert_id)(const MYSQLND_STMT * const stmt)
{
return stmt->upsert_status.last_insert_id;
@@ -1573,7 +1573,7 @@
/* {{{ mysqlnd_stmt::affected_rows */
-static uint64
+static uint64_t
MYSQLND_METHOD(mysqlnd_stmt, affected_rows)(const MYSQLND_STMT * const stmt)
{
return stmt->upsert_status.affected_rows;
@@ -1582,7 +1582,7 @@
/* {{{ mysqlnd_stmt::num_rows */
-static uint64
+static uint64_t
MYSQLND_METHOD(mysqlnd_stmt, num_rows)(const MYSQLND_STMT * const stmt)
{
return stmt->result? mysqlnd_num_rows(stmt->result):0;
@@ -1646,7 +1646,7 @@
/* {{{ mysqlnd_stmt::data_seek */
static enum_func_status
-MYSQLND_METHOD(mysqlnd_stmt, data_seek)(const MYSQLND_STMT * const stmt,
uint64 row TSRMLS_DC)
+MYSQLND_METHOD(mysqlnd_stmt, data_seek)(const MYSQLND_STMT * const stmt,
uint64_t row TSRMLS_DC)
{
return stmt->result? stmt->result->m.seek_data(stmt->result, row
TSRMLS_CC) : FAIL;
}
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_ps_codec.c?r1=1.3.2.10&r2=1.3.2.11&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_ps_codec.c
diff -u php-src/ext/mysqlnd/mysqlnd_ps_codec.c:1.3.2.10
php-src/ext/mysqlnd/mysqlnd_ps_codec.c:1.3.2.11
--- php-src/ext/mysqlnd/mysqlnd_ps_codec.c:1.3.2.10 Tue Jul 22 16:06:08 2008
+++ php-src/ext/mysqlnd/mysqlnd_ps_codec.c Fri Oct 31 20:32:17 2008
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mysqlnd_ps_codec.c,v 1.3.2.10 2008/07/22 16:06:08 andrey Exp $ */
+/* $Id: mysqlnd_ps_codec.c,v 1.3.2.11 2008/10/31 20:32:17 andrey Exp $ */
#include "php.h"
#include "mysqlnd.h"
#include "mysqlnd_wireprotocol.h"
@@ -28,17 +28,6 @@
#define MYSQLND_SILENT
-
-typedef int8 my_int8;
-typedef uint8 my_uint8;
-
-typedef int16 my_int16;
-typedef uint16 my_uint16;
-
-typedef int32 my_int32;
-typedef uint32 my_uint32;
-
-
enum mysqlnd_timestamp_type
{
MYSQLND_TIMESTAMP_NONE= -2,
@@ -58,7 +47,6 @@
};
-
struct st_mysqlnd_perm_bind mysqlnd_ps_fetch_functions[MYSQL_TYPE_LAST + 1];
#define MYSQLND_PS_SKIP_RESULT_W_LEN -1
@@ -75,17 +63,17 @@
DBG_ENTER("ps_fetch_from_1_to_8_bytes");
DBG_INF_FMT("zv=%p byte_count=%d", zv, byte_count);
if (field->flags & UNSIGNED_FLAG) {
- uint64 uval = 0;
+ uint64_t uval = 0;
switch (byte_count) {
- case 8:uval = is_bit? (uint64)
bit_uint8korr(*row):(uint64) uint8korr(*row);break;
+ case 8:uval = is_bit? (uint64_t)
bit_uint8korr(*row):(uint64_t) uint8korr(*row);break;
case 7:uval = bit_uint7korr(*row);break;
case 6:uval = bit_uint6korr(*row);break;
case 5:uval = bit_uint5korr(*row);break;
- case 4:uval = is_bit? (uint64)
bit_uint4korr(*row):(uint64) uint4korr(*row);break;
- case 3:uval = is_bit? (uint64)
bit_uint3korr(*row):(uint64) uint3korr(*row);break;
- case 2:uval = is_bit? (uint64)
bit_uint2korr(*row):(uint64) uint2korr(*row);break;
- case 1:uval = (uint64) uint1korr(*row);break;
+ case 4:uval = is_bit? (uint64_t)
bit_uint4korr(*row):(uint64_t) uint4korr(*row);break;
+ case 3:uval = is_bit? (uint64_t)
bit_uint3korr(*row):(uint64_t) uint3korr(*row);break;
+ case 2:uval = is_bit? (uint64_t)
bit_uint2korr(*row):(uint64_t) uint2korr(*row);break;
+ case 1:uval = (uint64_t) uint1korr(*row);break;
}
#if SIZEOF_LONG==4
@@ -104,21 +92,21 @@
}
} else {
/* SIGNED */
- int64 lval = 0;
+ int64_t lval = 0;
switch (byte_count) {
- case 8:lval = (int64) sint8korr(*row);break;
+ case 8:lval = (int64_t) sint8korr(*row);break;
/*
7, 6 and 5 are not possible.
BIT is only unsigned, thus only uint5|6|7 macroses
exist
*/
- case 4:lval = (int64) sint4korr(*row);break;
- case 3:lval = (int64) sint3korr(*row);break;
- case 2:lval = (int64) sint2korr(*row);break;
- case 1:lval = (int64) *(my_int8*)*row;break;
+ case 4:lval = (int64_t) sint4korr(*row);break;
+ case 3:lval = (int64_t) sint3korr(*row);break;
+ case 2:lval = (int64_t) sint2korr(*row);break;
+ case 1:lval = (int64_t) *(int8_t*)*row;break;
}
#if SIZEOF_LONG==4
- if ((L64(2147483647) < (int64) lval) || (L64(-2147483648) > (int64)
lval)) {
+ if ((L64(2147483647) < (int64_t) lval) || (L64(-2147483648) >
(int64_t) lval)) {
DBG_INF("stringify");
tmp_len = sprintf((char *)&tmp, MYSQLND_LL_SPEC, lval);
} else
@@ -609,8 +597,8 @@
size_t
*buf_len, unsigned int null_byte_offset TSRMLS_DC)
{
unsigned int i = 0;
- unsigned left = (*buf_len - (*p - *buf));
- unsigned int data_size = 0;
+ size_t left = (*buf_len - (*p - *buf));
+ size_t data_size = 0;
zval **copies = NULL;/* if there are different types */
/* 1. Store type information */
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_result.c?r1=1.4.2.21&r2=1.4.2.22&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_result.c
diff -u php-src/ext/mysqlnd/mysqlnd_result.c:1.4.2.21
php-src/ext/mysqlnd/mysqlnd_result.c:1.4.2.22
--- php-src/ext/mysqlnd/mysqlnd_result.c:1.4.2.21 Mon Oct 27 15:14:17 2008
+++ php-src/ext/mysqlnd/mysqlnd_result.c Fri Oct 31 20:32:17 2008
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mysqlnd_result.c,v 1.4.2.21 2008/10/27 15:14:17 andrey Exp $ */
+/* $Id: mysqlnd_result.c,v 1.4.2.22 2008/10/31 20:32:17 andrey Exp $ */
#include "php.h"
#include "mysqlnd.h"
#include "mysqlnd_wireprotocol.h"
@@ -1030,7 +1030,7 @@
unsigned int i;
if (NULL == current_row[0]) {
- uint64 row_num = (set->data_cursor - set->data) /
result->meta->field_count;
+ uint64_t row_num = (set->data_cursor - set->data) /
result->meta->field_count;
set->initialized_rows++;
result->m.row_decoder(set->row_buffers[row_num],
current_row,
@@ -1096,7 +1096,7 @@
struct mysqlnd_field_hash_key *zend_hash_key =
result->meta->zend_hash_keys;
if (NULL == current_row[0]) {
- uint64 row_num = (set->data_cursor - set->data) /
result->meta->field_count;
+ uint64_t row_num = (set->data_cursor - set->data) /
result->meta->field_count;
set->initialized_rows++;
result->m.row_decoder(set->row_buffers[row_num],
current_row,
@@ -1220,7 +1220,7 @@
while (FAIL != (ret = PACKET_READ(row_packet, conn)) &&
!row_packet->eof) {
if (!free_rows) {
- uint64 total_allocated_rows = free_rows = next_extend =
next_extend * 11 / 10; /* extend with 10% */
+ uint64_t total_allocated_rows = free_rows = next_extend
= next_extend * 11 / 10; /* extend with 10% */
total_allocated_rows += set->row_count;
set->row_buffers = mnd_perealloc(set->row_buffers,
total_allocated_rows * sizeof(MYSQLND_MEMORY_POOL_CHUNK *),
@@ -1361,7 +1361,7 @@
/* At the point we are still under LOCK */
if (set->data_cursor && (set->data_cursor - set->data) <
(set->row_count)) {
- uint64 row_num = set->data_cursor - set->data;
+ uint64_t row_num = set->data_cursor - set->data;
zval **current_row = *set->data_cursor++;
set->initialized_rows++;
/* We don't forget to release the lock */
@@ -1482,8 +1482,8 @@
while (FAIL != (ret = PACKET_READ(row_packet, conn)) &&
!row_packet->eof) {
tsrm_mutex_lock(set->LOCK);
if (!free_rows) {
- uint64 total_rows = free_rows = next_extend =
next_extend * 5 / 3; /* extend with 33% */
- uint64 old_size;
+ uint64_t total_rows = free_rows = next_extend =
next_extend * 5 / 3; /* extend with 33% */
+ uint64_t old_size;
total_rows += set->row_count;
old_size = set->data_size;
@@ -1698,7 +1698,7 @@
/* {{{ mysqlnd_res::data_seek */
static enum_func_status
-MYSQLND_METHOD(mysqlnd_res, data_seek)(MYSQLND_RES *result, uint64 row
TSRMLS_DC)
+MYSQLND_METHOD(mysqlnd_res, data_seek)(MYSQLND_RES *result, uint64_t row
TSRMLS_DC)
{
DBG_ENTER("mysqlnd_res::data_seek");
DBG_INF_FMT("row=%lu", row);
@@ -1720,7 +1720,7 @@
/* {{{ mysqlnd_res::num_rows */
-static uint64
+static uint64_t
MYSQLND_METHOD(mysqlnd_res, num_rows)(const MYSQLND_RES * const result)
{
/* Be compatible with libmysql. We count row_count, but will return 0 */
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_statistics.h?r1=1.4.2.10&r2=1.4.2.11&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_statistics.h
diff -u php-src/ext/mysqlnd/mysqlnd_statistics.h:1.4.2.10
php-src/ext/mysqlnd/mysqlnd_statistics.h:1.4.2.11
--- php-src/ext/mysqlnd/mysqlnd_statistics.h:1.4.2.10 Tue Sep 16 14:35:01 2008
+++ php-src/ext/mysqlnd/mysqlnd_statistics.h Fri Oct 31 20:32:17 2008
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mysqlnd_statistics.h,v 1.4.2.10 2008/09/16 14:35:01 andrey Exp $ */
+/* $Id: mysqlnd_statistics.h,v 1.4.2.11 2008/10/31 20:32:17 andrey Exp $ */
#ifndef MYSQLND_STATISTICS_H
#define MYSQLND_STATISTICS_H
@@ -62,8 +62,8 @@
#define MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(statistic1, value1, statistic2,
value2) \
{ \
if (MYSQLND_G(collect_statistics)) { \
- uint64 v1 = (uint64) (value1); \
- uint64 v2 = (uint64) (value2); \
+ uint64_t v1 = (uint64_t) (value1); \
+ uint64_t v2 = (uint64_t) (value2); \
DBG_INF_FMT("Global stat increase [%s] [%s]",
mysqlnd_stats_values_names[statistic1],
mysqlnd_stats_values_names[statistic2]); \
\
tsrm_mutex_lock(mysqlnd_global_stats->LOCK_access); \
@@ -89,7 +89,7 @@
#define MYSQLND_INC_CONN_STATISTIC_W_VALUE(conn_stats, statistic, value) \
{ \
if (MYSQLND_G(collect_statistics) && statistic != STAT_LAST) { \
- uint64 v = (uint64) (value); \
+ uint64_t v = (uint64_t) (value); \
DBG_INF_FMT("Global&Conn stat increase w value [%s]",
mysqlnd_stats_values_names[statistic]); \
tsrm_mutex_lock(mysqlnd_global_stats->LOCK_access); \
mysqlnd_global_stats->values[(statistic)] += v; \
@@ -103,8 +103,8 @@
#define MYSQLND_INC_CONN_STATISTIC_W_VALUE2(conn_stats, statistic1, value1,
statistic2, value2) \
{ \
if (MYSQLND_G(collect_statistics)) { \
- uint64 v1 = (uint64) (value1); \
- uint64 v2 = (uint64) (value2); \
+ uint64_t v1 = (uint64_t) (value1); \
+ uint64_t v2 = (uint64_t) (value2); \
\
tsrm_mutex_lock(mysqlnd_global_stats->LOCK_access); \
if (statistic1 != STAT_LAST)
mysqlnd_global_stats->values[(statistic1)]+= v1; \
@@ -121,9 +121,9 @@
#define MYSQLND_INC_CONN_STATISTIC_W_VALUE3(conn_stats, statistic1, value1,
statistic2, value2, statistic3, value3) \
{ \
if (MYSQLND_G(collect_statistics)) { \
- uint64 v1 = (uint64) (value1); \
- uint64 v2 = (uint64) (value2); \
- uint64 v3 = (uint64) (value3); \
+ uint64_t v1 = (uint64_t) (value1); \
+ uint64_t v2 = (uint64_t) (value2); \
+ uint64_t v3 = (uint64_t) (value3); \
\
tsrm_mutex_lock(mysqlnd_global_stats->LOCK_access); \
if (statistic1 != STAT_LAST)
mysqlnd_global_stats->values[(statistic1)]+= v1; \
@@ -164,8 +164,8 @@
#define MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(statistic1, value1, statistic2,
value2) \
{ \
if (MYSQLND_G(collect_statistics)) { \
- uint64 v1 = (uint64) (value1); \
- uint64 v2 = (uint64) (value2); \
+ uint64_t v1 = (uint64_t) (value1); \
+ uint64_t v2 = (uint64_t) (value2); \
DBG_INF_FMT("Global stat increase [%s] [%s]",
mysqlnd_stats_values_names[statistic1],
mysqlnd_stats_values_names[statistic2]); \
\
if (statistic1 != STAT_LAST)
mysqlnd_global_stats->values[(statistic1)]+= v1; \
@@ -187,7 +187,7 @@
#define MYSQLND_INC_CONN_STATISTIC_W_VALUE(conn_stats, statistic, value) \
{ \
if (MYSQLND_G(collect_statistics) && statistic != STAT_LAST) { \
- uint64 v = (uint64) (value); \
+ uint64_t v = (uint64_t) (value); \
DBG_INF_FMT("Global&Conn stats increase w value [%s]",
mysqlnd_stats_values_names[statistic]); \
mysqlnd_global_stats->values[(statistic)] += v; \
if ((conn_stats)) { \
@@ -199,8 +199,8 @@
#define MYSQLND_INC_CONN_STATISTIC_W_VALUE2(conn_stats, statistic1, value1,
statistic2, value2) \
{ \
if (MYSQLND_G(collect_statistics)) { \
- uint64 v1 = (uint64) (value1); \
- uint64 v2 = (uint64) (value2); \
+ uint64_t v1 = (uint64_t) (value1); \
+ uint64_t v2 = (uint64_t) (value2); \
\
if (statistic1 != STAT_LAST)
mysqlnd_global_stats->values[(statistic1)]+= v1; \
if (statistic2 != STAT_LAST)
mysqlnd_global_stats->values[(statistic2)]+= v2; \
@@ -214,9 +214,9 @@
#define MYSQLND_INC_CONN_STATISTIC_W_VALUE3(conn_stats, statistic1, value1,
statistic2, value2, statistic3, value3) \
{ \
if (MYSQLND_G(collect_statistics)) { \
- uint64 v1 = (uint64) (value1); \
- uint64 v2 = (uint64) (value2); \
- uint64 v3 = (uint64) (value3); \
+ uint64_t v1 = (uint64_t) (value1); \
+ uint64_t v2 = (uint64_t) (value2); \
+ uint64_t v3 = (uint64_t) (value3); \
\
if (statistic1 != STAT_LAST)
mysqlnd_global_stats->values[(statistic1)]+= v1; \
if (statistic2 != STAT_LAST)
mysqlnd_global_stats->values[(statistic2)]+= v2; \
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_structs.h?r1=1.2.2.14&r2=1.2.2.15&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_structs.h
diff -u php-src/ext/mysqlnd/mysqlnd_structs.h:1.2.2.14
php-src/ext/mysqlnd/mysqlnd_structs.h:1.2.2.15
--- php-src/ext/mysqlnd/mysqlnd_structs.h:1.2.2.14 Mon Sep 15 18:09:20 2008
+++ php-src/ext/mysqlnd/mysqlnd_structs.h Fri Oct 31 20:32:17 2008
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mysqlnd_structs.h,v 1.2.2.14 2008/09/15 18:09:20 andrey Exp $ */
+/* $Id: mysqlnd_structs.h,v 1.2.2.15 2008/10/31 20:32:17 andrey Exp $ */
#ifndef MYSQLND_STRUCTS_H
#define MYSQLND_STRUCTS_H
@@ -45,7 +45,7 @@
struct st_mysqlnd_memory_pool_chunk
{
- uint64 app;
+ uint64_t app;
MYSQLND_MEMORY_POOL *pool;
zend_uchar *ptr;
uint size;
@@ -94,8 +94,8 @@
{
unsigned int warning_count;
unsigned int server_status;
- uint64 affected_rows;
- uint64 last_insert_id;
+ uint64_t affected_rows;
+ uint64_t last_insert_id;
} mysqlnd_upsert_status;
@@ -210,7 +210,7 @@
typedef struct st_mysqlnd_stats
{
- uint64 values[STAT_LAST];
+ uint64_t values[STAT_LAST];
#ifdef ZTS
MUTEX_T LOCK_access;
#endif
@@ -257,7 +257,7 @@
unsigned int (*get_error_no)(const MYSQLND * const conn);
const char * (*get_error_str)(const MYSQLND * const conn);
const char * (*get_sqlstate)(const MYSQLND * const conn);
- uint64 (*get_thread_id)(const MYSQLND * const
conn);
+ uint64_t (*get_thread_id)(const MYSQLND * const
conn);
void (*get_statistics)(const MYSQLND * const
conn, zval *return_value TSRMLS_DC ZEND_FILE_LINE_DC);
unsigned long (*get_server_version)(const MYSQLND * const
conn);
@@ -270,8 +270,8 @@
MYSQLND_RES * (*list_fields)(MYSQLND *conn, const char
*table, const char *achtung_wild TSRMLS_DC);
MYSQLND_RES * (*list_method)(MYSQLND *conn, const char
*query, const char *achtung_wild, char *par1 TSRMLS_DC);
- uint64 (*get_last_insert_id)(const MYSQLND *
const conn);
- uint64 (*get_affected_rows)(const MYSQLND *
const conn);
+ uint64_t (*get_last_insert_id)(const MYSQLND *
const conn);
+ uint64_t (*get_affected_rows)(const MYSQLND *
const conn);
unsigned int (*get_warning_count)(const MYSQLND * const
conn);
unsigned int (*get_field_count)(const MYSQLND * const conn);
@@ -302,10 +302,10 @@
MYSQLND_ROW_C (*fetch_row_c)(MYSQLND_RES *result TSRMLS_DC);
void (*fetch_all)(MYSQLND_RES *result,
unsigned int flags, zval *return_value TSRMLS_DC ZEND_FILE_LINE_DC);
void (*fetch_field_data)(MYSQLND_RES
*result, unsigned int offset, zval *return_value TSRMLS_DC);
- uint64 (*num_rows)(const MYSQLND_RES * const
result);
+ uint64_t (*num_rows)(const MYSQLND_RES * const
result);
unsigned int (*num_fields)(const MYSQLND_RES * const result);
enum_func_status (*skip_result)(MYSQLND_RES * const result
TSRMLS_DC);
- enum_func_status (*seek_data)(MYSQLND_RES * result, uint64 row
TSRMLS_DC);
+ enum_func_status (*seek_data)(MYSQLND_RES * result, uint64_t row
TSRMLS_DC);
MYSQLND_FIELD_OFFSET (*seek_field)(MYSQLND_RES * const result,
MYSQLND_FIELD_OFFSET field_offset);
MYSQLND_FIELD_OFFSET (*field_tell)(const MYSQLND_RES * const result);
const MYSQLND_FIELD *(*fetch_field)(MYSQLND_RES * const result
TSRMLS_DC);
@@ -347,7 +347,7 @@
zend_bool (*more_results)(const MYSQLND_STMT *
const stmt TSRMLS_DC);
enum_func_status (*next_result)(MYSQLND_STMT * const stmt
TSRMLS_DC);
enum_func_status (*free_result)(MYSQLND_STMT * const stmt
TSRMLS_DC);
- enum_func_status (*seek_data)(const MYSQLND_STMT * const stmt,
uint64 row TSRMLS_DC);
+ enum_func_status (*seek_data)(const MYSQLND_STMT * const stmt,
uint64_t row TSRMLS_DC);
enum_func_status (*reset)(MYSQLND_STMT * const stmt TSRMLS_DC);
enum_func_status (*net_close)(MYSQLND_STMT * const stmt,
zend_bool implicit TSRMLS_DC); /* private */
enum_func_status (*dtor)(MYSQLND_STMT * const stmt, zend_bool
implicit TSRMLS_DC); /* use this for mysqlnd_stmt_close */
@@ -366,9 +366,9 @@
MYSQLND_RES * (*get_parameter_metadata)(MYSQLND_STMT * const
stmt);
MYSQLND_RES * (*get_result_metadata)(MYSQLND_STMT * const
stmt TSRMLS_DC);
- uint64 (*get_last_insert_id)(const
MYSQLND_STMT * const stmt);
- uint64 (*get_affected_rows)(const MYSQLND_STMT
* const stmt);
- uint64 (*get_num_rows)(const MYSQLND_STMT *
const stmt);
+ uint64_t (*get_last_insert_id)(const
MYSQLND_STMT * const stmt);
+ uint64_t (*get_affected_rows)(const MYSQLND_STMT
* const stmt);
+ uint64_t (*get_num_rows)(const MYSQLND_STMT *
const stmt);
unsigned int (*get_param_count)(const MYSQLND_STMT * const
stmt);
unsigned int (*get_field_count)(const MYSQLND_STMT * const
stmt);
@@ -395,7 +395,7 @@
char *passwd;
unsigned int *passwd_len;
char *scheme;
- uint64 thread_id;
+ uint64_t thread_id;
char *server_version;
char *host_info;
unsigned char *scramble;
@@ -502,11 +502,11 @@
struct st_mysqlnd_background_buffered_result
{
zval ***data;
- uint64 data_size;
+ uint64_t data_size;
zval ***data_cursor;
MYSQLND_MEMORY_POOL_CHUNK **row_buffers;
- uint64 row_count;
- uint64 initialized_rows;
+ uint64_t row_count;
+ uint64_t initialized_rows;
zend_bool persistent;
MYSQLND_QCACHE *qcache;
@@ -529,8 +529,8 @@
zval **data;
zval **data_cursor;
MYSQLND_MEMORY_POOL_CHUNK **row_buffers;
- uint64 row_count;
- uint64 initialized_rows;
+ uint64_t row_count;
+ uint64_t initialized_rows;
zend_bool persistent;
MYSQLND_QCACHE *qcache;
@@ -546,7 +546,7 @@
zval **last_row_data;
MYSQLND_MEMORY_POOL_CHUNK *last_row_buffer;
- uint64 row_count;
+ uint64_t row_count;
zend_bool eof_reached;
};
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_wireprotocol.c?r1=1.4.2.20&r2=1.4.2.21&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_wireprotocol.c
diff -u php-src/ext/mysqlnd/mysqlnd_wireprotocol.c:1.4.2.20
php-src/ext/mysqlnd/mysqlnd_wireprotocol.c:1.4.2.21
--- php-src/ext/mysqlnd/mysqlnd_wireprotocol.c:1.4.2.20 Tue Sep 16 14:35:01 2008
+++ php-src/ext/mysqlnd/mysqlnd_wireprotocol.c Fri Oct 31 20:32:17 2008
@@ -35,7 +35,6 @@
#include <winsock.h>
#endif
-
#define USE_CORK 0
#define MYSQLND_SILENT 1
@@ -159,48 +158,48 @@
/* {{{ php_mysqlnd_net_field_length_ll
Get next field's length */
-uint64 php_mysqlnd_net_field_length_ll(zend_uchar **packet)
+uint64_t php_mysqlnd_net_field_length_ll(zend_uchar **packet)
{
register zend_uchar *p= (zend_uchar *)*packet;
if (*p < 251) {
(*packet)++;
- return (uint64) *p;
+ return (uint64_t) *p;
}
switch (*p) {
case 251:
(*packet)++;
- return (uint64) MYSQLND_NULL_LENGTH;
+ return (uint64_t) MYSQLND_NULL_LENGTH;
case 252:
(*packet) += 3;
- return (uint64) uint2korr(p + 1);
+ return (uint64_t) uint2korr(p + 1);
case 253:
(*packet) += 4;
- return (uint64) uint3korr(p + 1);
+ return (uint64_t) uint3korr(p + 1);
default:
(*packet) += 9;
- return (uint64) uint8korr(p + 1);
+ return (uint64_t) uint8korr(p + 1);
}
}
/* }}} */
/* {{{ php_mysqlnd_net_store_length */
-zend_uchar *php_mysqlnd_net_store_length(zend_uchar *packet, uint64 length)
+zend_uchar *php_mysqlnd_net_store_length(zend_uchar *packet, uint64_t length)
{
- if (length < (uint64) L64(251)) {
+ if (length < (uint64_t) L64(251)) {
*packet = (zend_uchar) length;
return packet + 1;
}
- if (length < (uint64) L64(65536)) {
+ if (length < (uint64_t) L64(65536)) {
*packet++ = 252;
int2store(packet,(uint) length);
return packet + 2;
}
- if (length < (uint64) L64(16777216)) {
+ if (length < (uint64_t) L64(16777216)) {
*packet++ = 253;
int3store(packet,(ulong) length);
return packet + 3;
@@ -248,8 +247,8 @@
DBG_ERR_FMT("Skipped %u bytes. Last command %s hasn't
consumed all the output from the server",
bytes_consumed,
mysqlnd_command_to_text[net->last_command]);
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Skipped %u
bytes. Last command %s hasn't "
- "consumed all the
output from the server. PID=%d",
- bytes_consumed,
mysqlnd_command_to_text[net->last_command], getpid());
+ "consumed all the
output from the server",
+ bytes_consumed,
mysqlnd_command_to_text[net->last_command]);
}
}
net->last_command = cmd;
@@ -316,7 +315,7 @@
/* We assume that MYSQLND_HEADER_SIZE is 4 bytes !! */
-#define STORE_HEADER_SIZE(safe_storage, buffer) int4store((safe_storage),
(*(uint32 *)(buffer)))
+#define STORE_HEADER_SIZE(safe_storage, buffer) int4store((safe_storage),
(*(uint32_t *)(buffer)))
#define RESTORE_HEADER_SIZE(buffer, safe_storage)
STORE_HEADER_SIZE((safe_storage), (buffer))
/* {{{ mysqlnd_stream_write_w_header */
@@ -499,8 +498,8 @@
DBG_ERR_FMT("Packets out of order. Expected %d received %d. Packet
size=%d",
net->packet_no, header->packet_no,
header->size);
- php_error(E_WARNING, "Packets out of order. Expected %d received %d.
Packet size=%d. PID=%d",
- net->packet_no, header->packet_no, header->size,
getpid());
+ php_error(E_WARNING, "Packets out of order. Expected %d received %d.
Packet size="MYSQLND_SZ_T_SPEC,
+ net->packet_no, header->packet_no, header->size);
DBG_RETURN(FAIL);
}
/* }}} */
@@ -629,8 +628,8 @@
if (p - begin > packet->header.size) {
DBG_ERR_FMT("GREET packet %d bytes shorter than expected", p -
begin - packet->header.size);
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "GREET packet %d
bytes shorter than expected. PID=%d",
- p - begin -
packet->header.size, getpid());
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "GREET packet
"MYSQLND_SZ_T_SPEC" bytes shorter than expected",
+ p - begin -
packet->header.size);
}
DBG_RETURN(PASS);
@@ -826,8 +825,8 @@
if (p - begin > packet->header.size) {
DBG_ERR_FMT("OK packet %d bytes shorter than expected", p -
begin - packet->header.size);
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "OK packet %d bytes
shorter than expected. PID=%d",
- p - begin -
packet->header.size, getpid());
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "OK packet
"MYSQLND_SZ_T_SPEC" bytes shorter than expected",
+ p - begin -
packet->header.size);
}
DBG_RETURN(PASS);
@@ -899,8 +898,8 @@
if (p - begin > packet->header.size) {
DBG_ERR_FMT("EOF packet %d bytes shorter than expected", p -
begin - packet->header.size);
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "EOF packet %d
bytes shorter than expected. PID=%d",
- p - begin -
packet->header.size, getpid());
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "EOF packet
"MYSQLND_SZ_T_SPEC" bytes shorter than expected",
+ p - begin -
packet->header.size);
}
DBG_INF_FMT("EOF packet: fields=%d status=%d warnings=%d",
@@ -1064,8 +1063,8 @@
}
if (p - begin > packet->header.size) {
DBG_ERR_FMT("RSET_HEADER packet %d bytes shorter than
expected", p - begin - packet->header.size);
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "GREET packet %d
bytes shorter than expected. PID=%d",
- p - begin -
packet->header.size, getpid());
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "GREET packet
"MYSQLND_SZ_T_SPEC" bytes shorter than expected",
+ p - begin -
packet->header.size);
}
DBG_RETURN(PASS);
@@ -1204,8 +1203,8 @@
if (p - begin > packet->header.size) {
DBG_ERR_FMT("RSET field packet %d bytes shorter than expected",
p - begin - packet->header.size);
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Result set field
packet %d bytes "
- "shorter than expected.
PID=%d", p - begin - packet->header.size, getpid());
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Result set field
packet "MYSQLND_SZ_T_SPEC" bytes "
+ "shorter than expected", p -
begin - packet->header.size);
}
root_ptr = meta->root = mnd_emalloc(total_len);
@@ -1282,7 +1281,7 @@
static enum_func_status
php_mysqlnd_read_row_ex(MYSQLND *conn, MYSQLND_MEMORY_POOL_CHUNK **buffer,
- uint64 *data_size, zend_bool
persistent_alloc,
+ uint64_t *data_size, zend_bool
persistent_alloc,
unsigned int
prealloc_more_bytes TSRMLS_DC)
{
enum_func_status ret = PASS;
@@ -1337,7 +1336,7 @@
if (!mysqlnd_read_body(conn, p, header.size TSRMLS_CC)) {
DBG_ERR("Empty row packet body");
- php_error(E_WARNING, "Empty row packet body. PID=%d",
getpid());
+ php_error(E_WARNING, "Empty row packet body");
ret = FAIL;
break;
}
@@ -1560,7 +1559,7 @@
if (perm_bind.pack_len < SIZEOF_LONG)
{
/* direct conversion */
- int64 v =
+ int64_t v =
#ifndef PHP_WIN32
atoll((char *) p);
#else
@@ -1568,11 +1567,11 @@
#endif
ZVAL_LONG(*current_field, v);
} else {
- uint64 v =
+ uint64_t v =
#ifndef PHP_WIN32
- (uint64) atoll((char *) p);
+ (uint64_t) atoll((char *) p);
#else
- (uint64) _atoi64((char *) p);
+ (uint64_t) _atoi64((char *) p);
#endif
zend_bool uns =
fields_metadata[i].flags & UNSIGNED_FLAG? TRUE:FALSE;
/* We have to make it ASCIIZ
temporarily */
@@ -1580,13 +1579,13 @@
if (uns == TRUE && v >
9223372036854775807L)
#elif SIZEOF_LONG==4
if ((uns == TRUE && v >
L64(2147483647)) ||
- (uns == FALSE && ((
L64(2147483647) < (int64) v) ||
- (L64(-2147483648) > (int64)
v))))
+ (uns == FALSE && ((
L64(2147483647) < (int64_t) v) ||
+ (L64(-2147483648) > (int64_t)
v))))
#endif /* SIZEOF */
{
ZVAL_STRINGL(*current_field,
(char *)p, len, 0);
} else {
- ZVAL_LONG(*current_field,
(int64)v);
+ ZVAL_LONG(*current_field,
(int64_t)v);
}
}
*(p + len) = save;
@@ -1617,8 +1616,7 @@
*/
p -= len;
if (Z_TYPE_PP(current_field) == IS_LONG) {
- bit_area += 1 + sprintf((char *)start,
MYSQLND_LLU_SPEC,
-
(int64) Z_LVAL_PP(current_field));
+ bit_area += 1 + sprintf((char *)start,
"%ld", Z_LVAL_PP(current_field));
#if PHP_MAJOR_VERSION >= 6
if (as_unicode) {
ZVAL_UTF8_STRINGL(*current_field, start, bit_area - start - 1, 0);
@@ -1728,7 +1726,7 @@
size_t old_chunk_size = net->stream->chunk_size;
php_mysql_packet_row *packet= (php_mysql_packet_row *) _packet;
size_t post_alloc_for_bit_fields = 0;
- uint64 data_size = 0;
+ uint64_t data_size = 0;
DBG_ENTER("php_mysqlnd_rowp_read");
@@ -1918,7 +1916,7 @@
data_size != PREPARE_RESPONSE_SIZE_50 &&
!(data_size > PREPARE_RESPONSE_SIZE_50)) {
DBG_ERR_FMT("Wrong COM_STMT_PREPARE response size. Received
%d", data_size);
- php_error(E_WARNING, "Wrong COM_STMT_PREPARE response size.
Received %d. PID=%d", data_size, getpid());
+ php_error(E_WARNING, "Wrong COM_STMT_PREPARE response size.
Received %d", data_size);
DBG_RETURN(FAIL);
}
@@ -1944,8 +1942,8 @@
if (p - begin > packet->header.size) {
DBG_ERR_FMT("PREPARE packet %d bytes shorter than expected", p
- begin - packet->header.size);
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "PREPARE packet %d
bytes shorter than expected. PID=%d",
- p - begin -
packet->header.size, getpid());
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "PREPARE packet
"MYSQLND_SZ_T_SPEC" bytes shorter than expected",
+ p - begin -
packet->header.size);
}
DBG_RETURN(PASS);
@@ -2004,8 +2002,8 @@
}
if (p - begin > packet->header.size) {
DBG_ERR_FMT("CHANGE_USER packet %d bytes shorter than
expected", p - begin - packet->header.size);
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "CHANGE_USER packet
%d bytes shorter than expected. PID=%d",
- p - begin -
packet->header.size, getpid());
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "CHANGE_USER packet
"MYSQLND_SZ_T_SPEC" bytes shorter than expected",
+ p - begin -
packet->header.size);
}
DBG_RETURN(PASS);
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_wireprotocol.h?r1=1.4.2.9&r2=1.4.2.10&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_wireprotocol.h
diff -u php-src/ext/mysqlnd/mysqlnd_wireprotocol.h:1.4.2.9
php-src/ext/mysqlnd/mysqlnd_wireprotocol.h:1.4.2.10
--- php-src/ext/mysqlnd/mysqlnd_wireprotocol.h:1.4.2.9 Wed Feb 20 15:18:17 2008
+++ php-src/ext/mysqlnd/mysqlnd_wireprotocol.h Fri Oct 31 20:32:17 2008
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mysqlnd_wireprotocol.h,v 1.4.2.9 2008/02/20 15:18:17 andrey Exp $ */
+/* $Id: mysqlnd_wireprotocol.h,v 1.4.2.10 2008/10/31 20:32:17 andrey Exp $ */
#ifndef MYSQLND_WIREPROTOCOL_H
#define MYSQLND_WIREPROTOCOL_H
@@ -27,10 +27,6 @@
#define MYSQLND_NULL_LENGTH (unsigned long) ~0
-typedef zend_uchar mysqlnd_1b;
-typedef zend_ushort mysqlnd_2b;
-typedef zend_uint mysqlnd_4b;
-
/* Used in mysqlnd_debug.c */
extern char * mysqlnd_read_header_name;
extern char * mysqlnd_read_body_name;
@@ -137,19 +133,19 @@
/* Server greets the client */
typedef struct st_php_mysql_packet_greet {
mysqlnd_packet_header header;
- mysqlnd_1b protocol_version;
- char *server_version;
- mysqlnd_4b thread_id;
- zend_uchar scramble_buf[SCRAMBLE_LENGTH];
+ uint8_t protocol_version;
+ char *server_version;
+ uint32_t thread_id;
+ zend_uchar scramble_buf[SCRAMBLE_LENGTH];
/* 1 byte pad */
- mysqlnd_2b server_capabilities;
- mysqlnd_1b charset_no;
- mysqlnd_2b server_status;
+ uint16_t server_capabilities;
+ uint8_t charset_no;
+ uint16_t server_status;
/* 13 byte pad*/
- zend_bool pre41;
+ zend_bool pre41;
/* If error packet, we use these */
- char error[MYSQLND_ERRMSG_SIZE+1];
- char sqlstate[MYSQLND_SQLSTATE_LENGTH + 1];
+ char error[MYSQLND_ERRMSG_SIZE+1];
+ char sqlstate[MYSQLND_SQLSTATE_LENGTH + 1];
unsigned int error_no;
} php_mysql_packet_greet;
@@ -157,9 +153,9 @@
/* Client authenticates */
typedef struct st_php_mysql_packet_auth {
mysqlnd_packet_header header;
- mysqlnd_4b client_flags;
- uint32 max_packet_size;
- mysqlnd_1b charset_no;
+ uint32_t client_flags;
+ uint32_t max_packet_size;
+ uint8_t charset_no;
/* 23 byte pad */
const char *user;
/* 8 byte scramble */
@@ -176,16 +172,16 @@
/* OK packet */
typedef struct st_php_mysql_packet_ok {
mysqlnd_packet_header header;
- mysqlnd_1b field_count; /* always 0x0 */
- uint64 affected_rows;
- uint64 last_insert_id;
- mysqlnd_2b server_status;
- mysqlnd_2b warning_count;
- char *message;
- size_t message_len;
+ uint8_t field_count; /* always 0x0 */
+ uint64_t affected_rows;
+ uint64_t last_insert_id;
+ uint16_t server_status;
+ uint16_t warning_count;
+ char *message;
+ size_t message_len;
/* If error packet, we use these */
- char error[MYSQLND_ERRMSG_SIZE+1];
- char sqlstate[MYSQLND_SQLSTATE_LENGTH + 1];
+ char error[MYSQLND_ERRMSG_SIZE+1];
+ char sqlstate[MYSQLND_SQLSTATE_LENGTH + 1];
unsigned int error_no;
} php_mysql_packet_ok;
@@ -202,12 +198,12 @@
/* EOF packet */
typedef struct st_php_mysql_packet_eof {
mysqlnd_packet_header header;
- mysqlnd_1b field_count; /* 0xFE */
- mysqlnd_2b warning_count;
- mysqlnd_2b server_status;
+ uint8_t field_count; /* 0xFE */
+ uint16_t warning_count;
+ uint16_t server_status;
/* If error packet, we use these */
- char error[MYSQLND_ERRMSG_SIZE+1];
- char sqlstate[MYSQLND_SQLSTATE_LENGTH + 1];
+ char error[MYSQLND_ERRMSG_SIZE+1];
+ char sqlstate[MYSQLND_SQLSTATE_LENGTH + 1];
unsigned int error_no;
} php_mysql_packet_eof;
/* EOF packet */
@@ -227,13 +223,13 @@
These are filled if no SELECT query. For SELECT warning_count
and server status are in the last row packet, the EOF packet.
*/
- mysqlnd_2b warning_count;
- mysqlnd_2b server_status;
- uint64 affected_rows;
- uint64 last_insert_id;
+ uint16_t warning_count;
+ uint16_t server_status;
+ uint64_t affected_rows;
+ uint64_t last_insert_id;
/* This is for both LOAD DATA or info, when no result set */
- char *info_or_local_file;
- size_t info_or_local_file_len;
+ char *info_or_local_file;
+ size_t info_or_local_file_len;
/* If error packet, we use these */
mysqlnd_error_info error_info;
} php_mysql_packet_rset_header;
@@ -252,15 +248,15 @@
/* Row packet */
struct st_php_mysql_packet_row {
mysqlnd_packet_header header;
- zval **fields;
- mysqlnd_4b field_count;
- zend_bool eof;
+ zval **fields;
+ uint32_t field_count;
+ zend_bool eof;
/*
These are, of course, only for SELECT in the EOF packet,
which is detected by this packet
*/
- mysqlnd_2b warning_count;
- mysqlnd_2b server_status;
+ uint16_t warning_count;
+ uint16_t server_status;
struct st_mysqlnd_memory_pool_chunk *row_buffer;
@@ -304,10 +300,10 @@
/* Statistics packet */
typedef struct st_php_mysql_packet_chg_user_resp {
mysqlnd_packet_header header;
- mysqlnd_4b field_count;
+ uint32_t field_count;
/* message_len is not part of the packet*/
- mysqlnd_2b server_capabilities;
+ uint16_t server_capabilities;
/* If error packet, we use these */
mysqlnd_error_info error_info;
} php_mysql_packet_chg_user_resp;
@@ -323,7 +319,7 @@
void php_mysqlnd_scramble(zend_uchar * const buffer, const zend_uchar * const
scramble, const zend_uchar * const pass);
unsigned long php_mysqlnd_net_field_length(zend_uchar **packet);
-zend_uchar * php_mysqlnd_net_store_length(zend_uchar *packet, uint64 length);
+zend_uchar * php_mysqlnd_net_store_length(zend_uchar *packet, uint64_t
length);
extern char * const mysqlnd_empty_string;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php