[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqlnd mysqlnd.c mysqlnd_debug.c mysqlnd_palloc.c mysqlnd_ps_codec.c mysqlnd_result.c mysqlnd_result_meta.c mysqlnd_statistics.c php_mysqlnd.c

2009-03-30 Thread Felipe Pena
felipe  Mon Mar 30 16:52:33 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mysqlndmysqlnd.c mysqlnd_debug.c mysqlnd_palloc.c 
mysqlnd_ps_codec.c mysqlnd_result.c 
mysqlnd_result_meta.c mysqlnd_statistics.c 
php_mysqlnd.c 
  Log:
  - MFH: Removed UG(unicode) checks
  http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.c?r1=1.5.2.37r2=1.5.2.38diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd.c
diff -u php-src/ext/mysqlnd/mysqlnd.c:1.5.2.37 
php-src/ext/mysqlnd/mysqlnd.c:1.5.2.38
--- php-src/ext/mysqlnd/mysqlnd.c:1.5.2.37  Mon Feb 16 17:26:43 2009
+++ php-src/ext/mysqlnd/mysqlnd.c   Mon Mar 30 16:52:33 2009
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd.c,v 1.5.2.37 2009/02/16 17:26:43 johannes Exp $ */
+/* $Id: mysqlnd.c,v 1.5.2.38 2009/03/30 16:52:33 felipe Exp $ */
 #include php.h
 #include mysqlnd.h
 #include mysqlnd_wireprotocol.h
@@ -663,12 +663,12 @@
(charset = 
mysqlnd_find_charset_name(conn-options.charset_name)))
{
auth_packet-charset_no = charset-nr;
+   } else {
 #if PHP_MAJOR_VERSION = 6
-   } else if (UG(unicode)) {
auth_packet-charset_no = 200;/* utf8 - swedish collation, 
check mysqlnd_charset.c */
-#endif
-   } else {
+#else
auth_packet-charset_no = greet_packet.charset_no;
+#endif
}
auth_packet-db = db;
auth_packet-db_len = db_len;
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_debug.c?r1=1.1.2.14r2=1.1.2.15diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_debug.c
diff -u php-src/ext/mysqlnd/mysqlnd_debug.c:1.1.2.14 
php-src/ext/mysqlnd/mysqlnd_debug.c:1.1.2.15
--- php-src/ext/mysqlnd/mysqlnd_debug.c:1.1.2.14Mon Mar 30 13:55:47 2009
+++ php-src/ext/mysqlnd/mysqlnd_debug.c Mon Mar 30 16:52:33 2009
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd_debug.c,v 1.1.2.14 2009/03/30 13:55:47 johannes Exp $ */
+/* $Id: mysqlnd_debug.c,v 1.1.2.15 2009/03/30 16:52:33 felipe Exp $ */
 
 #include php.h
 #include mysqlnd.h
@@ -1107,6 +1107,7 @@
TRACE_APPEND_STR(Array, );
break;
case IS_OBJECT: {
+   zval tmp;
zstr class_name;
zend_uint class_name_len;
int dup;
@@ -1115,16 +1116,11 @@
 
dup = zend_get_object_classname(*arg, class_name, 
class_name_len TSRMLS_CC);
 
-   if (UG(unicode)) {
-   zval tmp;
+   ZVAL_UNICODEL(tmp, class_name.u, class_name_len, 1);
+   convert_to_string_with_converter(tmp, 
ZEND_U_CONVERTER(UG(output_encoding_conv)));
+   TRACE_APPEND_STRL(Z_STRVAL(tmp), Z_STRLEN(tmp));
+   zval_dtor(tmp);
 
-   ZVAL_UNICODEL(tmp, class_name.u, 
class_name_len, 1);
-   convert_to_string_with_converter(tmp, 
ZEND_U_CONVERTER(UG(output_encoding_conv)));
-   TRACE_APPEND_STRL(Z_STRVAL(tmp), Z_STRLEN(tmp));
-   zval_dtor(tmp);
-   } else {
-   TRACE_APPEND_STRL(class_name.s, class_name_len);
-   }
if(!dup) {
efree(class_name.v);
}
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_palloc.c?r1=1.2.2.14r2=1.2.2.15diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_palloc.c
diff -u php-src/ext/mysqlnd/mysqlnd_palloc.c:1.2.2.14 
php-src/ext/mysqlnd/mysqlnd_palloc.c:1.2.2.15
--- php-src/ext/mysqlnd/mysqlnd_palloc.c:1.2.2.14   Wed Dec 31 11:15:39 2008
+++ php-src/ext/mysqlnd/mysqlnd_palloc.cMon Mar 30 16:52:33 2009
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd_palloc.c,v 1.2.2.14 2008/12/31 11:15:39 sebastian Exp $ */
+/* $Id: mysqlnd_palloc.c,v 1.2.2.15 2009/03/30 16:52:33 felipe Exp $ */
 #include php.h
 #include mysqlnd.h
 #include mysqlnd_priv.h
@@ -39,13 +39,6 @@
 #endif
 
 
-#if PHP_MAJOR_VERSION  6
-#define IS_UNICODE_DISABLED  (1)
-#else
-#define IS_UNICODE_DISABLED  (!UG(unicode))
-#endif
-
-
 /* {{{ _mysqlnd_palloc_init_cache */
 PHPAPI MYSQLND_ZVAL_PCACHE* _mysqlnd_palloc_init_cache(unsigned int cache_size 
TSRMLS_DC)
 {
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_ps_codec.c?r1=1.3.2.14r2=1.3.2.15diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_ps_codec.c
diff -u php-src/ext/mysqlnd/mysqlnd_ps_codec.c:1.3.2.14 
php-src/ext/mysqlnd/mysqlnd_ps_codec.c:1.3.2.15
--- 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqlnd mysqlnd.c mysqlnd.h mysqlnd_priv.h mysqlnd_ps.c mysqlnd_ps_codec.c

2009-02-16 Thread Johannes Schlüter
johannesMon Feb 16 17:26:44 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mysqlndmysqlnd.c mysqlnd.h mysqlnd_priv.h 
mysqlnd_ps.c mysqlnd_ps_codec.c 
  Log:
  - MFH: Improve mysqlnd's internal method registration
  http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.c?r1=1.5.2.36r2=1.5.2.37diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd.c
diff -u php-src/ext/mysqlnd/mysqlnd.c:1.5.2.36 
php-src/ext/mysqlnd/mysqlnd.c:1.5.2.37
--- php-src/ext/mysqlnd/mysqlnd.c:1.5.2.36  Wed Dec 31 11:15:39 2008
+++ php-src/ext/mysqlnd/mysqlnd.c   Mon Feb 16 17:26:43 2009
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd.c,v 1.5.2.36 2008/12/31 11:15:39 sebastian Exp $ */
+/* $Id: mysqlnd.c,v 1.5.2.37 2009/02/16 17:26:43 johannes Exp $ */
 #include php.h
 #include mysqlnd.h
 #include mysqlnd_wireprotocol.h
@@ -68,19 +68,7 @@
 
 static enum_func_status mysqlnd_send_close(MYSQLND * conn TSRMLS_DC);
 
-
-/* {{{ mysqlnd_library_init */
-void mysqlnd_library_init(TSRMLS_D)
-{
-   if (mysqlnd_library_initted == FALSE) {
-   mysqlnd_library_initted = TRUE;
-   _mysqlnd_init_ps_subsystem();
-   /* Should be calloc, as mnd_calloc will reference LOCK_access*/
-   mysqlnd_stats_init(mysqlnd_global_stats);
-   }
-}
-/* }}} */
-
+static struct st_mysqlnd_conn_methods *mysqlnd_conn_methods;
 
 /* {{{ mysqlnd_library_end */
 void mysqlnd_library_end(TSRMLS_D)
@@ -2125,7 +2113,6 @@
 
 MYSQLND_STMT * _mysqlnd_stmt_init(MYSQLND * const conn TSRMLS_DC);
 
-
 MYSQLND_CLASS_METHODS_START(mysqlnd_conn)
MYSQLND_METHOD(mysqlnd_conn, escape_string),
MYSQLND_METHOD(mysqlnd_conn, set_charset),
@@ -2196,7 +2183,7 @@
SET_ERROR_AFF_ROWS(ret);
ret-persistent = persistent;
 
-   ret-m =  mysqlnd_mysqlnd_conn_methods;
+   ret-m = mysqlnd_conn_methods;
ret-m-get_reference(ret TSRMLS_CC);
 
 #ifdef MYSQLND_THREADED
@@ -2212,6 +2199,32 @@
 }
 /* }}} */
 
+/* {{{ mysqlnd_library_init */
+void mysqlnd_library_init(TSRMLS_D)
+{
+   if (mysqlnd_library_initted == FALSE) {
+   mysqlnd_library_initted = TRUE;
+   mysqlnd_conn_methods = 
MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_conn);
+   _mysqlnd_init_ps_subsystem();
+   /* Should be calloc, as mnd_calloc will reference LOCK_access*/
+   mysqlnd_stats_init(mysqlnd_global_stats);
+   }
+}
+/* }}} */
+
+/* {{{ mysqlnd_conn_get_methods */
+PHPAPI struct st_mysqlnd_conn_methods * mysqlnd_conn_get_methods()
+{
+   return mysqlnd_conn_methods;
+}
+/* }}} */
+
+/* {{{ mysqlnd_conn_set_methods */
+PHPAPI void mysqlnd_conn_set_methods(struct st_mysqlnd_conn_methods *methods)
+{
+   mysqlnd_conn_methods = methods;
+}
+/* }}} */
 
 /*
  * Local variables:
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.h?r1=1.3.2.21r2=1.3.2.22diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd.h
diff -u php-src/ext/mysqlnd/mysqlnd.h:1.3.2.21 
php-src/ext/mysqlnd/mysqlnd.h:1.3.2.22
--- php-src/ext/mysqlnd/mysqlnd.h:1.3.2.21  Wed Dec 31 11:15:39 2008
+++ php-src/ext/mysqlnd/mysqlnd.h   Mon Feb 16 17:26:43 2009
@@ -18,12 +18,12 @@
   +--+
 */
 
-/* $Id: mysqlnd.h,v 1.3.2.21 2008/12/31 11:15:39 sebastian Exp $ */
+/* $Id: mysqlnd.h,v 1.3.2.22 2009/02/16 17:26:43 johannes Exp $ */
 
 #ifndef MYSQLND_H
 #define MYSQLND_H
 
-#define MYSQLND_VERSION mysqlnd 5.0.5-dev - 081106 - $Revision: 1.3.2.21 $
+#define MYSQLND_VERSION mysqlnd 5.0.5-dev - 081106 - $Revision: 1.3.2.22 $
 #define MYSQLND_VERSION_ID 50005
 
 /* This forces inlining of some accessor functions */
@@ -67,6 +67,13 @@
 void mysqlnd_library_init(TSRMLS_D);
 void mysqlnd_library_end(TSRMLS_D);
 
+PHPAPI struct st_mysqlnd_conn_methods * mysqlnd_conn_get_methods();
+PHPAPI void mysqlnd_conn_set_methods(struct st_mysqlnd_conn_methods *methods);
+
+PHPAPI struct st_mysqlnd_stmt_methods * mysqlnd_stmt_get_methods();
+PHPAPI void mysqlnd_stmt_set_methods(struct st_mysqlnd_stmt_methods *methods);
+
+
 #define mysqlnd_restart_psession(conn, cache) 
_mysqlnd_restart_psession((conn), (cache) TSRMLS_CC)
 PHPAPI void _mysqlnd_restart_psession(MYSQLND *conn, MYSQLND_THD_ZVAL_PCACHE 
*cache TSRMLS_DC);
 #define mysqlnd_end_psession(conn) _mysqlnd_end_psession((conn) TSRMLS_CC)
@@ -354,7 +361,9 @@
 void   mysqlnd_qcache_put(MYSQLND_QCACHE * const 
cache, char * query, size_t query_len,
   
MYSQLND_RES_BUFFERED * const result, MYSQLND_RES_METADATA * const meta);
 
-
+/* double check the class name to avoid naming conflicts when using these: */
+#define MYSQLND_METHOD(class, method) php_##class##_##method##_pub
+#define MYSQLND_METHOD_PRIVATE(class, method) php_##class##_##method##_priv
 
 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqlnd mysqlnd.c mysqlnd.h mysqlnd_debug.h mysqlnd_palloc.c mysqlnd_ps.c mysqlnd_structs.h

2008-11-20 Thread Andrey Hristov
andrey  Thu Nov 20 17:21:36 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mysqlndmysqlnd.c mysqlnd.h mysqlnd_debug.h 
mysqlnd_palloc.c mysqlnd_ps.c 
mysqlnd_structs.h 
  Log:
  MFH:
  Windows fixes for mysqlnd
  Less warnings + PHPAPI for mysqlnd_poll
  http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.c?r1=1.5.2.34r2=1.5.2.35diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd.c
diff -u php-src/ext/mysqlnd/mysqlnd.c:1.5.2.34 
php-src/ext/mysqlnd/mysqlnd.c:1.5.2.35
--- php-src/ext/mysqlnd/mysqlnd.c:1.5.2.34  Wed Nov 19 17:45:43 2008
+++ php-src/ext/mysqlnd/mysqlnd.c   Thu Nov 20 17:21:36 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd.c,v 1.5.2.34 2008/11/19 17:45:43 andrey Exp $ */
+/* $Id: mysqlnd.c,v 1.5.2.35 2008/11/20 17:21:36 andrey Exp $ */
 #include php.h
 #include mysqlnd.h
 #include mysqlnd_wireprotocol.h
@@ -1003,7 +1003,7 @@
 #endif
 
 /* {{{ _mysqlnd_poll */
-enum_func_status
+PHPAPI enum_func_status
 _mysqlnd_poll(MYSQLND **r_array, MYSQLND **e_array, MYSQLND ***dont_poll, long 
sec, long usec, uint * desc_num TSRMLS_DC)
 {
 
@@ -1382,7 +1382,7 @@
 
 /* {{{ mysqlnd_conn::refresh */
 static enum_func_status
-MYSQLND_METHOD(mysqlnd_conn, refresh)(MYSQLND * const conn, unsigned long 
options TSRMLS_DC)
+MYSQLND_METHOD(mysqlnd_conn, refresh)(MYSQLND * const conn, uint8_t options 
TSRMLS_DC)
 {
zend_uchar bits[1];
DBG_ENTER(mysqlnd_conn::refresh);
@@ -1397,7 +1397,7 @@
 
 /* {{{ mysqlnd_conn::shutdown */
 static enum_func_status
-MYSQLND_METHOD(mysqlnd_conn, shutdown)(MYSQLND * const conn, unsigned long 
level TSRMLS_DC)
+MYSQLND_METHOD(mysqlnd_conn, shutdown)(MYSQLND * const conn, uint8_t level 
TSRMLS_DC)
 {
zend_uchar bits[1];
DBG_ENTER(mysqlnd_conn::shutdown);
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.h?r1=1.3.2.19r2=1.3.2.20diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd.h
diff -u php-src/ext/mysqlnd/mysqlnd.h:1.3.2.19 
php-src/ext/mysqlnd/mysqlnd.h:1.3.2.20
--- php-src/ext/mysqlnd/mysqlnd.h:1.3.2.19  Tue Nov 18 17:02:18 2008
+++ php-src/ext/mysqlnd/mysqlnd.h   Thu Nov 20 17:21:36 2008
@@ -18,12 +18,12 @@
   +--+
 */
 
-/* $Id: mysqlnd.h,v 1.3.2.19 2008/11/18 17:02:18 andrey Exp $ */
+/* $Id: mysqlnd.h,v 1.3.2.20 2008/11/20 17:21:36 andrey Exp $ */
 
 #ifndef MYSQLND_H
 #define MYSQLND_H
 
-#define MYSQLND_VERSION mysqlnd 5.0.5-dev - 081106 - $Revision: 1.3.2.19 $
+#define MYSQLND_VERSION mysqlnd 5.0.5-dev - 081106 - $Revision: 1.3.2.20 $
 #define MYSQLND_VERSION_ID 50005
 
 /* This forces inlining of some accessor functions */
@@ -111,7 +111,7 @@
 #define mysqlnd_reap_async_query(conn) 
(conn)-m-reap_query((conn) TSRMLS_CC)
 #define mysqlnd_unbuffered_skip_result(result) 
(result)-m.skip_result((result) TSRMLS_CC)
 
-enum_func_status _mysqlnd_poll(MYSQLND **r_array, MYSQLND **e_array, MYSQLND 
***dont_poll, long sec, long usec, uint * desc_num TSRMLS_DC);
+PHPAPI enum_func_status _mysqlnd_poll(MYSQLND **r_array, MYSQLND **e_array, 
MYSQLND ***dont_poll, long sec, long usec, uint * desc_num TSRMLS_DC);
 
 #define mysqlnd_use_result(conn)   (conn)-m-use_result((conn) 
TSRMLS_CC)
 #define mysqlnd_store_result(conn) (conn)-m-store_result((conn) 
TSRMLS_CC)
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_debug.h?r1=1.1.2.9r2=1.1.2.10diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_debug.h
diff -u php-src/ext/mysqlnd/mysqlnd_debug.h:1.1.2.9 
php-src/ext/mysqlnd/mysqlnd_debug.h:1.1.2.10
--- php-src/ext/mysqlnd/mysqlnd_debug.h:1.1.2.9 Thu Nov  6 10:37:47 2008
+++ php-src/ext/mysqlnd/mysqlnd_debug.h Thu Nov 20 17:21:36 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd_debug.h,v 1.1.2.9 2008/11/06 10:37:47 andrey Exp $ */
+/* $Id: mysqlnd_debug.h,v 1.1.2.10 2008/11/20 17:21:36 andrey Exp $ */
 
 #ifndef MYSQLND_DEBUG_H
 #define MYSQLND_DEBUG_H
@@ -92,13 +92,13 @@
 #elif MYSQLND_DBG_ENABLED == 0
 
 
-static inline void DBG_INF(char *msg) {}
-static inline void DBG_ERR(char *msg) {}
-static inline void DBG_INF_FMT(char *format, ...) {}
-static inline void DBG_ERR_FMT(char *format, ...) {}
-static inline void DBG_ENTER(char *func_name) {}
+static inline void DBG_INF(const char * const msg) {}
+static inline void DBG_ERR(const char * const msg) {}
+static inline void DBG_INF_FMT(const char * const format, ...) {}
+static inline void DBG_ERR_FMT(const char * const format, ...) {}
+static inline void DBG_ENTER(const char * const func_name) {}
 #define DBG_RETURN(value)  return (value)
-#define DBG_VOID_RETURNreturn;
+#define DBG_VOID_RETURNreturn
 #endif
 
 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqlnd mysqlnd.c

2008-11-19 Thread Andrey Hristov
andrey  Wed Nov 19 17:45:44 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mysqlndmysqlnd.c 
  Log:
  MFH:
  Fix a small bug that mysqlnd::next_result didn't care about an error in a
  multi-statement. In an inner layer the error has been already set, thus it
  needed better massage on the top level.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.c?r1=1.5.2.33r2=1.5.2.34diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd.c
diff -u php-src/ext/mysqlnd/mysqlnd.c:1.5.2.33 
php-src/ext/mysqlnd/mysqlnd.c:1.5.2.34
--- php-src/ext/mysqlnd/mysqlnd.c:1.5.2.33  Tue Nov 18 18:02:44 2008
+++ php-src/ext/mysqlnd/mysqlnd.c   Wed Nov 19 17:45:43 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd.c,v 1.5.2.33 2008/11/18 18:02:44 andrey Exp $ */
+/* $Id: mysqlnd.c,v 1.5.2.34 2008/11/19 17:45:43 andrey Exp $ */
 #include php.h
 #include mysqlnd.h
 #include mysqlnd_wireprotocol.h
@@ -1733,9 +1733,17 @@
  in mysqlnd_store_result() or mysqlnd_fetch_row_unbuffered()
*/
if (FAIL == (ret = mysqlnd_query_read_result_set_header(conn, NULL 
TSRMLS_CC))) {
-   DBG_ERR_FMT(Serious error. %s::%d, __FILE__, __LINE__);
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Serious error. 
PID=%d, getpid());
-   CONN_SET_STATE(conn, CONN_QUIT_SENT);
+   /*
+ There can be an error in the middle of a multi-statement, 
which will cancel the multi-statement.
+ So there are no more results and we should just return FALSE, 
error_no has been set
+   */
+   if (!conn-error_info.error_no) {
+   DBG_ERR_FMT(Serious error. %s::%d, __FILE__, 
__LINE__);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Serious 
error. PID=%d, getpid());
+   CONN_SET_STATE(conn, CONN_QUIT_SENT);
+   } else {
+   DBG_INF_FMT(Error from the server : (%d) %s, 
conn-error_info.error_no, conn-error_info.error);
+   }
}
 
DBG_RETURN(ret);



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /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_stru

2008-10-31 Thread Andrey Hristov
andrey  Fri Oct 31 20:32:17 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mysqlndmysqlnd.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.29r2=1.5.2.30diff_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.8r2=1.1.2.9diff_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_boolzend_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.5r2=1.4.2.6diff_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 = 8bits 
*/
+#ifndef HAVE_INT8
+typedef signed char int8_t;/* Signed integer = 8bits 
*/
 #else
-typedef int8_t int8;   /* Signed integer = 8bits 
*/
+typedef int8 int8_t;   /* Signed integer = 8bits 
*/
 #endif
 #endif
 
 
-#ifndef HAVE_UINT8
 #ifndef HAVE_UINT8_T
-typedef unsigned char uint8;   /* Unsigned integer = 8bits */
+#ifndef HAVE_UINT8
+typedef unsigned char uint8_t; /* Unsigned integer = 8bits */
 #else
-typedef uint8_t uint8; /* Signed integer = 8bits 
*/
+typedef uint8 uint8_t; /* Signed integer = 8bits 
*/
 #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 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqlnd mysqlnd.c

2008-10-01 Thread Johannes Schlüter
johannesWed Oct  1 19:47:17 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mysqlndmysqlnd.c 
  Log:
  MFH: Handle failed connections right
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.c?r1=1.5.2.27r2=1.5.2.28diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd.c
diff -u php-src/ext/mysqlnd/mysqlnd.c:1.5.2.27 
php-src/ext/mysqlnd/mysqlnd.c:1.5.2.28
--- php-src/ext/mysqlnd/mysqlnd.c:1.5.2.27  Mon Sep 15 18:09:20 2008
+++ php-src/ext/mysqlnd/mysqlnd.c   Wed Oct  1 19:47:17 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd.c,v 1.5.2.27 2008/09/15 18:09:20 andrey Exp $ */
+/* $Id: mysqlnd.c,v 1.5.2.28 2008/10/01 19:47:17 johannes Exp $ */
 #include php.h
 #include mysqlnd.h
 #include mysqlnd_wireprotocol.h
@@ -1261,10 +1261,12 @@
DBG_ENTER(mysqlnd_conn::close);
DBG_INF_FMT(conn=%llu, conn-thread_id);
 
-   MYSQLND_INC_CONN_STATISTIC(conn-stats, stat);
-   MYSQLND_DEC_CONN_STATISTIC(conn-stats, STAT_OPENED_CONNECTIONS);
-   if (conn-persistent) {
-   MYSQLND_DEC_CONN_STATISTIC(conn-stats, 
STAT_OPENED_PERSISTENT_CONNECTIONS);
+   if (conn-state = CONN_READY) {
+   MYSQLND_INC_CONN_STATISTIC(conn-stats, stat);
+   MYSQLND_DEC_CONN_STATISTIC(conn-stats, 
STAT_OPENED_CONNECTIONS);
+   if (conn-persistent) {
+   MYSQLND_DEC_CONN_STATISTIC(conn-stats, 
STAT_OPENED_PERSISTENT_CONNECTIONS);
+   }
}
 
/*



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqlnd mysqlnd.c

2008-08-19 Thread Johannes Schlüter
johannesTue Aug 19 10:16:12 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mysqlndmysqlnd.c 
  Log:
  MFH: Fix empty error message when connecting to a bad server
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.c?r1=1.5.2.24r2=1.5.2.25diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd.c
diff -u php-src/ext/mysqlnd/mysqlnd.c:1.5.2.24 
php-src/ext/mysqlnd/mysqlnd.c:1.5.2.25
--- php-src/ext/mysqlnd/mysqlnd.c:1.5.2.24  Tue Jul 15 13:11:09 2008
+++ php-src/ext/mysqlnd/mysqlnd.c   Tue Aug 19 10:16:12 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd.c,v 1.5.2.24 2008/07/15 13:11:09 andrey Exp $ */
+/* $Id: mysqlnd.c,v 1.5.2.25 2008/08/19 10:16:12 johannes Exp $ */
 #include php.h
 #include mysqlnd.h
 #include mysqlnd_wireprotocol.h
@@ -58,7 +58,7 @@
 
 
 
-
+const char * mysqlnd_old_passwd  = mysqlnd cannot connect to MySQL 4.1+ using 
old authentication;
 const char * mysqlnd_server_gone = MySQL server has gone away;
 const char * mysqlnd_out_of_sync = Commands out of sync; you can't run this 
command now;
 
@@ -692,8 +692,8 @@
if (FAIL == PACKET_READ_ALLOCA(ok_packet, conn) || 
ok_packet.field_count = 0xFE) {
if (ok_packet.field_count == 0xFE) {
/* old authentication with new server  !*/
-   DBG_ERR(mysqlnd cannot connect to MySQL 4.1+ using old 
authentication);
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, mysqlnd 
cannot connect to MySQL 4.1+ using old authentication);
+   DBG_ERR(mysqlnd_old_passwd);
+   SET_CLIENT_ERROR(conn-error_info, CR_UNKNOWN_ERROR, 
UNKNOWN_SQLSTATE, mysqlnd_old_passwd);
} else if (ok_packet.field_count == 0xFF) {
if (ok_packet.sqlstate[0]) {
if (!self_alloced) {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqlnd mysqlnd.c mysqlnd_priv.h

2008-08-19 Thread Johannes Schlüter
johannesTue Aug 19 10:42:11 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mysqlndmysqlnd.c mysqlnd_priv.h 
  Log:
  MFH: constify strings
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.c?r1=1.5.2.25r2=1.5.2.26diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd.c
diff -u php-src/ext/mysqlnd/mysqlnd.c:1.5.2.25 
php-src/ext/mysqlnd/mysqlnd.c:1.5.2.26
--- php-src/ext/mysqlnd/mysqlnd.c:1.5.2.25  Tue Aug 19 10:16:12 2008
+++ php-src/ext/mysqlnd/mysqlnd.c   Tue Aug 19 10:42:11 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd.c,v 1.5.2.25 2008/08/19 10:16:12 johannes Exp $ */
+/* $Id: mysqlnd.c,v 1.5.2.26 2008/08/19 10:42:11 johannes Exp $ */
 #include php.h
 #include mysqlnd.h
 #include mysqlnd_wireprotocol.h
@@ -58,9 +58,9 @@
 
 
 
-const char * mysqlnd_old_passwd  = mysqlnd cannot connect to MySQL 4.1+ using 
old authentication;
-const char * mysqlnd_server_gone = MySQL server has gone away;
-const char * mysqlnd_out_of_sync = Commands out of sync; you can't run this 
command now;
+const char * const mysqlnd_old_passwd  = mysqlnd cannot connect to MySQL 4.1+ 
using old authentication;
+const char * const mysqlnd_server_gone = MySQL server has gone away;
+const char * const mysqlnd_out_of_sync = Commands out of sync; you can't run 
this command now;
 
 MYSQLND_STATS *mysqlnd_global_stats = NULL;
 static zend_bool mysqlnd_library_initted = FALSE;
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_priv.h?r1=1.4.2.12r2=1.4.2.13diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_priv.h
diff -u php-src/ext/mysqlnd/mysqlnd_priv.h:1.4.2.12 
php-src/ext/mysqlnd/mysqlnd_priv.h:1.4.2.13
--- php-src/ext/mysqlnd/mysqlnd_priv.h:1.4.2.12 Thu Apr 24 14:22:19 2008
+++ php-src/ext/mysqlnd/mysqlnd_priv.h  Tue Aug 19 10:42:11 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd_priv.h,v 1.4.2.12 2008/04/24 14:22:19 andrey Exp $ */
+/* $Id: mysqlnd_priv.h,v 1.4.2.13 2008/08/19 10:42:11 johannes Exp $ */
 
 #ifndef MYSQLND_PRIV_H
 #define MYSQLND_PRIV_H
@@ -163,8 +163,9 @@
 
 extern struct st_mysqlnd_perm_bind mysqlnd_ps_fetch_functions[MYSQL_TYPE_LAST 
+ 1];
 
-extern const char * mysqlnd_out_of_sync;
-extern const char * mysqlnd_server_gone;
+extern const char * const mysqlnd_old_passwd;
+extern const char * const mysqlnd_out_of_sync;
+extern const char * const mysqlnd_server_gone;
 
 enum_func_status mysqlnd_handle_local_infile(MYSQLND *conn, const char 
*filename, zend_bool *is_warning TSRMLS_DC);
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqlnd mysqlnd.c mysqlnd.h mysqlnd_enum_n_def.h mysqlnd_libmysql_compat.h mysqlnd_palloc.c mysqlnd_result.c mysqlnd_statistics.c php_mysqlnd.c

2008-05-07 Thread Andrey Hristov
andrey  Wed May  7 15:14:26 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mysqlndmysqlnd.c mysqlnd.h mysqlnd_enum_n_def.h 
mysqlnd_libmysql_compat.h mysqlnd_palloc.c 
mysqlnd_result.c mysqlnd_statistics.c 
php_mysqlnd.c 
  Log:
  Update mysqlnd
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.c?r1=1.5.2.19r2=1.5.2.20diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd.c
diff -u php-src/ext/mysqlnd/mysqlnd.c:1.5.2.19 
php-src/ext/mysqlnd/mysqlnd.c:1.5.2.20
--- php-src/ext/mysqlnd/mysqlnd.c:1.5.2.19  Thu Apr 24 14:22:19 2008
+++ php-src/ext/mysqlnd/mysqlnd.c   Wed May  7 15:14:26 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd.c,v 1.5.2.19 2008/04/24 14:22:19 andrey Exp $ */
+/* $Id: mysqlnd.c,v 1.5.2.20 2008/05/07 15:14:26 andrey Exp $ */
 #include php.h
 #include mysqlnd.h
 #include mysqlnd_wireprotocol.h
@@ -1390,7 +1390,7 @@
 }
 /* }}} */
 
-
+#if !defined(MYSQLND_USE_OPTIMISATIONS) || MYSQLND_USE_OPTIMISATIONS == 0
 /* {{{ mysqlnd_get_client_info */
 PHPAPI const char * mysqlnd_get_client_info()
 {
@@ -1405,7 +1405,7 @@
return MYSQLND_VERSION_ID;
 }
 /* }}} */
-
+#endif
 
 /* {{{ mysqlnd_conn::get_server_info */
 static const char *
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.h?r1=1.3.2.14r2=1.3.2.15diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd.h
diff -u php-src/ext/mysqlnd/mysqlnd.h:1.3.2.14 
php-src/ext/mysqlnd/mysqlnd.h:1.3.2.15
--- php-src/ext/mysqlnd/mysqlnd.h:1.3.2.14  Thu Apr 24 14:22:19 2008
+++ php-src/ext/mysqlnd/mysqlnd.h   Wed May  7 15:14:26 2008
@@ -18,13 +18,13 @@
   +--+
 */
 
-/* $Id: mysqlnd.h,v 1.3.2.14 2008/04/24 14:22:19 andrey Exp $ */
+/* $Id: mysqlnd.h,v 1.3.2.15 2008/05/07 15:14:26 andrey Exp $ */
 
 #ifndef MYSQLND_H
 #define MYSQLND_H
 
-#define MYSQLND_VERSION mysqlnd 5.0.3-dev - 080129 - $Revision: 1.3.2.14 $
-#define MYSQLND_VERSION_ID 50002
+#define MYSQLND_VERSION mysqlnd 5.0.4-dev - 080501 - $Revision: 1.3.2.15 $
+#define MYSQLND_VERSION_ID 50004
 
 /* This forces inlining of some accessor functions */
 #define MYSQLND_USE_OPTIMISATIONS 0
@@ -138,13 +138,13 @@
 #define mysqlnd_get_proto_info(conn)   (conn)-protocol_version
 #define mysqlnd_thread_id(conn)(conn)-thread_id
 
-#define mysqlnd_num_rows(result)   ((result)-data? 
(result)-data-row_count:0)
+#define mysqlnd_num_rows(result)   ((result)-stored_data? 
(result)-stored_data-row_count:0)
 #define mysqlnd_num_fields(result) (result)-field_count
 
 #define mysqlnd_fetch_lengths(result)  ((result)-m.fetch_lengths? 
(result)-m.fetch_lengths((result)):NULL)
 
 #define mysqlnd_field_seek(result, ofs)
(result)-m.seek_field((result), (ofs))
-#define mysqlnd_field_tell(result) (result)-meta? 
(result)-meta-current_field:0)
+#define mysqlnd_field_tell(result) 
((result)-meta? (result)-meta-current_field:0)
 #define mysqlnd_fetch_field(result)
(result)-m.fetch_field((result) TSRMLS_CC)
 #define mysqlnd_fetch_field_direct(result,fnr) ((result)-meta? 
((result)-meta-fields[(fnr)]):NULL)
 #define mysqlnd_fetch_fields(result)   ((result)-meta? 
(result)-meta-fields: NULL)
@@ -358,6 +358,7 @@
MYSQLND_DEBUG   *dbg;   /* The DBG object */
longnet_cmd_buffer_size;
longnet_read_buffer_size;
+   longlog_mask;
 #ifdef MYSQLND_THREADED
THREAD_Tthread_id;
 #endif
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_enum_n_def.h?r1=1.2.2.8r2=1.2.2.9diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_enum_n_def.h
diff -u php-src/ext/mysqlnd/mysqlnd_enum_n_def.h:1.2.2.8 
php-src/ext/mysqlnd/mysqlnd_enum_n_def.h:1.2.2.9
--- php-src/ext/mysqlnd/mysqlnd_enum_n_def.h:1.2.2.8Thu Apr 24 14:22:19 2008
+++ php-src/ext/mysqlnd/mysqlnd_enum_n_def.hWed May  7 15:14:26 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd_enum_n_def.h,v 1.2.2.8 2008/04/24 14:22:19 andrey Exp $ */
+/* $Id: mysqlnd_enum_n_def.h,v 1.2.2.9 2008/05/07 15:14:26 andrey Exp $ */
 #ifndef MYSQLND_ENUM_N_DEF_H
 #define MYSQLND_ENUM_N_DEF_H
 
@@ -31,8 +31,8 @@
 #define SERVER_STATUS_IN_TRANS 1   /* 
Transaction has started */
 #define SERVER_STATUS_AUTOCOMMIT   2   /* 
Server in auto_commit mode */
 #define SERVER_MORE_RESULTS_EXISTS 8   /* 
Multi query - next query exists */
-#define MYSQLND_SERVER_QUERY_NO_GOOD_INDEX_USED16
-#define MYSQLND_SERVER_QUERY_NO_INDEX_USED   

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqlnd mysqlnd.c mysqlnd.h mysqlnd_debug.c mysqlnd_result.c mysqlnd_wireprotocol.c mysqlnd_wireprotocol.h php_mysqlnd.c

2008-02-14 Thread Andrey Hristov
andrey  Thu Feb 14 12:49:30 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mysqlndmysqlnd.c mysqlnd.h mysqlnd_debug.c 
mysqlnd_result.c mysqlnd_wireprotocol.c 
mysqlnd_wireprotocol.h php_mysqlnd.c 
  Log:
  Update mysqlnd - fix bg_store
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.c?r1=1.5.2.14r2=1.5.2.15diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd.c
diff -u php-src/ext/mysqlnd/mysqlnd.c:1.5.2.14 
php-src/ext/mysqlnd/mysqlnd.c:1.5.2.15
--- php-src/ext/mysqlnd/mysqlnd.c:1.5.2.14  Mon Feb  4 17:55:06 2008
+++ php-src/ext/mysqlnd/mysqlnd.c   Thu Feb 14 12:49:30 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd.c,v 1.5.2.14 2008/02/04 17:55:06 andrey Exp $ */
+/* $Id: mysqlnd.c,v 1.5.2.15 2008/02/14 12:49:30 andrey Exp $ */
 #include php.h
 #include mysqlnd.h
 #include mysqlnd_wireprotocol.h
@@ -28,6 +28,8 @@
 #include mysqlnd_charset.h
 #include mysqlnd_debug.h
 #include mysqlnd_block_alloc.h
+/* for php_get_current_user() */
+#include ext/standard/basic_functions.h 
 
 /* the server doesn't support 4byte utf8, but let's make it forward compatible 
*/
 #define MYSQLND_MAX_ALLOWED_USER_LEN   256  /* 64 char * 4byte */
@@ -544,7 +546,7 @@
 
 
PACKET_INIT_ALLOCA(greet_packet, PROT_GREET_PACKET);
-   PACKET_INIT(auth_packet, PROT_AUTH_PACKET, php_mysql_packet_auth *);
+   PACKET_INIT(auth_packet, PROT_AUTH_PACKET, php_mysql_packet_auth *, 
FALSE);
PACKET_INIT_ALLOCA(ok_packet, PROT_OK_PACKET);
 
if (!conn) {
@@ -849,7 +851,7 @@
   
FALSE TSRMLS_CC)) {
DBG_RETURN(FAIL);
}
-
+   CONN_SET_STATE(conn, CONN_QUERY_SENT);
/*
  Here read the result set. We don't do it in simple_command because it 
need
  information from the ok packet. We will fetch it ourselves.
@@ -1338,6 +1340,7 @@
 #ifdef MYSQLND_THREADED
tsrm_mutex_lock(conn-LOCK_state);
 #endif
+   DBG_INF_FMT(New state=%d, new_state);
conn-state = new_state;
 #ifdef MYSQLND_THREADED
tsrm_mutex_unlock(conn-LOCK_state);
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.h?r1=1.3.2.9r2=1.3.2.10diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd.h
diff -u php-src/ext/mysqlnd/mysqlnd.h:1.3.2.9 
php-src/ext/mysqlnd/mysqlnd.h:1.3.2.10
--- php-src/ext/mysqlnd/mysqlnd.h:1.3.2.9   Mon Feb 11 16:44:48 2008
+++ php-src/ext/mysqlnd/mysqlnd.h   Thu Feb 14 12:49:30 2008
@@ -18,12 +18,12 @@
   +--+
 */
 
-/* $Id: mysqlnd.h,v 1.3.2.9 2008/02/11 16:44:48 andrey Exp $ */
+/* $Id: mysqlnd.h,v 1.3.2.10 2008/02/14 12:49:30 andrey Exp $ */
 
 #ifndef MYSQLND_H
 #define MYSQLND_H
 
-#define MYSQLND_VERSION mysqlnd 5.0.3-dev - 080129 - $Revision: 1.3.2.9 $
+#define MYSQLND_VERSION mysqlnd 5.0.3-dev - 080129 - $Revision: 1.3.2.10 $
 #define MYSQLND_VERSION_ID 50002
 
 /* This forces inlining of some accessor functions */
@@ -346,6 +346,9 @@
MYSQLND_DEBUG   *dbg;   /* The DBG object */
longnet_cmd_buffer_size;
longnet_read_buffer_size;
+#ifdef ZTS
+   THREAD_Tthread_id;
+#endif
 ZEND_END_MODULE_GLOBALS(mysqlnd)
 
 ZEND_EXTERN_MODULE_GLOBALS(mysqlnd);
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_debug.c?r1=1.1.2.5r2=1.1.2.6diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_debug.c
diff -u php-src/ext/mysqlnd/mysqlnd_debug.c:1.1.2.5 
php-src/ext/mysqlnd/mysqlnd_debug.c:1.1.2.6
--- php-src/ext/mysqlnd/mysqlnd_debug.c:1.1.2.5 Mon Feb 11 16:44:48 2008
+++ php-src/ext/mysqlnd/mysqlnd_debug.c Thu Feb 14 12:49:30 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd_debug.c,v 1.1.2.5 2008/02/11 16:44:48 andrey Exp $ */
+/* $Id: mysqlnd_debug.c,v 1.1.2.6 2008/02/14 12:49:30 andrey Exp $ */
 
 #include php.h
 #include mysqlnd.h
@@ -95,6 +95,12 @@
 line_buffer[6], level_buffer[7];
MYSQLND_ZTS(self);
 
+#ifdef ZTS
+   if (MYSQLND_G(thread_id) != tsrm_thread_id()) {
+   return PASS; /* don't trace background threads */
+   }
+#endif
+
if (!self-stream) {
if (FAIL == self-m-open(self, FALSE)) {
return FAIL;
@@ -195,6 +201,12 @@
 line_buffer[6], level_buffer[7];
MYSQLND_ZTS(self);
 
+#ifdef ZTS
+   if (MYSQLND_G(thread_id) != tsrm_thread_id()) {
+   return PASS; /* don't trace background threads */
+   }
+#endif
+
if (!self-stream) {
if (FAIL == self-m-open(self, FALSE)) {
return FAIL;
@@ -291,9 +303,15 @@

  unsigned 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqlnd mysqlnd.c

2008-02-04 Thread Andrey Hristov
andrey  Mon Feb  4 17:55:06 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mysqlndmysqlnd.c 
  Log:
  Simplify unique string generation and plug a leak.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.c?r1=1.5.2.13r2=1.5.2.14diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd.c
diff -u php-src/ext/mysqlnd/mysqlnd.c:1.5.2.13 
php-src/ext/mysqlnd/mysqlnd.c:1.5.2.14
--- php-src/ext/mysqlnd/mysqlnd.c:1.5.2.13  Tue Jan 29 18:11:46 2008
+++ php-src/ext/mysqlnd/mysqlnd.c   Mon Feb  4 17:55:06 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd.c,v 1.5.2.13 2008/01/29 18:11:46 andrey Exp $ */
+/* $Id: mysqlnd.c,v 1.5.2.14 2008/02/04 17:55:06 andrey Exp $ */
 #include php.h
 #include mysqlnd.h
 #include mysqlnd_wireprotocol.h
@@ -28,8 +28,6 @@
 #include mysqlnd_charset.h
 #include mysqlnd_debug.h
 #include mysqlnd_block_alloc.h
-#include ext/standard/basic_functions.h
-#include ext/standard/php_lcg.h
 
 /* the server doesn't support 4byte utf8, but let's make it forward compatible 
*/
 #define MYSQLND_MAX_ALLOWED_USER_LEN   256  /* 64 char * 4byte */
@@ -544,15 +542,6 @@
}
DBG_INF_FMT(transport=%p, transport);
 
-   if (conn-persistent) {
-   struct timeval tv;
-   gettimeofday(tv, NULL);
-   /* We should generate something unique */
-   hashed_details_len = spprintf(hashed_details, 0, [EMAIL 
PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED],
- 
transport, user, db, tv.tv_sec, (long int)tv.tv_usec,
- 
php_combined_lcg(TSRMLS_C) * 10);
-   DBG_INF_FMT(hashed_details=%s, hashed_details);
-   } 
 
PACKET_INIT_ALLOCA(greet_packet, PROT_GREET_PACKET);
PACKET_INIT(auth_packet, PROT_AUTH_PACKET, php_mysql_packet_auth *);
@@ -563,6 +552,19 @@
self_alloced = TRUE;
}
 
+   if (conn-persistent) {
+#if 0
+   struct timeval tv;
+   gettimeofday(tv, NULL);
+   /* We should generate something unique */
+   hashed_details_len = spprintf(hashed_details, 0, [EMAIL 
PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED],
+ 
transport, user, db, tv.tv_sec, (long int)tv.tv_usec,
+ 
php_combined_lcg(TSRMLS_C) * 10);
+#endif
+   hashed_details_len = spprintf(hashed_details, 0, %p, conn);
+   DBG_INF_FMT(hashed_details=%s, hashed_details);
+   } 
+
CONN_SET_STATE(conn, CONN_ALLOCED);
conn-net.packet_no = 0;
 
@@ -584,6 +586,9 @@
DBG_INF_FMT(stream=%p, conn-net.stream);
 
if (errstr || !conn-net.stream) {
+   if (hashed_details) {
+   mnd_efree(hashed_details);
+   }
goto err;
}
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqlnd mysqlnd.c mysqlnd_statistics.c mysqlnd_statistics.h

2008-01-29 Thread Andrey Hristov
andrey  Tue Jan 29 11:59:53 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mysqlndmysqlnd.c mysqlnd_statistics.c 
mysqlnd_statistics.h 
  Log:
  Moved initialization code into a function.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.c?r1=1.5.2.11r2=1.5.2.12diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd.c
diff -u php-src/ext/mysqlnd/mysqlnd.c:1.5.2.11 
php-src/ext/mysqlnd/mysqlnd.c:1.5.2.12
--- php-src/ext/mysqlnd/mysqlnd.c:1.5.2.11  Mon Jan 28 23:23:08 2008
+++ php-src/ext/mysqlnd/mysqlnd.c   Tue Jan 29 11:59:53 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd.c,v 1.5.2.11 2008/01/28 23:23:08 andrey Exp $ */
+/* $Id: mysqlnd.c,v 1.5.2.12 2008/01/29 11:59:53 andrey Exp $ */
 #include php.h
 #include mysqlnd.h
 #include mysqlnd_wireprotocol.h
@@ -133,10 +133,7 @@
mysqlnd_library_initted = TRUE;
_mysqlnd_init_ps_subsystem();
/* Should be calloc, as mnd_calloc will reference LOCK_access*/
-   mysqlnd_global_stats = calloc(1, sizeof(MYSQLND_STATS));
-#ifdef ZTS
-   mysqlnd_global_stats-LOCK_access = tsrm_mutex_alloc();
-#endif
+   mysqlnd_stats_init(mysqlnd_global_stats);
}
 }
 /* }}} */
@@ -146,11 +143,7 @@
 void mysqlnd_library_end(TSRMLS_D)
 {
if (mysqlnd_library_initted == TRUE) {
-#ifdef ZTS
-   tsrm_mutex_free(mysqlnd_global_stats-LOCK_access);
-#endif
-   /* mnd_free will reference LOCK_access and crash...*/
-   free(mysqlnd_global_stats);
+   mysqlnd_stats_end(mysqlnd_global_stats);
mysqlnd_global_stats = NULL;
mysqlnd_library_initted = FALSE;
}
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_statistics.c?r1=1.2.2.4r2=1.2.2.5diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_statistics.c
diff -u php-src/ext/mysqlnd/mysqlnd_statistics.c:1.2.2.4 
php-src/ext/mysqlnd/mysqlnd_statistics.c:1.2.2.5
--- php-src/ext/mysqlnd/mysqlnd_statistics.c:1.2.2.4Wed Jan 23 19:11:28 2008
+++ php-src/ext/mysqlnd/mysqlnd_statistics.cTue Jan 29 11:59:53 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd_statistics.c,v 1.2.2.4 2008/01/23 19:11:28 andrey Exp $ */
+/* $Id: mysqlnd_statistics.c,v 1.2.2.5 2008/01/29 11:59:53 andrey Exp $ */
 #include php.h
 #include mysqlnd.h
 #include mysqlnd_priv.h
@@ -145,6 +145,32 @@
 /* }}} */
 
 
+/* {{{ mysqlnd_stats_init */
+void
+mysqlnd_stats_init(MYSQLND_STATS ** stats)
+{
+   *stats = calloc(1, sizeof(MYSQLND_STATS));
+#ifdef ZTS
+   (*stats)-LOCK_access = tsrm_mutex_alloc();
+#endif
+
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_stats_end */
+void
+mysqlnd_stats_end(MYSQLND_STATS * stats)
+{
+#ifdef ZTS
+   tsrm_mutex_free(stats-LOCK_access);
+#endif
+   /* mnd_free will reference LOCK_access and crash...*/
+   free(stats);
+}
+/* }}} */
+
+
 /*
  * Local variables:
  * tab-width: 4
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_statistics.h?r1=1.4.2.6r2=1.4.2.7diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_statistics.h
diff -u php-src/ext/mysqlnd/mysqlnd_statistics.h:1.4.2.6 
php-src/ext/mysqlnd/mysqlnd_statistics.h:1.4.2.7
--- php-src/ext/mysqlnd/mysqlnd_statistics.h:1.4.2.6Wed Jan 23 19:11:28 2008
+++ php-src/ext/mysqlnd/mysqlnd_statistics.hTue Jan 29 11:59:53 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd_statistics.h,v 1.4.2.6 2008/01/23 19:11:28 andrey Exp $ */
+/* $Id: mysqlnd_statistics.h,v 1.4.2.7 2008/01/29 11:59:53 andrey Exp $ */
 
 #ifndef MYSQLND_STATISTICS_H
 #define MYSQLND_STATISTICS_H
@@ -196,6 +196,10 @@
 void mysqlnd_fill_stats_hash(const MYSQLND_STATS * const stats, zval 
*return_value
 TSRMLS_DC 
ZEND_FILE_LINE_DC);
 
+
+void mysqlnd_stats_init(MYSQLND_STATS ** stats);
+void mysqlnd_stats_end(MYSQLND_STATS * stats);
+
 #endif /* MYSQLND_STATISTICS_H */
 
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqlnd mysqlnd.c mysqlnd_debug.h mysqlnd_enum_n_def.h mysqlnd_loaddata.c mysqlnd_palloc.h mysqlnd_priv.h mysqlnd_result.h mysqlnd_result_meta.h mysqlnd_statistics

2008-01-08 Thread Andrey Hristov
andrey  Tue Jan  8 13:11:55 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mysqlndmysqlnd.c mysqlnd_debug.h mysqlnd_enum_n_def.h 
mysqlnd_loaddata.c mysqlnd_palloc.h 
mysqlnd_priv.h mysqlnd_result.h 
mysqlnd_result_meta.h mysqlnd_statistics.h 
mysqlnd_wireprotocol.c mysqlnd_wireprotocol.h 
php_mysqlnd.h 
  Log:
  strncpy-strlcpy
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.c?r1=1.5.2.6r2=1.5.2.7diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd.c
diff -u php-src/ext/mysqlnd/mysqlnd.c:1.5.2.6 
php-src/ext/mysqlnd/mysqlnd.c:1.5.2.7
--- php-src/ext/mysqlnd/mysqlnd.c:1.5.2.6   Wed Jan  2 21:14:34 2008
+++ php-src/ext/mysqlnd/mysqlnd.c   Tue Jan  8 13:11:55 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd.c,v 1.5.2.6 2008/01/02 21:14:34 andrey Exp $ */
+/* $Id: mysqlnd.c,v 1.5.2.7 2008/01/08 13:11:55 andrey Exp $ */
 #include php.h
 #include mysqlnd.h
 #include mysqlnd_wireprotocol.h
@@ -676,14 +676,14 @@
} else if (ok_packet.field_count == 0xFF) {
if (ok_packet.sqlstate[0]) {
if (!self_alloced) {
-   strncpy(conn-error_info.sqlstate, 
ok_packet.sqlstate, sizeof(conn-error_info.sqlstate));
+   strlcpy(conn-error_info.sqlstate, 
ok_packet.sqlstate, sizeof(conn-error_info.sqlstate));
}
DBG_ERR_FMT(ERROR:%d [SQLSTATE:%s] %s,
ok_packet.error_no, 
ok_packet.sqlstate, ok_packet.error);
}
if (!self_alloced) {
conn-error_info.error_no = ok_packet.error_no;
-   strncpy(conn-error_info.error, 
ok_packet.error, sizeof(conn-error_info.error));
+   strlcpy(conn-error_info.error, 
ok_packet.error, sizeof(conn-error_info.error));
}
}
} else {
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_debug.h?r1=1.1.2.4r2=1.1.2.5diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_debug.h
diff -u php-src/ext/mysqlnd/mysqlnd_debug.h:1.1.2.4 
php-src/ext/mysqlnd/mysqlnd_debug.h:1.1.2.5
--- php-src/ext/mysqlnd/mysqlnd_debug.h:1.1.2.4 Mon Dec 31 07:17:10 2007
+++ php-src/ext/mysqlnd/mysqlnd_debug.h Tue Jan  8 13:11:55 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd_debug.h,v 1.1.2.4 2007/12/31 07:17:10 sebastian Exp $ */
+/* $Id: mysqlnd_debug.h,v 1.1.2.5 2008/01/08 13:11:55 andrey Exp $ */
 
 #ifndef MYSQLND_DEBUG_H
 #define MYSQLND_DEBUG_H
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_enum_n_def.h?r1=1.2.2.3r2=1.2.2.4diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_enum_n_def.h
diff -u php-src/ext/mysqlnd/mysqlnd_enum_n_def.h:1.2.2.3 
php-src/ext/mysqlnd/mysqlnd_enum_n_def.h:1.2.2.4
--- php-src/ext/mysqlnd/mysqlnd_enum_n_def.h:1.2.2.3Mon Dec 31 07:17:10 2007
+++ php-src/ext/mysqlnd/mysqlnd_enum_n_def.hTue Jan  8 13:11:55 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd_enum_n_def.h,v 1.2.2.3 2007/12/31 07:17:10 sebastian Exp $ */
+/* $Id: mysqlnd_enum_n_def.h,v 1.2.2.4 2008/01/08 13:11:55 andrey Exp $ */
 #ifndef MYSQLND_ENUM_N_DEF_H
 #define MYSQLND_ENUM_N_DEF_H
 
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_loaddata.c?r1=1.2.2.3r2=1.2.2.4diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_loaddata.c
diff -u php-src/ext/mysqlnd/mysqlnd_loaddata.c:1.2.2.3 
php-src/ext/mysqlnd/mysqlnd_loaddata.c:1.2.2.4
--- php-src/ext/mysqlnd/mysqlnd_loaddata.c:1.2.2.3  Mon Dec 31 07:17:10 2007
+++ php-src/ext/mysqlnd/mysqlnd_loaddata.c  Tue Jan  8 13:11:55 2008
@@ -113,7 +113,7 @@
DBG_ENTER(mysqlnd_local_infile_error);
 
if (info) {
-   strncpy(error_buf, info-error_msg, error_buf_len);
+   strlcpy(error_buf, info-error_msg, error_buf_len);
DBG_INF_FMT(have info, %d, info-error_no);
DBG_RETURN(info-error_no);
}
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_palloc.h?r1=1.2.2.3r2=1.2.2.4diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_palloc.h
diff -u php-src/ext/mysqlnd/mysqlnd_palloc.h:1.2.2.3 
php-src/ext/mysqlnd/mysqlnd_palloc.h:1.2.2.4
--- php-src/ext/mysqlnd/mysqlnd_palloc.h:1.2.2.3Mon Dec 31 07:17:10 2007
+++ php-src/ext/mysqlnd/mysqlnd_palloc.hTue Jan  8 13:11:55 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd_palloc.h,v 1.2.2.3 2007/12/31 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqlnd mysqlnd.c mysqlnd.h mysqlnd_libmysql_compat.h mysqlnd_portability.h mysqlnd_priv.h mysqlnd_ps.c mysqlnd_ps_codec.c mysqlnd_result.c mysqlnd_statistics.h my

2008-01-02 Thread Andrey Hristov
andrey  Wed Jan  2 21:14:36 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mysqlndmysqlnd.c mysqlnd.h 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:
  - Fix problems with double definitions
  - Clean up a bit a type mess - 4 types less. No need to have aliases
for the same thing (unification is the name).
  - New macro for Johannes mysqlnd_stmt_ro_result_metadata
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.c?r1=1.5.2.5r2=1.5.2.6diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd.c
diff -u php-src/ext/mysqlnd/mysqlnd.c:1.5.2.5 
php-src/ext/mysqlnd/mysqlnd.c:1.5.2.6
--- php-src/ext/mysqlnd/mysqlnd.c:1.5.2.5   Mon Dec 31 07:17:10 2007
+++ php-src/ext/mysqlnd/mysqlnd.c   Wed Jan  2 21:14:34 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd.c,v 1.5.2.5 2007/12/31 07:17:10 sebastian Exp $ */
+/* $Id: mysqlnd.c,v 1.5.2.6 2008/01/02 21:14:34 andrey Exp $ */
 #include php.h
 #include mysqlnd.h
 #include mysqlnd_wireprotocol.h
@@ -1283,7 +1283,7 @@
 
 
 /* {{{ mysqlnd_conn::insert_id */
-static mynd_ulonglong
+static uint64
 MYSQLND_METHOD(mysqlnd_conn, insert_id)(const MYSQLND * const conn)
 {
return conn-upsert_status.last_insert_id;
@@ -1292,7 +1292,7 @@
 
 
 /* {{{ mysqlnd_conn::affected_rows */
-static mynd_ulonglong
+static uint64
 MYSQLND_METHOD(mysqlnd_conn, affected_rows)(const MYSQLND * const conn)
 {
return conn-upsert_status.affected_rows;
@@ -1371,7 +1371,7 @@
 
 
 /* {{{ mysqlnd_conn::thread_id */
-static mynd_ulonglong
+static uint64
 MYSQLND_METHOD(mysqlnd_conn, thread_id)(const MYSQLND * const conn)
 {
return conn-thread_id;
@@ -1425,7 +1425,7 @@
}
 
SET_EMPTY_ERROR(conn-error_info);
-   conn-upsert_status.affected_rows= ~(mynd_ulonglong) 0;
+   SET_ERROR_AFF_ROWS(conn);
/*
  We are sure that there is a result set, since conn-state is set 
accordingly
  in mysqlnd_store_result() or mysqlnd_fetch_row_unbuffered()
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.h?r1=1.3.2.3r2=1.3.2.4diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd.h
diff -u php-src/ext/mysqlnd/mysqlnd.h:1.3.2.3 
php-src/ext/mysqlnd/mysqlnd.h:1.3.2.4
--- php-src/ext/mysqlnd/mysqlnd.h:1.3.2.3   Mon Dec 31 07:17:10 2007
+++ php-src/ext/mysqlnd/mysqlnd.h   Wed Jan  2 21:14:35 2008
@@ -18,12 +18,12 @@
   +--+
 */
 
-/* $Id: mysqlnd.h,v 1.3.2.3 2007/12/31 07:17:10 sebastian Exp $ */
+/* $Id: mysqlnd.h,v 1.3.2.4 2008/01/02 21:14:35 andrey Exp $ */
 
 #ifndef MYSQLND_H
 #define MYSQLND_H
 
-#define MYSQLND_VERSION mysqlnd 5.0.2-dev - 070928 - $Revision: 1.3.2.3 $
+#define MYSQLND_VERSION mysqlnd 5.0.2-dev - 070928 - $Revision: 1.3.2.4 $
 #define MYSQLND_VERSION_ID 50002
 
 /* This forces inlining of some accessor functions */
@@ -250,6 +250,7 @@
 #define mysqlnd_stmt_bind_result(stmt,bind)(stmt)-m-bind_result((stmt), 
(bind) TSRMLS_CC)
 #define mysqlnd_stmt_param_metadata(stmt)  
(stmt)-m-get_parameter_metadata((stmt))
 #define mysqlnd_stmt_result_metadata(stmt) 
(stmt)-m-get_result_metadata((stmt) TSRMLS_CC)
+#define mysqlnd_stmt_ronly_result_metadata(stmt) ((stmt)-result)
 
 #definemysqlnd_stmt_free_result(stmt)  
(stmt)-m-free_result((stmt) TSRMLS_CC)
 #definemysqlnd_stmt_close(stmt, implicit)  (stmt)-m-dtor((stmt), 
(implicit) TSRMLS_CC)
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_libmysql_compat.h?r1=1.1.2.3r2=1.1.2.4diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_libmysql_compat.h
diff -u php-src/ext/mysqlnd/mysqlnd_libmysql_compat.h:1.1.2.3 
php-src/ext/mysqlnd/mysqlnd_libmysql_compat.h:1.1.2.4
--- php-src/ext/mysqlnd/mysqlnd_libmysql_compat.h:1.1.2.3   Mon Dec 31 
07:17:10 2007
+++ php-src/ext/mysqlnd/mysqlnd_libmysql_compat.h   Wed Jan  2 21:14:35 2008
@@ -31,7 +31,7 @@
 #define MYSQL_ROW  MYSQLND_ROW
 #define MYSQL  MYSQLND
 #define my_boolzend_bool
-#define my_ulonglong   mynd_ulonglong
+#define my_ulonglong   uint64
 
 #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.2r2=1.4.2.3diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_portability.h
diff -u php-src/ext/mysqlnd/mysqlnd_portability.h:1.4.2.2 
php-src/ext/mysqlnd/mysqlnd_portability.h:1.4.2.3
--- 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqlnd mysqlnd.c

2007-11-08 Thread Andrey Hristov
andrey  Thu Nov  8 17:29:42 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mysqlndmysqlnd.c 
  Log:
  Fix segfault in debug build
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.c?r1=1.5.2.3r2=1.5.2.4diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd.c
diff -u php-src/ext/mysqlnd/mysqlnd.c:1.5.2.3 
php-src/ext/mysqlnd/mysqlnd.c:1.5.2.4
--- php-src/ext/mysqlnd/mysqlnd.c:1.5.2.3   Tue Oct 23 10:10:18 2007
+++ php-src/ext/mysqlnd/mysqlnd.c   Thu Nov  8 17:29:42 2007
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd.c,v 1.5.2.3 2007/10/23 10:10:18 andrey Exp $ */
+/* $Id: mysqlnd.c,v 1.5.2.4 2007/11/08 17:29:42 andrey Exp $ */
 #include php.h
 #include mysqlnd.h
 #include mysqlnd_wireprotocol.h
@@ -571,6 +571,10 @@

NULL /*ctx*/, errstr, errcode);
DBG_INF_FMT(stream=%p, conn-net.stream);
 
+   if (errstr || !conn-net.stream) {
+   goto err;
+   }
+
if (hashed_details) {
/*
  If persistent, the streams register it in EG(persistent_list).
@@ -597,10 +601,6 @@
mnd_efree(hashed_details);
}
 
-   if (errstr || !conn-net.stream) {
-   goto err;
-   }
-
if (conn-options.timeout_read)
{
tv.tv_sec = conn-options.timeout_read;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqlnd mysqlnd.c mysqlnd_debug.h

2007-10-24 Thread Andrey Hristov
 Hallo Marcus,
Marcus Boerger wrote:
 Hello Andrey,
 
   basically you cannot use any define. And when you want to be platform
 agnostic/independent then you must assume all posix/c-api functions are
 defines.

I already suspected this when I wrote the code but gcc had no probs with
it. The windows error came as surprise to me, but anyway lesson learnt.

 marcus
 
 Tuesday, October 23, 2007, 12:10:18 PM, you wrote:
 
 andrey  Tue Oct 23 10:10:18 2007 UTC
 
   Modified files:  (Branch: PHP_5_3)
 /php-src/ext/mysqlndmysqlnd.c mysqlnd_debug.h 
   Log:
   Fix build failure on Windows. Seems free can't be used even as method
 name of a structure. The MS compiler (the
 preprocessor most probably) changes it to _free_dbg
   
 http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.c?r1=1.5.2.2r2=1.5.2.3diff_format=u
 Index: php-src/ext/mysqlnd/mysqlnd.c
 diff -u php-src/ext/mysqlnd/mysqlnd.c:1.5.2.2
 php-src/ext/mysqlnd/mysqlnd.c:1.5.2.3
 --- php-src/ext/mysqlnd/mysqlnd.c:1.5.2.2   Fri Oct  5 21:23:56 2007
 +++ php-src/ext/mysqlnd/mysqlnd.c   Tue Oct 23 10:10:18 2007
 @@ -18,7 +18,7 @@
+--+
  */
  
 -/* $Id: mysqlnd.c,v 1.5.2.2 2007/10/05 21:23:56 andrey Exp $ */
 +/* $Id: mysqlnd.c,v 1.5.2.3 2007/10/23 10:10:18 andrey Exp $ */
  #include php.h
  #include mysqlnd.h
  #include mysqlnd_wireprotocol.h
 @@ -2032,7 +2032,7 @@
 DBG_ENTER(RSHUTDOWN);
 if (dbg) {
 dbg-m-close(dbg);
 -   dbg-m-free(dbg);
 +   dbg-m-free_handle(dbg);
 MYSQLND_G(dbg) = NULL;
 }
  #endif
 http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_debug.h?r1=1.1.2.2r2=1.1.2.3diff_format=u
 Index: php-src/ext/mysqlnd/mysqlnd_debug.h
 diff -u php-src/ext/mysqlnd/mysqlnd_debug.h:1.1.2.2
 php-src/ext/mysqlnd/mysqlnd_debug.h:1.1.2.3
 --- php-src/ext/mysqlnd/mysqlnd_debug.h:1.1.2.2 Fri Oct  5 21:23:56 2007
 +++ php-src/ext/mysqlnd/mysqlnd_debug.h Tue Oct 23 10:10:18 2007
 @@ -18,7 +18,7 @@
+--+
  */
  
 -/* $Id: mysqlnd_debug.h,v 1.1.2.2 2007/10/05 21:23:56 andrey Exp $ */
 +/* $Id: mysqlnd_debug.h,v 1.1.2.3 2007/10/23 10:10:18 andrey Exp $ */
  
  #ifndef MYSQLND_DEBUG_H
  #define MYSQLND_DEBUG_H
 @@ -39,7 +39,7 @@
 char * func_name, 
 uint func_name_len);
 enum_func_status (*func_leave)(MYSQLND_DEBUG *self, unsigned int 
 line, const char * const file);
 enum_func_status (*close)(MYSQLND_DEBUG *self);
 -   enum_func_status (*free)(MYSQLND_DEBUG *self);
 +   enum_func_status (*free_handle)(MYSQLND_DEBUG *self);
  };
  
  struct st_mysqlnd_debug
 
 
 
 
 Best regards,
  Marcus
 

Grüße,
Andrey

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqlnd mysqlnd.c mysqlnd_debug.h

2007-10-23 Thread Andrey Hristov
andrey  Tue Oct 23 10:10:18 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mysqlndmysqlnd.c mysqlnd_debug.h 
  Log:
  Fix build failure on Windows. Seems free can't be used even as method name 
of a structure. The MS compiler (the preprocessor most probably) changes it to 
_free_dbg
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.c?r1=1.5.2.2r2=1.5.2.3diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd.c
diff -u php-src/ext/mysqlnd/mysqlnd.c:1.5.2.2 
php-src/ext/mysqlnd/mysqlnd.c:1.5.2.3
--- php-src/ext/mysqlnd/mysqlnd.c:1.5.2.2   Fri Oct  5 21:23:56 2007
+++ php-src/ext/mysqlnd/mysqlnd.c   Tue Oct 23 10:10:18 2007
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd.c,v 1.5.2.2 2007/10/05 21:23:56 andrey Exp $ */
+/* $Id: mysqlnd.c,v 1.5.2.3 2007/10/23 10:10:18 andrey Exp $ */
 #include php.h
 #include mysqlnd.h
 #include mysqlnd_wireprotocol.h
@@ -2032,7 +2032,7 @@
DBG_ENTER(RSHUTDOWN);
if (dbg) {
dbg-m-close(dbg);
-   dbg-m-free(dbg);
+   dbg-m-free_handle(dbg);
MYSQLND_G(dbg) = NULL;
}
 #endif
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_debug.h?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_debug.h
diff -u php-src/ext/mysqlnd/mysqlnd_debug.h:1.1.2.2 
php-src/ext/mysqlnd/mysqlnd_debug.h:1.1.2.3
--- php-src/ext/mysqlnd/mysqlnd_debug.h:1.1.2.2 Fri Oct  5 21:23:56 2007
+++ php-src/ext/mysqlnd/mysqlnd_debug.h Tue Oct 23 10:10:18 2007
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd_debug.h,v 1.1.2.2 2007/10/05 21:23:56 andrey Exp $ */
+/* $Id: mysqlnd_debug.h,v 1.1.2.3 2007/10/23 10:10:18 andrey Exp $ */
 
 #ifndef MYSQLND_DEBUG_H
 #define MYSQLND_DEBUG_H
@@ -39,7 +39,7 @@
char * func_name, uint 
func_name_len);
enum_func_status (*func_leave)(MYSQLND_DEBUG *self, unsigned int line, 
const char * const file);
enum_func_status (*close)(MYSQLND_DEBUG *self);
-   enum_func_status (*free)(MYSQLND_DEBUG *self);
+   enum_func_status (*free_handle)(MYSQLND_DEBUG *self);
 };
 
 struct st_mysqlnd_debug

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqlnd mysqlnd.c mysqlnd_debug.h

2007-10-23 Thread Marcus Boerger
Hello Andrey,

  basically you cannot use any define. And when you want to be platform
agnostic/independent then you must assume all posix/c-api functions are
defines.

marcus

Tuesday, October 23, 2007, 12:10:18 PM, you wrote:

 andrey  Tue Oct 23 10:10:18 2007 UTC

   Modified files:  (Branch: PHP_5_3)
 /php-src/ext/mysqlndmysqlnd.c mysqlnd_debug.h 
   Log:
   Fix build failure on Windows. Seems free can't be used even as method
 name of a structure. The MS compiler (the
 preprocessor most probably) changes it to _free_dbg
   
 http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.c?r1=1.5.2.2r2=1.5.2.3diff_format=u
 Index: php-src/ext/mysqlnd/mysqlnd.c
 diff -u php-src/ext/mysqlnd/mysqlnd.c:1.5.2.2
 php-src/ext/mysqlnd/mysqlnd.c:1.5.2.3
 --- php-src/ext/mysqlnd/mysqlnd.c:1.5.2.2   Fri Oct  5 21:23:56 2007
 +++ php-src/ext/mysqlnd/mysqlnd.c   Tue Oct 23 10:10:18 2007
 @@ -18,7 +18,7 @@
+--+
  */
  
 -/* $Id: mysqlnd.c,v 1.5.2.2 2007/10/05 21:23:56 andrey Exp $ */
 +/* $Id: mysqlnd.c,v 1.5.2.3 2007/10/23 10:10:18 andrey Exp $ */
  #include php.h
  #include mysqlnd.h
  #include mysqlnd_wireprotocol.h
 @@ -2032,7 +2032,7 @@
 DBG_ENTER(RSHUTDOWN);
 if (dbg) {
 dbg-m-close(dbg);
 -   dbg-m-free(dbg);
 +   dbg-m-free_handle(dbg);
 MYSQLND_G(dbg) = NULL;
 }
  #endif
 http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_debug.h?r1=1.1.2.2r2=1.1.2.3diff_format=u
 Index: php-src/ext/mysqlnd/mysqlnd_debug.h
 diff -u php-src/ext/mysqlnd/mysqlnd_debug.h:1.1.2.2
 php-src/ext/mysqlnd/mysqlnd_debug.h:1.1.2.3
 --- php-src/ext/mysqlnd/mysqlnd_debug.h:1.1.2.2 Fri Oct  5 21:23:56 2007
 +++ php-src/ext/mysqlnd/mysqlnd_debug.h Tue Oct 23 10:10:18 2007
 @@ -18,7 +18,7 @@
+--+
  */
  
 -/* $Id: mysqlnd_debug.h,v 1.1.2.2 2007/10/05 21:23:56 andrey Exp $ */
 +/* $Id: mysqlnd_debug.h,v 1.1.2.3 2007/10/23 10:10:18 andrey Exp $ */
  
  #ifndef MYSQLND_DEBUG_H
  #define MYSQLND_DEBUG_H
 @@ -39,7 +39,7 @@
 char * func_name, 
 uint func_name_len);
 enum_func_status (*func_leave)(MYSQLND_DEBUG *self, unsigned int 
 line, const char * const file);
 enum_func_status (*close)(MYSQLND_DEBUG *self);
 -   enum_func_status (*free)(MYSQLND_DEBUG *self);
 +   enum_func_status (*free_handle)(MYSQLND_DEBUG *self);
  };
  
  struct st_mysqlnd_debug




Best regards,
 Marcus

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php