#27928 [Opn->Fbk]: SQLite gets confused when opening empty filename

From: Date: Fri, 09 Apr 2004 16:39:47 +0000
Subject: #27928 [Opn->Fbk]: SQLite gets confused when opening empty filename
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-57872@lists.php.net to get a copy of this message
ID: 27928 Updated by: sniper@php.net Reported By: adam at trachtenberg dot com -Status: Open +Status: Feedback Bug Type: SQLite related Operating System: Mac OS X 10.3.3 PHP Version: 5CVS-2004-04-09 (dev) New Comment: Can't you just test whether the filename_len is higher than 0 ?? Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#57872) next »