summaryrefslogtreecommitdiff
path: root/ext/mysqli/mysqli_nonapi.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2011-01-07 14:22:30 +0000
committerAndrey Hristov <andrey@php.net>2011-01-07 14:22:30 +0000
commiteaaef0d870f50563fab837fffadcf47a02079c54 (patch)
tree790af352bd77a14a1e4836fd099359eb5dbf0f2b /ext/mysqli/mysqli_nonapi.c
parent39210df0ed8efe262822e06fb45ac60cf4e9e552 (diff)
downloadphp-git-eaaef0d870f50563fab837fffadcf47a02079c54.tar.gz
Proper fix for
Bug #53503 mysqli::query returns false after successful LOAD DATA query which fixes als #56349, same behavior but in ext/mysql. Both due to a bug in mysqlnd. Never was a problem with libmysql. Also fixed the 53503's test case as it always reported PASS, even when there should have been a failure.
Diffstat (limited to 'ext/mysqli/mysqli_nonapi.c')
-rw-r--r--ext/mysqli/mysqli_nonapi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c
index e9b6b4f27c..6de657c279 100644
--- a/ext/mysqli/mysqli_nonapi.c
+++ b/ext/mysqli/mysqli_nonapi.c
@@ -541,7 +541,7 @@ PHP_FUNCTION(mysqli_query)
result = mysql_use_result(mysql->mysql);
break;
}
- if (!result && mysql_errno(mysql->mysql)) {
+ if (!result) {
php_mysqli_throw_sql_exception((char *)mysql_sqlstate(mysql->mysql), mysql_errno(mysql->mysql) TSRMLS_CC,
"%s", mysql_error(mysql->mysql));
RETURN_FALSE;