xref: /PHP-5.6/ext/oci8/tests/bug36010.phpt (revision c7a8bd6a)
1--TEST--
2Bug #36010 (Crash when executing SQL statment with lob parameter twice)
3--SKIPIF--
4<?php
5$target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on these DBs
6require(dirname(__FILE__).'/skipif.inc');
7?>
8--FILE--
9<?php
10
11require dirname(__FILE__).'/connect.inc';
12
13function f($conn)
14{
15	$sql =  "begin :p_clob := 'lob string'; end;";
16	$stid = oci_parse($conn, $sql);
17	$clob = oci_new_descriptor($conn, OCI_D_LOB);
18	oci_bind_by_name($stid, ":p_clob", $clob, -1, OCI_B_CLOB);
19	$r = oci_execute($stid, OCI_DEFAULT);
20}
21
22f($c);
23f($c);
24
25echo "Done\n";
26
27?>
28--EXPECT--
29Done
30