summaryrefslogtreecommitdiff
path: root/ext/pdo_mysql/mysql_statement.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-10-28 11:04:32 +0100
committerNikita Popov <nikita.ppv@gmail.com>2020-10-28 11:04:32 +0100
commit793bf12f8c322438ffaec1882cce7eaed5233d4f (patch)
tree7bfaa11f6cdaea115cf292245404e83bfd2e0337 /ext/pdo_mysql/mysql_statement.c
parent2693f799be862bcaddd4204c10fb1e82156bb603 (diff)
parentb03776adb5bbb9b54731a44377632fcc94a59d2f (diff)
downloadphp-git-793bf12f8c322438ffaec1882cce7eaed5233d4f.tar.gz
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4: Fix bug #79375
Diffstat (limited to 'ext/pdo_mysql/mysql_statement.c')
-rw-r--r--ext/pdo_mysql/mysql_statement.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c
index 591443520f..11defa55f5 100644
--- a/ext/pdo_mysql/mysql_statement.c
+++ b/ext/pdo_mysql/mysql_statement.c
@@ -255,7 +255,10 @@ static int pdo_mysql_stmt_execute_prepared_libmysql(pdo_stmt_t *stmt) /* {{{ */
/* if buffered, pre-fetch all the data */
if (H->buffered) {
- mysql_stmt_store_result(S->stmt);
+ if (mysql_stmt_store_result(S->stmt)) {
+ pdo_mysql_error_stmt(stmt);
+ PDO_DBG_RETURN(0);
+ }
}
}
}
@@ -298,6 +301,7 @@ static int pdo_mysql_stmt_execute_prepared_mysqlnd(pdo_stmt_t *stmt) /* {{{ */
/* if buffered, pre-fetch all the data */
if (H->buffered) {
if (mysql_stmt_store_result(S->stmt)) {
+ pdo_mysql_error_stmt(stmt);
PDO_DBG_RETURN(0);
}
}
@@ -386,7 +390,8 @@ static int pdo_mysql_stmt_next_rowset(pdo_stmt_t *stmt) /* {{{ */
/* if buffered, pre-fetch all the data */
if (H->buffered) {
if (mysql_stmt_store_result(S->stmt)) {
- PDO_DBG_RETURN(1);
+ pdo_mysql_error_stmt(stmt);
+ PDO_DBG_RETURN(0);
}
}
}
@@ -621,6 +626,7 @@ static int pdo_mysql_stmt_fetch(pdo_stmt_t *stmt, enum pdo_fetch_orientation ori
PDO_DBG_INF_FMT("stmt=%p", S->stmt);
if (S->stmt) {
if (FAIL == mysqlnd_stmt_fetch(S->stmt, &fetched_anything) || fetched_anything == FALSE) {
+ pdo_mysql_error_stmt(stmt);
PDO_DBG_RETURN(0);
}