]> granicus.if.org Git - php/commitdiff
add new test
authorAntony Dovgal <tony2001@php.net>
Fri, 20 Jan 2006 11:07:51 +0000 (11:07 +0000)
committerAntony Dovgal <tony2001@php.net>
Fri, 20 Jan 2006 11:07:51 +0000 (11:07 +0000)
ext/oci8/tests/bug36096.phpt [new file with mode: 0644]

diff --git a/ext/oci8/tests/bug36096.phpt b/ext/oci8/tests/bug36096.phpt
new file mode 100644 (file)
index 0000000..7d899ee
--- /dev/null
@@ -0,0 +1,28 @@
+--TEST--
+Bug #36096 (oci_result() returns garbage after oci_fetch() failed)
+--SKIPIF--
+<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
+--FILE--
+<?php
+
+require dirname(__FILE__)."/connect.inc";
+
+$sql = "SELECT 'ABC' FROM DUAL WHERE 1<>1";
+$stmt = oci_parse($c, $sql);
+
+if(oci_execute($stmt, OCI_COMMIT_ON_SUCCESS)){
+       var_dump(oci_fetch($stmt));
+       var_dump(oci_result($stmt, 1));
+       var_dump(oci_field_name($stmt, 1));
+       var_dump(oci_field_type($stmt, 1));
+}
+
+echo "Done\n";
+
+?>
+--EXPECT--
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+Done