Download src/php/php-src/ext/pdo_sqlite/tests/bug81227.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 561 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pdo_sqlite/tests/bug81227.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/pdo_sqlite/tests/bug81227.phpt
-
curl -L -o bug81227.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pdo_sqlite/tests/bug81227.phpt
561 Bytes
| --TEST-- | |
| Bug #81227 (PDO::inTransaction reports false when in transaction) | |
| --EXTENSIONS-- | |
| pdo_sqlite | |
| --FILE-- | |
| $db = new PDO("sqlite::memory:"); | |
| var_dump($db->inTransaction()); | |
| $db->exec("BEGIN EXCLUSIVE TRANSACTION"); | |
| var_dump($db->inTransaction()); | |
| try { | |
| $db->beginTransaction(); | |
| } catch (PDOException $e) { | |
| echo $e->getMessage(), "\n"; | |
| } | |
| $db->commit(); | |
| var_dump($db->inTransaction()); | |
| $db->beginTransaction(); | |
| var_dump($db->inTransaction()); | |
| --EXPECT-- | |
| bool(false) | |
| bool(true) | |
| There is already an active transaction | |
| bool(false) | |
| bool(true) | |