Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47256 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11636 invoked from network); 14 Mar 2010 08:17:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Mar 2010 08:17:47 -0000 Authentication-Results: pb1.pair.com smtp.mail=jess@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=jess@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.185 as permitted sender) X-PHP-List-Original-Sender: jess@zend.com X-Host-Fingerprint: 212.25.124.185 il-mr1.zend.com Received: from [212.25.124.185] ([212.25.124.185:45755] helo=il-mr1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1C/AE-15916-9AB9C9B4 for ; Sun, 14 Mar 2010 03:17:47 -0500 Received: from il-gw1.zend.com (unknown [10.1.1.21]) by il-mr1.zend.com (Postfix) with ESMTP id F030E50488; Sun, 14 Mar 2010 09:58:34 +0200 (IST) Received: from [10.1.2.102] ([10.1.2.102]) by il-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Sun, 14 Mar 2010 10:17:42 +0200 Message-ID: <4B9C9BA6.3020405@zend.com> Date: Sun, 14 Mar 2010 10:17:42 +0200 User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706) MIME-Version: 1.0 To: Mark Karpeles CC: PHP Developers Mailing List , wez@php.net References: <1268552350.11885.76099.camel@localhost> <4B9C96E2.8060500@zend.com> <1268554481.11885.76215.camel@localhost> In-Reply-To: <1268554481.11885.76215.camel@localhost> Content-Type: text/plain; charset=UTF-8; format=flowed X-OriginalArrivalTime: 14 Mar 2010 08:17:42.0739 (UTC) FILETIME=[D1C05A30:01CAC34E] Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Req #51295: busyTimeout method for SQLite3 From: jess@zend.com (Jess Portnoy) Hi Mark, I agree but I'm not the maintainer for PDO_SQLITE, I just happen to know=20 it somewhat and thought it can be useful to you as reference. I am CCing=20 Wez Furlong who I believe is the lead for it. May the source be with you, Best regards, Jess Portnoy Mark Karpeles wrote: > Hi, > > I checked around PDO (which I don't use at all, but the source is > usually a good documentation). > > The timeout can be changed for SQLite and SQLite3 PDO drivers with: > > $pdo->setAttribute(PDO::ATTR_TIMEOUT, ) > > I see that PDO::ATTR_TIMEOUT is not documented on > http://php.net/manual/en/pdo.setattribute.php - it might be a good idea > to fix this :) > > > Mark > > Le dimanche 14 mars 2010 =C3=A0 09:57 +0200, Jess Portnoy a =C3=A9crit = : > =20 >> Hello Mark, >> >> Note that while indeed sqlite3_busy_timeout() is not extended by the=20 >> SQLite3 and PDO_SQLITE extensions, it is called internally in=20 >> ext/pdo_sqlite/sqlite_driver.c. >> I think it is a good idea to extend it but also, that if you do, it=20 >> should probably also be done for PDO_SQLITE as it may be useful there = as=20 >> well. >> >> May the source be with you, >> Best regards, >> Jess Portnoy >> >> >> >> Mark Karpeles wrote: >> =20 >>> Hello, >>> >>> I've been encountering a problem with SELECT queries and SQLite3 as l= oad >>> was growing on my system. From times to times I was getting this erro= r: >>> >>> Warning: SQLite3Stmt::execute(): Unable to execute statement: databas= e >>> 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 >>> >>> >>> =20 >>> =20 > > > =20