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 | ec36ac1610abc321d18586304fe8d28f3d5190c3 (patch) | |
tree | f28e5fa6a445e65e113dcacdbd7fd0585052994f /ext/mysqlnd/mysqlnd_result.c | |
parent | 53cfb3d53df9e2115f404bb98d89653b7a5bbd1d (diff) | |
download | php-git-ec36ac1610abc321d18586304fe8d28f3d5190c3.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; } |