andrey                                   Tue, 22 Dec 2009 17:31:31 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=292490

Log:
move state setting to the right place, in mysqlnd_init, no more
in mysqlnd::connect

Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c
    U   php/php-src/trunk/ext/mysqlnd/mysqlnd.c

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c  2009-12-22 17:02:35 UTC 
(rev 292489)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c  2009-12-22 17:31:31 UTC 
(rev 292490)
@@ -531,8 +531,6 @@
        PACKET_INIT(auth_packet, PROT_AUTH_PACKET, php_mysql_packet_auth *, 
FALSE);
        PACKET_INIT_ALLOCA(ok_packet, PROT_OK_PACKET);

-       CONN_SET_STATE(conn, CONN_ALLOCED);
-
        if (conn->persistent) {
                conn->scheme = pestrndup(transport, transport_len, 1);
                mnd_efree(transport);
@@ -2104,6 +2102,8 @@

        ret->net = mysqlnd_net_init(persistent TSRMLS_CC);

+       CONN_SET_STATE(ret, CONN_ALLOCED);
+
        DBG_RETURN(ret);
 }
 /* }}} */

Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd.c
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd.c     2009-12-22 17:02:35 UTC (rev 
292489)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd.c     2009-12-22 17:31:31 UTC (rev 
292490)
@@ -531,8 +531,6 @@
        PACKET_INIT(auth_packet, PROT_AUTH_PACKET, php_mysql_packet_auth *, 
FALSE);
        PACKET_INIT_ALLOCA(ok_packet, PROT_OK_PACKET);

-       CONN_SET_STATE(conn, CONN_ALLOCED);
-
        if (conn->persistent) {
                conn->scheme = pestrndup(transport, transport_len, 1);
                mnd_efree(transport);
@@ -2104,6 +2102,8 @@

        ret->net = mysqlnd_net_init(persistent TSRMLS_CC);

+       CONN_SET_STATE(ret, CONN_ALLOCED);
+
        DBG_RETURN(ret);
 }
 /* }}} */

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

Reply via email to