]> granicus.if.org Git - php/commitdiff
add test for bug #36010
authorAntony Dovgal <tony2001@php.net>
Sat, 14 Jan 2006 22:22:48 +0000 (22:22 +0000)
committerAntony Dovgal <tony2001@php.net>
Sat, 14 Jan 2006 22:22:48 +0000 (22:22 +0000)
ext/oci8/tests/bug36010.phpt [new file with mode: 0644]

diff --git a/ext/oci8/tests/bug36010.phpt b/ext/oci8/tests/bug36010.phpt
new file mode 100644 (file)
index 0000000..ef43549
--- /dev/null
@@ -0,0 +1,26 @@
+--TEST--
+bug #36010 (Crash when executing SQL statment with lob parameter twice)
+--SKIPIF--
+<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
+--FILE--
+<?php
+       
+require dirname(__FILE__).'/connect.inc';
+
+function f($conn)
+{
+       $sql =  "begin :p_clob := 'lob string'; end;";
+       $stid = oci_parse($conn, $sql);
+       $clob = oci_new_descriptor($conn, OCI_D_LOB);
+       oci_bind_by_name($stid, ":p_clob", $clob, -1, OCI_B_CLOB);
+       $r = oci_execute($stid, OCI_DEFAULT);
+}
+
+f($c);
+f($c);
+
+echo "Done\n";
+
+?>
+--EXPECT--
+Done