Skip to content

Commit 51cdd3d

Browse files
yaoguaisnikic
authored andcommitted
Fix check of mysql_commit() return value
For mysql_commit() everything non-zero is an error.
1 parent 0da1013 commit 51cdd3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/pdo_mysql/mysql_driver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ static int mysql_handle_commit(pdo_dbh_t *dbh)
327327
PDO_DBG_ENTER("mysql_handle_commit");
328328
PDO_DBG_INF_FMT("dbh=%p", dbh);
329329
#if MYSQL_VERSION_ID >= 40100 || defined(PDO_USE_MYSQLND)
330-
PDO_DBG_RETURN(0 <= mysql_commit(((pdo_mysql_db_handle *)dbh->driver_data)->server));
330+
PDO_DBG_RETURN(0 == mysql_commit(((pdo_mysql_db_handle *)dbh->driver_data)->server));
331331
#else
332332
PDO_DBG_RETURN(0 <= mysql_handle_doer(dbh, ZEND_STRL("COMMIT")));
333333
#endif

0 commit comments

Comments
 (0)