andrey                                   Mon, 31 Jan 2011 13:29:18 +0000

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

Log:
Don't lose this data anymore. It worked without the fix,
but it with it is just correct (trunk only).

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

Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd.c
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd.c     2011-01-31 13:00:27 UTC (rev 
307881)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd.c     2011-01-31 13:29:18 UTC (rev 
307882)
@@ -588,10 +588,10 @@
                                free(scrambled_data);

                                DBG_INF_FMT("switch_to_auth_protocol=%s", 
switch_to_auth_protocol? switch_to_auth_protocol:"n/a");
-                               if (requested_protocol) {
+                               if (requested_protocol && 
switch_to_auth_protocol) {
                                        mnd_efree(requested_protocol);
+                                       requested_protocol = 
switch_to_auth_protocol;
                                }
-                               requested_protocol = switch_to_auth_protocol;

                                if (plugin_data) {
                                        mnd_efree(plugin_data);
@@ -606,6 +606,7 @@
                }

                if (ret == PASS) {
+                       DBG_INF_FMT("saving requested_protocol=%s", 
requested_protocol);
                        conn->m->set_client_option(conn, 
MYSQLND_OPT_AUTH_PROTOCOL, requested_protocol TSRMLS_CC);
                }


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

Reply via email to