php.net |  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
Votes:2
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:
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
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
Description:
------------
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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-01-01 12:43 UTC] felipe@php.net
-Package: PDO related +Package: PDO SQLite
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Tue Aug 29 15:01:52 2017 UTC