Skip to content

Commit

Permalink
Fix check of mysql_commit() return value
Browse files Browse the repository at this point in the history
For mysql_commit() everything non-zero is an error.
  • Loading branch information
yaoguais authored and nikic committed Jul 18, 2017
1 parent 0da1013 commit 51cdd3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/pdo_mysql/mysql_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ static int mysql_handle_commit(pdo_dbh_t *dbh)
PDO_DBG_ENTER("mysql_handle_commit");
PDO_DBG_INF_FMT("dbh=%p", dbh);
#if MYSQL_VERSION_ID >= 40100 || defined(PDO_USE_MYSQLND)
PDO_DBG_RETURN(0 <= mysql_commit(((pdo_mysql_db_handle *)dbh->driver_data)->server));
PDO_DBG_RETURN(0 == mysql_commit(((pdo_mysql_db_handle *)dbh->driver_data)->server));
#else
PDO_DBG_RETURN(0 <= mysql_handle_doer(dbh, ZEND_STRL("COMMIT")));
#endif
Expand Down

0 comments on commit 51cdd3d

Please sign in to comment.