]> granicus.if.org Git - php/commitdiff
Removed the in_transaction handler for 5.3 to avoid BC break due to structure change
authorIlia Alshanetsky <iliaa@php.net>
Tue, 15 Jun 2010 11:13:20 +0000 (11:13 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 15 Jun 2010 11:13:20 +0000 (11:13 +0000)
ext/pdo/pdo_dbh.c
ext/pdo/php_pdo_driver.h
ext/pdo_pgsql/pgsql_driver.c

index 0924ba2b6808a04232f994820fe99c6cfa00c688..3d12e3e7b178a6039f53d6fee3b00026147dd45c 100755 (executable)
@@ -694,11 +694,7 @@ static PHP_METHOD(PDO, inTransaction)
        }
        PDO_CONSTRUCT_CHECK;
 
-       if (!dbh->methods->in_transaction) {
-               RETURN_BOOL(dbh->in_txn);
-       }       
-
-       RETURN_LONG(dbh->methods->in_transaction(dbh TSRMLS_CC));
+       RETURN_LONG(dbh->in_txn);
 }
 /* }}} */
 
index 4c668734ec21586388b49501cef2f9b02f758add..06d09b2d17ae3b9f2f5394b9590a89b48d27a329 100755 (executable)
@@ -310,7 +310,6 @@ struct pdo_dbh_methods {
        pdo_dbh_check_liveness_func     check_liveness;
        pdo_dbh_get_driver_methods_func get_driver_methods;
        pdo_dbh_request_shutdown        persistent_shutdown;
-       pdo_dbh_txn_func                in_transaction;
 };
 
 /* }}} */
index bdb6fb9d189c0d89110106ade99f115430b59535..f9ec116107ce773a6d69c2bbaa1ae2145ffeaad4 100644 (file)
@@ -497,15 +497,6 @@ static int pgsql_handle_rollback(pdo_dbh_t *dbh TSRMLS_DC)
        return pdo_pgsql_transaction_cmd("ROLLBACK", dbh TSRMLS_CC);
 }
 
-static int pgsql_handle_in_transaction(pdo_dbh_t *dbh TSRMLS_DC)
-{
-       pdo_pgsql_db_handle *H;
-
-       H = (pdo_pgsql_db_handle *)dbh->driver_data;
-
-       return PQtransactionStatus(H->server);
-}
-
 /* {{{ proto string PDO::pgsqlCopyFromArray(string $table_name , array $rows [, string $delimiter [, string $null_as ] [, string $fields])
    Returns true if the copy worked fine or false if error */
 static PHP_METHOD(PDO, pgsqlCopyFromArray)
@@ -1031,7 +1022,6 @@ static struct pdo_dbh_methods pgsql_methods = {
        pdo_pgsql_check_liveness,       /* check_liveness */
        pdo_pgsql_get_driver_methods,  /* get_driver_methods */
        NULL,
-       pgsql_handle_in_transaction,
 };
 
 static int pdo_pgsql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_DC) /* {{{ */