Bug #75563 [NEW]: Setting oci8.statement_cache_size >= open_cursors leads to a sure ORA-1000
From: dark dot epistemology at gmail dot com
Operating system: Linux 2.6.32-642.6.2.el6.x86_64
PHP version: 7.1.11
Package: OCI8 related
Bug Type: Bug
Bug description:Setting oci8.statement_cache_size >= open_cursors leads to a sure ORA-1000
Description:
------------
Set oci8.statement_cache_size = 30 in php.ini
Set open_cursors = 30 in Oracle.
Run the script and die on the 31st cursor:
Cursor 30 executed
Warning: oci_execute(): ORA-01000: maximum open cursors exceeded in
/home/dke/work/cursors/php/t2 on line 17
Test script:
---------------
#!/bin/env php
<?php
// Create connection to Oracle
$cx = oci_connect("/", "", "TST", null, OCI_CRED_EXT );
if (!$cx) {
$m = oci_error();
echo $m['message'], "\n";
exit;
}
$st = oci_parse($cx, "ALTER SESSION SET tracefile_identifier='T2'
SQL_TRACE= TRUE");
oci_execute( $st );
$qry = "select 1 + %d from dual";
for ($i=1; $i<=31; $i++) {
$st = oci_parse($cx, sprintf( $qry, $i) );
oci_execute($st, OCI_DEFAULT);
oci_fetch_all($st, $res);
oci_free_statement( $st );
printf( "Cursor %d executed\n", $i );
}
// Close the Oracle connection
oci_close($cx);
?>
Expected result:
----------------
I expect not to die on ORA-1000. I'm properly closing my cursors, after
all.
There should be a sanity check on oci8.statement_cache_size that ensures
it is strictly inferior to the Oracle parameter open_cursors.
Actual result:
--------------
Cursor 30 executed
Warning: oci_execute(): ORA-01000: maximum open cursors exceeded in
/home/dke/work/cursors/php/t2 on line 17
--
Edit bug report at https://bugs.php.net/bug.php?id=75563&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75563&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75563&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75563&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=75563&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=75563&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=75563&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=75563&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=75563&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=75563&r=support
Expected behavior: https://bugs.php.net/fix.php?id=75563&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=75563&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=75563&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=75563&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75563&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=75563&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=75563&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=75563&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=75563&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=75563&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=75563&r=mysqlcfg
Thread (3 messages)
- dark dot epistemology at gmail dot com