|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55377 Can't unlock SQLite3 when error occurs in PDOStatement iterating.
Submitted: 2011-08-06 18:01 UTC Modified: 2014-01-01 12:43 UTC
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: riverfish323 at yahoo dot co dot jp Assigned:
Status: Open Package: PDO SQLite
PHP Version: 5.3.6 OS: WindowsXP SP3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: riverfish323 at yahoo dot co dot jp
New email:
PHP Version: OS:


 [2011-08-06 18:01 UTC] riverfish323 at yahoo dot co dot jp
Sorry for strange Engrish.

SQLite3 database didn't unlock, when fatal error occurs while iterating over a PDOStatement object using foreach-loop.

Test script:
$con = new PDO('sqlite:test.db');

$con->query('CREATE TABLE IF NOT EXISTS t (c INT)');

$con->query('INSERT INTO t VALUES (1)');

foreach ($con->query('SELECT * FROM t LIMIT 1') as $row) {
    trigger_error('abort', E_USER_ERROR); # test.db not unlocking

Expected result:
Will not be able to use some SQL statements. In addition PHP will be timeout.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-01-01 12:43 UTC]
-Package: PDO related +Package: PDO SQLite
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Apr 10 23:01:24 2021 UTC