summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Jones <sixd@php.net>2009-03-09 21:19:18 +0000
committerChristopher Jones <sixd@php.net>2009-03-09 21:19:18 +0000
commitd9bca66417f3ca4fd469fd759f45a202ad7d5740 (patch)
tree7b48167a06161a71904bf24fe3e495079c5c0bfe
parent3db98baa59204889ae5f331a44d84f73efff8b2d (diff)
downloadphp-git-d9bca66417f3ca4fd469fd759f45a202ad7d5740.tar.gz
New test for oci_fetch_all
-rw-r--r--ext/oci8/tests/bug47189.phpt48
1 files changed, 48 insertions, 0 deletions
diff --git a/ext/oci8/tests/bug47189.phpt b/ext/oci8/tests/bug47189.phpt
new file mode 100644
index 0000000000..b8623ade06
--- /dev/null
+++ b/ext/oci8/tests/bug47189.phpt
@@ -0,0 +1,48 @@
+--TEST--
+Bug #47189 (Multiple oci_fetch_all calls)
+--SKIPIF--
+<?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); ?>
+--FILE--
+<?php
+
+require(dirname(__FILE__).'/connect.inc');
+
+$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);
+
+$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--
+array(1) {
+ [0]=>
+ array(1) {
+ [u"DUMMY"]=>
+ unicode(1) "X"
+ }
+}
+array(0) {
+}
+array(1) {
+ [0]=>
+ array(1) {
+ [u"DUMMY"]=>
+ unicode(1) "X"
+ }
+}
+
+Warning: oci_fetch_all(): ORA-01002: %s in %s on line %d
+array(0) {
+}
+===DONE===