From: hugo_pl at users dot sourceforge dot net Operating system: GNU/Linux, WindowsXP PHP version: 5.0.0 PHP Bug Type: SQLite related Bug description: sqlite_fetch_column_types locks the database forever
Description: ------------ When I call the function: sqlite_fetch_column_types(...); or the method: fetchColumnTypes(...); of the SQLiteDatabase Object, the entire database is locked forever... and I cant modify the database until Apache is restarted. I tested this with Apache2 SAPI module, and SQLite version 2.8.14 on win32 and 2.8.13 and 2.8.14 on Linux. In all plataforms, the database is unlocked only when I restart Apache, if I never call sqlite_fetch_column_types or the method fetchColumnTypes, all runs Ok. P.S.: English is not my natural language. Reproduce code: --------------- <?php // Open a database file... $db = sqlite_open('test.db'); sqlite_busy_timeout($db, 1000); //! Uncomment this line to see the bug!! //sqlite_fetch_column_types($db, 'papers'); sqlite_query($db, 'select * from papers limit 10'); // Any Update query and kabbom... =/ sqlite_query($db, 'update papers set papel="Hi" where id=1'); sqlite_close($db); ?> Expected result: ---------------- No warnings about a locked database when I send the update query Actual result: -------------- Warning: sqlite_query() [function.sqlite-query]: database is locked... -- Edit bug report at http://bugs.php.net/?id=29476&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29476&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29476&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29476&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29476&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29476&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29476&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29476&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29476&r=support Expected behavior: http://bugs.php.net/fix.php?id=29476&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29476&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29476&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29476&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29476&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29476&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29476&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29476&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29476&r=float