Patch commit-einfo for PDO MySQL Bug #66528
Patch version 2019-04-28 13:50 UTC
Return to Bug #66528 |
Download this patch
Patch Revisions:
Developer: cmb@php.net
ext/pdo_mysql/mysql_driver.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c
index b7b6770327..2d0cebed8d 100644
--- a/ext/pdo_mysql/mysql_driver.c
+++ b/ext/pdo_mysql/mysql_driver.c
@@ -347,7 +347,11 @@ static int mysql_handle_commit(pdo_dbh_t *dbh)
{
PDO_DBG_ENTER("mysql_handle_commit");
PDO_DBG_INF_FMT("dbh=%p", dbh);
- PDO_DBG_RETURN(0 == mysql_commit(((pdo_mysql_db_handle *)dbh->driver_data)->server));
+ if (mysql_commit(((pdo_mysql_db_handle *)dbh->driver_data)->server)) {
+ pdo_mysql_error(dbh);
+ PDO_DBG_RETURN(0);
+ }
+ PDO_DBG_RETURN(1);
}
/* }}} */
|