johannes Tue Aug 19 10:16:12 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/mysqlnd mysqlnd.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.24&r2=1.5.2.25&diff_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