Bug #77181 [NEW]: PDO Statement is not reusable after closing cursor on PDO OCI
| From: | morozov at tut dot by | Date: | Tue, 20 Nov 2018 14:59:33 +0000 |
| Subject: | Bug #77181 [NEW]: PDO Statement is not reusable after closing cursor on PDO OCI | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-218062@lists.php.net to get a copy of this message | ||
From: morozov at tut dot by
Operating system: Linux
PHP version: 7.2.12
Package: PDO OCI
Bug Type: Bug
Bug description:PDO Statement is not reusable after closing cursor on PDO OCI
Description:
------------
According to the documentation PDOStatement::closeCursor() [â¦] leaves
the statement in a state that enables it to be executed again. The
example below works at least with pdo_mysql, pdo_sqlite and pdo_pgsql
but doesn't work with pdo_oci.
Test script:
---------------
$conn = new PDO(
'oci:dbname=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SID=XE)))',
'system',
'oracle'
);
$stmt = $conn->prepare('SELECT ? FROM DUAL');
$stmt->execute([1]);
$value = $stmt->fetchColumn();
var_dump($value);
$stmt->closeCursor();
$stmt->execute([2]);
$value = $stmt->fetchColumn();
var_dump($value);
Expected result:
----------------
string(1) "1"
string(1) "2"
Actual result:
--------------
string(1) "1"
NULL
--
Edit bug report at https://bugs.php.net/bug.php?id=77181&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77181&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77181&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77181&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=77181&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=77181&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=77181&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=77181&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=77181&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=77181&r=support
Expected behavior: https://bugs.php.net/fix.php?id=77181&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=77181&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=77181&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=77181&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77181&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=77181&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=77181&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=77181&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=77181&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=77181&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=77181&r=mysqlcfg