diff options
author | Andrey Hristov <andrey@php.net> | 2010-03-26 16:58:25 +0000 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 2010-03-26 16:58:25 +0000 |
commit | 7868bca437431f95f4b51afa3e4c4b64e45ebad9 (patch) | |
tree | 74522e929e144647f36110a6036be47843d46ca1 /ext/mysqlnd/mysqlnd_result.c | |
parent | a2edb7f69c30fbc2cee6f0a4af94226b198ec558 (diff) | |
download | php-git-7868bca437431f95f4b51afa3e4c4b64e45ebad9.tar.gz |
Fix tests that fail when the MySQL's socket file is not /tmp/mysql.sock
as it is in when compiled from source and the default for mysqlnd.
SuSE for example uses /var/run/mysql/mysql.sock . Also, sql.safe_mode
(ext/mysql and ingres) needs the socket.
Fix possible crashes in mysqlnd. When packets are shorter, functions should
return error.
Diffstat (limited to 'ext/mysqlnd/mysqlnd_result.c')
-rw-r--r-- | ext/mysqlnd/mysqlnd_result.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mysqlnd/mysqlnd_result.c b/ext/mysqlnd/mysqlnd_result.c index ac3761868b..224b590d54 100644 --- a/ext/mysqlnd/mysqlnd_result.c +++ b/ext/mysqlnd/mysqlnd_result.c @@ -470,7 +470,7 @@ mysqlnd_query_read_result_set_header(MYSQLND *conn, MYSQLND_STMT * s TSRMLS_DC) if (FAIL == (ret = result->m.read_result_metadata(result, conn TSRMLS_CC))) { /* For PS, we leave them in Prepared state */ - if (!stmt) { + if (!stmt && conn->current_result) { mnd_efree(conn->current_result); conn->current_result = NULL; } |