]> granicus.if.org Git - php/commitdiff
fix a crash in new code
authorAndrey Hristov <andrey@php.net>
Thu, 27 Jan 2011 17:30:29 +0000 (17:30 +0000)
committerAndrey Hristov <andrey@php.net>
Thu, 27 Jan 2011 17:30:29 +0000 (17:30 +0000)
ext/mysqlnd/mysqlnd_auth.c

index d78779cea9df1575d20483e21fb484db7a48c2c4..f014a4e908d177ca63caa7e0fcaa227157e56766 100644 (file)
@@ -141,7 +141,9 @@ mysqlnd_auth_handshake(MYSQLND * conn,
        }
 
        SET_NEW_MESSAGE(conn->last_message, conn->last_message_len, auth_resp_packet->message, auth_resp_packet->message_len, conn->persistent);
-       conn->charset = mysqlnd_find_charset_nr(auth_packet->charset_no);
+       if (use_full_blown_auth_packet == TRUE) {
+               conn->charset = mysqlnd_find_charset_nr(auth_packet->charset_no);
+       }
        ret = PASS;
 end:
        PACKET_FREE(change_auth_resp_packet);