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: 2021-06-13 04:22 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: cmb (profile)
Status: No Feedback Package: PDO SQLite
PHP Version: 5.3.6 OS: WindowsXP SP3
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
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

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-01-01 12:43 UTC] felipe@php.net
-Package: PDO related +Package: PDO SQLite
 [2021-06-02 14:51 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-06-02 14:51 UTC] cmb@php.net
I cannot reproduce this with PHP 7.4 and sqlite3 3.31.1; maybe an
issue with an old PHP or SQLite3 version?
 [2021-06-13 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 15:01:29 2024 UTC