#39612 [NEW]: closeCursor() does not allow SQLite 2 statement to resume
| From: | randy at rcs-comp dot com | Date: | Fri, 24 Nov 2006 07:39:19 +0000 |
| Subject: | #39612 [NEW]: closeCursor() does not allow SQLite 2 statement to resume | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-105392@lists.php.net to get a copy of this message | ||
From: randy at rcs-comp dot com
Operating system: Windows XP
PHP version: 5.2.0
PHP Bug Type: PDO related
Bug description: closeCursor() does not allow SQLite 2 statement to resume
Description:
------------
The documentation for PDOStatement::closeCursor():
frees up the connection to the server so that other SQL statements may be
issued, but leaves the statement in a state that enables it to be executed
again.
When using PDO with a SQLite 3 connection, this works as intended.
However, when trying to resume with a SQLite 2 connection, fetch() returns
FALSE.
Reproduce code:
---------------
http://www.rcs-comp.com/phpcode/simple_pdo_test2.php.txt
Expected result:
----------------
4 arrays of the first row of data:
>php simple_pdo_test2.php
Array
(
[id] => 1
[0] => 1
[user] => user1
[1] => user1
[email] => user1@example.com
[2] => user1@example.com
[time] => 1164353530
[3] => 1164353530
[message] => this is my message 1
[4] => this is my message 1
[confirmed] => 0
[5] => 0
)
Array
(
[id] => 1
[0] => 1
[user] => user1
[1] => user1
[email] => user1@example.com
[2] => user1@example.com
[time] => 1164353530
[3] => 1164353530
[message] => this is my message 1
[4] => this is my message 1
[confirmed] => 0
[5] => 0
)
Array
(
[id] => 1
[0] => 1
[user] => user1
[1] => user1
[email] => user1@example.com
[2] => user1@example.com
[time] => 1164353530
[3] => 1164353530
[message] => this is my message 1
[4] => this is my message 1
[confirmed] => 0
[5] => 0
)
Array
(
[id] => 1
[0] => 1
[user] => user1
[1] => user1
[email] => user1@example.com
[2] => user1@example.com
[time] => 1164353530
[3] => 1164353530
[message] => this is my message 1
[4] => this is my message 1
[confirmed] => 0
[5] => 0
)
Actual result:
--------------
The last call to fetch() returns FALSE
>php simple_pdo_test2.php
Array
(
[id] => 1
[0] => 1
[user] => user1
[1] => user1
[email] => user1@example.com
[2] => user1@example.com
[time] => 1164353530
[3] => 1164353530
[message] => this is my message 1
[4] => this is my message 1
[confirmed] => 0
[5] => 0
)
Array
(
[id] => 1
[0] => 1
[user] => user1
[1] => user1
[email] => user1@example.com
[2] => user1@example.com
[time] => 1164353530
[3] => 1164353530
[message] => this is my message 1
[4] => this is my message 1
[confirmed] => 0
[5] => 0
)
Array
(
[id] => 1
[0] => 1
[user] => user1
[1] => user1
[email] => user1@example.com
[2] => user1@example.com
[time] => 1164353530
[3] => 1164353530
[message] => this is my message 1
[4] => this is my message 1
[confirmed] => 0
[5] => 0
)
bool(false)
--
Edit bug report at http://bugs.php.net/?id=39612&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39612&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39612&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39612&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39612&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=39612&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=39612&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=39612&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=39612&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=39612&r=support
Expected behavior: http://bugs.php.net/fix.php?id=39612&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=39612&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=39612&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39612&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39612&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39612&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=39612&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=39612&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=39612&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=39612&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=39612&r=mysqlcfg