Re: Req #51295: busyTimeout method for SQLite3

From: Date: Sun, 14 Mar 2010 07:57:22 +0000
Subject: Re: Req #51295: busyTimeout method for SQLite3
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-47254@lists.php.net to get a copy of this message
Hello Mark,

Note that while indeed sqlite3_busy_timeout() is not extended by the SQLite3 and PDO_SQLITE extensions, it is called internally in ext/pdo_sqlite/sqlite_driver.c.
I think it is a good idea to extend it but also, that if you do, it should probably also be done for PDO_SQLITE as it may be useful there as well.

May the source be with you,
Best regards,
Jess Portnoy



Mark Karpeles wrote:
Hello, I've been encountering a problem with SELECT queries and SQLite3 as load was growing on my system. From times to times I was getting this error: Warning: SQLite3Stmt::execute(): Unable to execute statement: database is locked After searching on google I saw I should call sqlite3_busy_timeout() and found out that there was no way to call it from the SQLite3 extension (which is new to PHP 5.3.x). Here's a patch that will add this method to the SQLite3 class: http://bugs.php.net/51295 https://ookoo.org/svn/snip/php_5_3-sqlite3-busytimeout-method.patch Any comment welcome. Mark


Thread (6 messages)

« previous php.internals (#47254) next »