php-src/ext/oci8/tests/bug26133.phpt

35 lines
936 B
Plaintext
Raw Normal View History

2003-12-19 17:03:12 +00:00
--TEST--
Bug #26133 (ocifreedesc() segfault)
--SKIPIF--
2005-12-01 13:39:48 +00:00
<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
2003-12-19 17:03:12 +00:00
--FILE--
<?php
2005-12-01 13:39:48 +00:00
require dirname(__FILE__).'/connect.inc';
require dirname(__FILE__).'/create_table.inc';
if ($c) {
2003-12-19 17:03:12 +00:00
$ora_sql = "INSERT INTO
2005-12-01 13:39:48 +00:00
".$schema.$table_name." (id, value)
2003-12-19 17:03:12 +00:00
VALUES ('1','1')
RETURNING
ROWID
INTO :v_rowid ";
2005-12-01 13:39:48 +00:00
$statement = OCIParse($c,$ora_sql);
$rowid = OCINewDescriptor($c,OCI_D_ROWID);
2003-12-19 17:03:12 +00:00
OCIBindByName($statement,":v_rowid", $rowid,-1,OCI_B_ROWID);
if (OCIExecute($statement)) {
2005-12-01 13:39:48 +00:00
OCICommit($c);
2003-12-19 17:03:12 +00:00
}
OCIFreeStatement($statement);
$rowid->free();
}
2005-12-01 13:39:48 +00:00
require dirname(__FILE__).'/drop_table.inc';
2003-12-19 17:03:12 +00:00
echo "Done\n";
?>
2005-12-01 13:39:48 +00:00
--EXPECT--
2003-12-19 17:03:12 +00:00
Done