diff options
author | YaoGuai <newtopstdio@163.com> | 2017-07-16 15:12:29 +0800 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2017-07-18 21:45:02 +0200 |
commit | 51cdd3dc50af88461d83aec0fac1dca83400b58f (patch) | |
tree | a0de36306b04e1906be48287c0db5e99b15377a2 | |
parent | 0da10134f2d0eedbe5603844932fc8a60616d1a6 (diff) | |
download | php-git-51cdd3dc50af88461d83aec0fac1dca83400b58f.tar.gz |
Fix check of mysql_commit() return value
For mysql_commit() everything non-zero is an error.
-rw-r--r-- | ext/pdo_mysql/mysql_driver.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c index 1bf4eb039a..d5052479ef 100644 --- a/ext/pdo_mysql/mysql_driver.c +++ b/ext/pdo_mysql/mysql_driver.c @@ -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 |