Bug #81227 [NEW]: PDO::inTransaction reports false when in transaction

From: Date: Tue, 06 Jul 2021 14:33:54 +0000
Subject: Bug #81227 [NEW]: PDO::inTransaction reports false when in transaction
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-234822@lists.php.net to get a copy of this message
From: shariefjamiel at gmail dot com Operating system: Ubuntu 20.04 PHP version: Irrelevant Package: PDO SQLite Bug Type: Bug Bug description:PDO::inTransaction reports false when in transaction Description: ------------ Using PHP 8.0.1 on Ubuntu 20.04 focal I am executing BEGIN EXCLUSIVE TRANSACTION due to a locking issue, but the problem is PDO::inTransaction returns false despite being in a transaction, which leads to errors later on. Test script: --------------- $db->exec("BEGIN EXCLUSIVE TRANSACTION"); $alwaysFalse = $db->inTransaction(); Expected result: ---------------- $db->exec("BEGIN EXCLUSIVE TRANSACTION"); $shouldBeTrue = $db->inTransaction(); Actual result: -------------- $db->exec("BEGIN EXCLUSIVE TRANSACTION"); $false = $db->inTransaction(); -- Edit bug report at https://bugs.php.net/bug.php?id=81227&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=81227&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=81227&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=81227&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=81227&r=needscript Try newer version: https://bugs.php.net/fix.php?id=81227&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=81227&r=support Expected behavior: https://bugs.php.net/fix.php?id=81227&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=81227&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=81227&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=81227&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=81227&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=81227&r=dst IIS Stability: https://bugs.php.net/fix.php?id=81227&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=81227&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=81227&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=81227&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=81227&r=mysqlcfg

« previous php.bugs (#234822) next »