php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38182 PDO::ATTR_TIMEOUT can be set but not retrieved
Submitted: 2006-07-21 20:56 UTC Modified: 2006-07-23 07:15 UTC
Votes:2
Avg. Score:3.5 ± 1.5
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: auroraeosrose at gmail dot com Assigned: wez (profile)
Status: Wont fix Package: PDO related
PHP Version: 5CVS-2006-07-21 (snap) OS: WinXPSP2
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2006-07-21 20:56 UTC] auroraeosrose at gmail dot com
Description:
------------
sqlite (v. 3) driver

$handle->setAttribute(PDO::ATTR_TIMEOUT, 3);

works just fine but 

$handle->getAttribute(PDO::ATTR_TIMEOUT);

creates

Warning: PDO::getAttribute(): SQLSTATE[IM001]: Driver does not support this function: driver does not support that attribute 

maybe it's just me - but if you can set the attribute shouldn't you be able to retrieve it as well?





Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-07-23 07:15 UTC] wez@php.net
as a matter of fact, this option is write-only; setting it simply maps to a call to:

int sqlite3_busy_timeout(sqlite3*, int ms);

there is no corresponding API for returning this value.

Now, IMO, there is no *good* reason that I can think of where you need this information.

The default is 60 seconds, which is a decent default.

 [2013-05-12 01:01 UTC] alix dot axel at gmail dot com
With the latest version of SQLite, you can just do:

PRAGMA busy_timeout;

It's probably true for older versions as well.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon Apr 22 02:01:25 2019 UTC