Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ PHP NEWS

- PDO:
. Fixed bug #80027 (Terrible performance using $query->fetch on queries with
many bind parameters (Matteo)
many bind parameters) (Matteo)
. Fixed bug #79914 (PHP PDO mysqlnd ignores InnoDB deadlock errors).
(houxiaoxian)

- Standard:
. Fixed bug #79986 (str_ireplace bug with diacritics characters). (cmb)
Expand Down
12 changes: 12 additions & 0 deletions ext/pdo_mysql/mysql_statement.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,21 @@ static void pdo_mysql_stmt_set_row_count(pdo_stmt_t *stmt) /* {{{ */
{
zend_long row_count;
pdo_mysql_stmt *S = stmt->driver_data;
pdo_mysql_db_handle *H = S->H;
row_count = (zend_long) mysql_stmt_affected_rows(S->stmt);
if (row_count != (zend_long)-1) {
stmt->row_count = row_count;
} else {
if (!H->buffered) {
S->result = mysql_use_result(H->server);
} else {
S->result = mysql_store_result(H->server);
}

S->stmt = NULL;
stmt->dbh->methods = NULL;
pdo_mysql_error_stmt(stmt);
PDO_DBG_VOID_RETURN;
}
}
/* }}} */
Expand Down