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