Req #42766 [Opn]: PDO_Sqlite doesn't support transactions modes of SQlite

From: Date: Sun, 23 Sep 2018 17:26:16 +0000
Subject: Req #42766 [Opn]: PDO_Sqlite doesn't support transactions modes of SQlite
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-217211@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=42766&edit=1 ID: 42766 Updated by: cmb@php.net Reported by: indeyets at gmail dot com Summary: PDO_Sqlite doesn't support transactions modes of SQlite Status: Open Type: Feature/Change Request Package: PDO SQLite Operating System: unrelated PHP Version: 5.2.4 Block user comment: N Private report: N New Comment: > The beginTransaction() seems to only do deferred transactions. Indeed, since deferred transactions are the default for SQLite3. > It would be great if at least that was possible. It seems to me that it is. Previous Comments: ------------------------------------------------------------------------ [2016-02-03 17:12:17] i dot librarian dot software at gmail dot com The beginTransaction() seems to only do deferred transactions. This situation is aggravated by the fact that one cannot do their own transactions using exec(). This will fail: $dbHandler->exec("BEGIN EXCLUSIVE TRANSACTION"); It would be great if at least that was possible. ------------------------------------------------------------------------ [2007-09-26 11:14:53] indeyets at gmail dot com Description: ------------ SQLite 3.0.8 and higher supports various transactions modes (DEFERRED, IMMEDIATE, EXCLUSIVE), but PDO's ->beginTransaction() doesn't take parameter, which would allow specifying this see: http://sqlite.org/lang_transaction.html Reproduce code: --------------- $dbh = new Pdo(); $dbh->beginTransaction(PDO_Sqlite::IMMEDIATE); // etc. $dbh->commit(); Expected result: ---------------- immediate transaction starts Actual result: -------------- error, because beginTransaction doesn't support modes ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=42766&edit=1

« previous php.bugs (#217211) next »