#27928 [Fbk->Opn]: SQLite gets confused when opening empty filename
| From: | adam at trachtenberg dot com | Date: | Fri, 09 Apr 2004 17:09:36 +0000 |
| Subject: | #27928 [Fbk->Opn]: SQLite gets confused when opening empty filename | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-57877@lists.php.net to get a copy of this message | ||
ID: 27928
User updated by: adam at trachtenberg dot com
Reported By: adam at trachtenberg dot com
-Status: Feedback
+Status: Open
Bug Type: SQLite related
Operating System: Mac OS X 10.3.3
PHP Version: 5CVS-2004-04-09 (dev)
New Comment:
Yea. Here's an updated version at the same URL.
http://www.trachtenberg.com/patches/sqlite_open.txt
Previous Comments:
------------------------------------------------------------------------
[2004-04-09 12:39:46] sniper@php.net
Can't you just test whether the filename_len is higher than 0 ??
------------------------------------------------------------------------
[2004-04-09 02:07:16] adam at trachtenberg dot com
Description:
------------
Telling SQLite to open a file of NULL or "" causes it to
think for a while and then report that the database is
locked.
The patch at:
http://www.trachtenberg.com/patches/sqlite_open.txt
Makes SQLite return false and provides an error message.
(BTW, is strcmp(filename, "") the best way to do this?
Reproduce code:
---------------
sqlite_open("");
sqlite_open(NULL);
Expected result:
----------------
Faster reply, better error message.
Actual result:
--------------
PHP Warning: sqlite_query(): database is locked
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27928&edit=1