diff options
author | Johannes Schlüter <johannes@php.net> | 2008-08-19 10:16:12 +0000 |
---|---|---|
committer | Johannes Schlüter <johannes@php.net> | 2008-08-19 10:16:12 +0000 |
commit | aeab8bade6a33332770b0fefbab02568194f4b53 (patch) | |
tree | c5306dccc93939a17a79563bfc1fcb7f20169f4d /ext/mysqlnd/mysqlnd.c | |
parent | 80d020011c057d77a567b2c4ce394236bc5442db (diff) | |
download | php-git-aeab8bade6a33332770b0fefbab02568194f4b53.tar.gz |
MFH: Fix empty error message when connecting to a bad server
Diffstat (limited to 'ext/mysqlnd/mysqlnd.c')
-rw-r--r-- | ext/mysqlnd/mysqlnd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/mysqlnd/mysqlnd.c b/ext/mysqlnd/mysqlnd.c index fb57ca70f5..0479095642 100644 --- a/ext/mysqlnd/mysqlnd.c +++ b/ext/mysqlnd/mysqlnd.c @@ -58,7 +58,7 @@ extern MYSQLND_CHARSET *mysqlnd_charsets; - +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 @@ PHPAPI MYSQLND *mysqlnd_connect(MYSQLND *conn, 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) { |