diff options
| author | Christopher Jones <sixd@php.net> | 2009-03-09 21:20:02 +0000 |
|---|---|---|
| committer | Christopher Jones <sixd@php.net> | 2009-03-09 21:20:02 +0000 |
| commit | 5dc46cc345e202cff6ed9be5fcffcd79224b96d9 (patch) | |
| tree | 31e0ba03c7b1331fb7d490b96ac0649b60721573 | |
| parent | 10ff16d21bd0d93d6b7d0087e5035c636ef1573d (diff) | |
| download | php-git-5dc46cc345e202cff6ed9be5fcffcd79224b96d9.tar.gz | |
MFH: New test for oci_fetch_all
| -rw-r--r-- | ext/oci8/tests/bug47189.phpt | 48 |
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..073b410fcd --- /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) { + ["DUMMY"]=> + string(1) "X" + } +} +array(0) { +} +array(1) { + [0]=> + array(1) { + ["DUMMY"]=> + string(1) "X" + } +} + +Warning: oci_fetch_all(): ORA-01002: %s in %s on line %d +array(0) { +} +===DONE=== |
