Edit report at http://bugs.php.net/bug.php?id=51733&edit=1

 ID:               51733
 Updated by:       dtajchre...@php.net
 Reported by:      jay at splitstreams dot com
 Summary:          SQLite3::exec() fails with disk I/O error
-Status:           Open
+Status:           Bogus
 Type:             Bug
 Package:          SQLite related
 Operating System: Ubuntu 10.04, FreeBSD 8
 PHP Version:      5.3.2

 New Comment:

You need to pass SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE to the
ctor if you intend on writing to the database after creating it... or
you can leave the flags parameter blank and it will default to that.


Previous Comments:
------------------------------------------------------------------------
[2010-05-03 22:02:49] jay at splitstreams dot com

Description:
------------
I've tested this problem and it is duplicable on Ubuntu 10.04 and
FreeBSD 8, both with 5.3.2 installed (from apt-get/ports).  I also did a
build of 5.3.2 from source to test this and it failed in the same way.



The problem comes when you try to create a table in a newly created
database when using the SQLite3 class.  The empty db is created without
error and when you then try to create a table, you get the following
error:



PHP Warning:  SQLite3::exec(): disk I/O error in php shell code on line
1



This is the same error in all builds on all OSes.

Test script:
---------------
$ php -a



php > $s = new SQLite3('/home/jdeiman/tmp/php.db', 
SQLITE3_OPEN_CREATE);

php > $ret = $s->exec('CREATE table testing (id integer)');

PHP Warning:  SQLite3::exec(): disk I/O error in php shell code on line
1



------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51733&edit=1

Reply via email to