|  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:
 [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-2015 The PHP Group
All rights reserved.
Last updated: Sun Nov 29 03:01:32 2015 UTC