andrey          Mon Jun  8 10:19:29 2009 UTC

  Modified files:              
    /php-src/ext/mysqlnd        mysqlnd.c mysqlnd_wireprotocol.c php_mysqlnd.c 
  Log:
  Merge with the branch, someone made changes in PHP5_3 and did not merge.
  Also switch off the zval cache for now.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.c?r1=1.39&r2=1.40&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd.c
diff -u php-src/ext/mysqlnd/mysqlnd.c:1.39 php-src/ext/mysqlnd/mysqlnd.c:1.40
--- php-src/ext/mysqlnd/mysqlnd.c:1.39  Fri Mar 27 19:28:26 2009
+++ php-src/ext/mysqlnd/mysqlnd.c       Mon Jun  8 10:19:29 2009
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: mysqlnd.c,v 1.39 2009/03/27 19:28:26 felipe Exp $ */
+/* $Id: mysqlnd.c,v 1.40 2009/06/08 10:19:29 andrey Exp $ */
 #include "php.h"
 #include "mysqlnd.h"
 #include "mysqlnd_wireprotocol.h"
@@ -664,7 +664,7 @@
        {
                auth_packet->charset_no = charset->nr;
        } else {
-#if PHP_MAJOR_VERSION >= 6             
+#if PHP_MAJOR_VERSION >= 6
                auth_packet->charset_no = 200;/* utf8 - swedish collation, 
check mysqlnd_charset.c */
 #else
                auth_packet->charset_no = greet_packet.charset_no;
@@ -991,7 +991,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)
 {
 
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_wireprotocol.c?r1=1.26&r2=1.27&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_wireprotocol.c
diff -u php-src/ext/mysqlnd/mysqlnd_wireprotocol.c:1.26 
php-src/ext/mysqlnd/mysqlnd_wireprotocol.c:1.27
--- php-src/ext/mysqlnd/mysqlnd_wireprotocol.c:1.26     Wed Dec 31 11:12:33 2008
+++ php-src/ext/mysqlnd/mysqlnd_wireprotocol.c  Mon Jun  8 10:19:29 2009
@@ -1378,7 +1378,7 @@
        bit     = 4;                                            /* first 2 bits 
are reserved */
 
        for (i = 0; current_field < end_field; current_field++, i++) {
-#if 1
+#ifdef USE_ZVAL_CACHE
                DBG_INF("Trying to use the zval cache");
                obj = mysqlnd_palloc_get_zval(conn->zval_cache, &allocated 
TSRMLS_CC);
                if (allocated) {
@@ -1474,11 +1474,12 @@
        for (i = 0; current_field < end_field; current_field++, i++) {
                /* Don't reverse the order. It is significant!*/
                void *obj;
-               zend_bool allocated;
+               zend_bool allocated = TRUE;
                zend_uchar *this_field_len_pos = p;
                /* php_mysqlnd_net_field_length() call should be after 
*this_field_len_pos = p; */
                unsigned long len = php_mysqlnd_net_field_length(&p);
 
+#ifdef USE_ZVAL_CACHE
                obj = mysqlnd_palloc_get_zval(conn->zval_cache, &allocated 
TSRMLS_CC);
                if (allocated) {
                        *current_field = (zval *) obj;
@@ -1487,6 +1488,10 @@
                        *current_field = &((mysqlnd_zval *) obj)->zv;   
                        ((mysqlnd_zval *) obj)->point_type = 
MYSQLND_POINTS_FREE;
                }
+#else
+               DBG_INF("Directly creating zval");
+               MAKE_STD_ZVAL(*current_field);
+#endif
 
                if (current_field > start_field && last_field_was_string) {
                        /*
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/php_mysqlnd.c?r1=1.13&r2=1.14&diff_format=u
Index: php-src/ext/mysqlnd/php_mysqlnd.c
diff -u php-src/ext/mysqlnd/php_mysqlnd.c:1.13 
php-src/ext/mysqlnd/php_mysqlnd.c:1.14
--- php-src/ext/mysqlnd/php_mysqlnd.c:1.13      Tue May 26 13:42:43 2009
+++ php-src/ext/mysqlnd/php_mysqlnd.c   Mon Jun  8 10:19:29 2009
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: php_mysqlnd.c,v 1.13 2009/05/26 13:42:43 andrey Exp $ */
+/* $Id: php_mysqlnd.c,v 1.14 2009/06/08 10:19:29 andrey Exp $ */
 #include "php.h"
 #include "php_ini.h"
 #include "mysqlnd.h"
@@ -47,12 +47,12 @@
        zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(values), &pos_values);
        while (zend_hash_get_current_data_ex(Z_ARRVAL_P(values),
                                                                                
(void **)&values_entry, &pos_values) == SUCCESS) {
+               TSRMLS_FETCH();
                zstr    string_key;
                uint    string_key_len;
                ulong   num_key;
                int     s_len;
                char    *s = NULL;
-               TSRMLS_FETCH();
 
                zend_hash_get_current_key_ex(Z_ARRVAL_P(values), &string_key, 
&string_key_len, &num_key, 0, &pos_values);
 



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

Reply via email to