- Fixed bug #49429, #51331 (odbc_autocommit doesn't work)

This commit is contained in:
Felipe Pena 2010-03-20 18:19:16 +00:00
parent ad0e1ae3f1
commit 3488cd43be
2 changed files with 2 additions and 1 deletions

1
NEWS
View File

@ -41,6 +41,7 @@ PHP NEWS
- Fixed bug #50358 (Compile failure compiling ext/phar/util.lo). (Felipe)
- Fixed bug #49778 (DateInterval::format("%a") is always zero when an interval
is created from an ISO string). (Derick)
- Fixed bug #49429 (odbc_autocommit doesn't work). (Felipe)
- Fixed bug #49059 (DateTime::diff() repeats previous sub() operation).
(yoarvi@gmail.com, Derick)
- Fixed bug #48902 (Timezone database fallback map is outdated). (Derick)

View File

@ -2864,7 +2864,7 @@ PHP_FUNCTION(odbc_autocommit)
ZEND_FETCH_RESOURCE2(conn, odbc_connection *, &pv_conn, -1, "ODBC-Link", le_conn, le_pconn);
if (pv_onoff) {
if (ZEND_NUM_ARGS() > 1) {
rc = SQLSetConnectOption(conn->hdbc, SQL_AUTOCOMMIT, (pv_onoff) ? SQL_AUTOCOMMIT_ON : SQL_AUTOCOMMIT_OFF);
if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) {
odbc_sql_error(conn, SQL_NULL_HSTMT, "Set autocommit");