From: magicaltux Operating system: Linux Gentoo 2.6.33 PHP version: 5.3SVN-2010-03-14 (SVN) Package: SQLite related Bug Type: Feature/Change Request Bug description:SQLite3::busyTimeout not existing
Description: ------------ In SQLite3, method busyTimeout() is missing, and by default there is no busy handler. In old SQLite extension, a default timeout of 60 seconds was set, and a busyTimeout() method was available to define the timeout. I recently started with SQLite3 to have this kind of errors as load was growing on SELECT statement: Warning: SQLite3Stmt::execute(): Unable to execute statement: database is locked Some internet research showed that this could be fixed by setting a different busy timeout, and I noticed PHP wasn't setting any on SQLite3. While I'm unsure about setting a default busyTimeout on SQLite3 (it currently have none, but PHP_5_3 is still young enough to change this kind of behaviour) it should be at least possible to set one. Patch to add a SQLite3::busyTimeout() method (same behaviour as old SQLite::busyTimeout() method, with the exception this one has a true/false return value, while sqlite3_busy_timeout will always return SQLITE_OK, it may change in the future). The patch: https://ookoo.org/svn/snip/php_5_3-sqlite3-busytimeout-method.patch -- Edit bug report at http://bugs.php.net/bug.php?id=51295&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51295&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51295&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51295&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=51295&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51295&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=51295&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=51295&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=51295&r=needscript Try newer version: http://bugs.php.net/fix.php?id=51295&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=51295&r=support Expected behavior: http://bugs.php.net/fix.php?id=51295&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=51295&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=51295&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=51295&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51295&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=51295&r=dst IIS Stability: http://bugs.php.net/fix.php?id=51295&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=51295&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=51295&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=51295&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=51295&r=mysqlcfg