Annotation of embedaddon/php/ext/oci8/tests/bug44206.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Bug #44206 (Test if selecting ref cursors leads to ORA-1000 maximum open cursors reached)
        !             3: --SKIPIF--
        !             4: <?php
        !             5: $target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on these DBs
        !             6: require(dirname(__FILE__).'/skipif.inc');
        !             7: ?> 
        !             8: --FILE--
        !             9: <?php
        !            10: 
        !            11: require dirname(__FILE__).'/connect.inc';
        !            12: 
        !            13: // Run Test
        !            14: 
        !            15: for ($x = 0; $x < 400; $x++)
        !            16: {
        !            17:        $stmt = "select cursor (select $x from dual) a,
        !            18:                 cursor (select $x from dual) b 
        !            19:                 from dual";
        !            20:        $s = oci_parse($c, $stmt);
        !            21:        $r = oci_execute($s);
        !            22:         if (!$r) {
        !            23:                 echo "Exiting $x\n";
        !            24:                 exit;
        !            25:         }
        !            26:        $mode = OCI_ASSOC | OCI_RETURN_NULLS;
        !            27:        $result = oci_fetch_array($s, $mode);
        !            28:        oci_execute($result['A']);
        !            29:        oci_execute($result['B']);
        !            30:        oci_fetch_array($result['A'], $mode);
        !            31:        oci_fetch_array($result['B'], $mode);
        !            32:        oci_free_statement($result['A']);
        !            33:        oci_free_statement($result['B']);
        !            34:        oci_free_statement($s);
        !            35: }
        !            36: 
        !            37: echo "Completed $x\n";
        !            38: 
        !            39: oci_close($c);
        !            40: 
        !            41: echo "Done\n";
        !            42: 
        !            43: ?>
        !            44: --EXPECT--
        !            45: Completed 400
        !            46: Done

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>