|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27928 SQLite gets confused when opening empty filename
Submitted: 2004-04-09 02:07 UTC Modified: 2004-04-09 14:01 UTC
From: adam at trachtenberg dot com Assigned:
Status: Closed Package: SQLite related
PHP Version: 5CVS-2004-04-09 (dev) OS: *
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: adam at trachtenberg dot com
New email:
PHP Version: OS:


 [2004-04-09 02:07 UTC] adam at trachtenberg dot com
Telling SQLite to open a file of NULL or "" causes it to 
think for a while and then report that the database is 

The patch at:

Makes SQLite return false and provides an error message. 
(BTW, is strcmp(filename, "") the best way to do this?

Reproduce code:

Expected result:
Faster reply, better error message.

Actual result:
PHP Warning:  sqlite_query(): database is locked


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-09 12:39 UTC]
Can't you just test whether the filename_len is higher than 0 ??

 [2004-04-09 13:09 UTC] adam at trachtenberg dot com
Yea. Here's an updated version at the same URL.
 [2004-04-09 14:01 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Dec 06 15:01:27 2023 UTC