Annotation of embedaddon/php/ext/oci8/tests/bug47189.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #47189 (Multiple oci_fetch_all calls)
3: --SKIPIF--
4: <?php
5: $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs: different error handling for this undefined behavior
6: require(dirname(__FILE__).'/skipif.inc');
7: ?>
8: --FILE--
9: <?php
10:
11: require(dirname(__FILE__).'/connect.inc');
12:
13: echo "Test 1\n";
14:
15: $s = oci_parse($c, "select * from dual");
16: oci_execute($s);
17: oci_fetch_all($s, $rs, 0, -1, OCI_FETCHSTATEMENT_BY_ROW);
18: var_dump($rs);
19: oci_fetch_all($s, $rs1, 0, -1, OCI_FETCHSTATEMENT_BY_ROW);
20: var_dump($rs1);
21:
22: echo "Test 2\n";
23:
24: $s = oci_parse($c, "select * from dual");
25: oci_execute($s);
26: oci_fetch_all($s, $rs, 0, 1, OCI_FETCHSTATEMENT_BY_ROW);
27: var_dump($rs);
28: oci_fetch_all($s, $rs1, 0, 1, OCI_FETCHSTATEMENT_BY_ROW);
29: var_dump($rs1);
30:
31: ?>
32: ===DONE===
33: <?php exit(0); ?>
34: --EXPECTF--
35: Test 1
36: array(1) {
37: [0]=>
38: array(1) {
39: ["DUMMY"]=>
40: string(1) "X"
41: }
42: }
43: array(0) {
44: }
45: Test 2
46: array(1) {
47: [0]=>
48: array(1) {
49: ["DUMMY"]=>
50: string(1) "X"
51: }
52: }
53:
54: Warning: oci_fetch_all(): ORA-01002: %s in %s on line %d
55: array(0) {
56: }
57: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>