summaryrefslogtreecommitdiff
path: root/ext/pdo_mysql/mysql_statement.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2007-04-15 16:50:42 +0000
committerIlia Alshanetsky <iliaa@php.net>2007-04-15 16:50:42 +0000
commit2f3e330ad00522fc007a48132195e44dd47252ed (patch)
treec4f9e8acb7fa262fdd282feafe7a2db59f3d9a8f /ext/pdo_mysql/mysql_statement.c
parent42429cadea58673e96decf8f1f64c8dd2b9ed103 (diff)
downloadphp-git-2f3e330ad00522fc007a48132195e44dd47252ed.tar.gz
Fixed bug #40935 (pdo_mysql does not raise an exception on empty
fetchAll()).
Diffstat (limited to 'ext/pdo_mysql/mysql_statement.c')
-rwxr-xr-xext/pdo_mysql/mysql_statement.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c
index aae7019dc5..087194f7f7 100755
--- a/ext/pdo_mysql/mysql_statement.c
+++ b/ext/pdo_mysql/mysql_statement.c
@@ -413,6 +413,7 @@ static int pdo_mysql_stmt_fetch(pdo_stmt_t *stmt,
#endif
if (!S->result) {
+ strcpy(stmt->error_code, "HY000");
return 0;
}
if ((S->current_data = mysql_fetch_row(S->result)) == NULL) {