Req #42766 [Com]: PDO_Sqlite doesn't support transactions modes of SQlite
| From: | i dot librarian dot software at gmail dot com | Date: | Wed, 03 Feb 2016 17:12:18 +0000 |
| Subject: | Req #42766 [Com]: PDO_Sqlite doesn't support transactions modes of SQlite | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-199028@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
Comment by: i dot librarian dot software at gmail dot com
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. 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.
Previous Comments:
------------------------------------------------------------------------
[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