Annotation of embedaddon/php/ext/oci8/tests/bug26133.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #26133 (ocifreedesc() segfault)
! 3: --SKIPIF--
! 4: <?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
! 5: --FILE--
! 6: <?php
! 7:
! 8: require(dirname(__FILE__).'/connect.inc');
! 9:
! 10: // Initialize
! 11:
! 12: $stmtarray = array(
! 13: "drop table bug26133_tab",
! 14: "create table bug26133_tab (id number, value number)",
! 15: );
! 16:
! 17: oci8_test_sql_execute($c, $stmtarray);
! 18:
! 19: // Run Test
! 20:
! 21: $ora_sql = "INSERT INTO bug26133_tab (id, value) VALUES (1,'1') RETURNING ROWID INTO :v_rowid ";
! 22:
! 23: $statement = OCIParse($c,$ora_sql);
! 24: $rowid = OCINewDescriptor($c,OCI_D_ROWID);
! 25: OCIBindByName($statement,":v_rowid", $rowid,-1,OCI_B_ROWID);
! 26: if (OCIExecute($statement)) {
! 27: OCICommit($c);
! 28: }
! 29: OCIFreeStatement($statement);
! 30: $rowid->free();
! 31:
! 32: // Cleanup
! 33:
! 34: $stmtarray = array(
! 35: "drop table bug26133_tab"
! 36: );
! 37:
! 38: oci8_test_sql_execute($c, $stmtarray);
! 39:
! 40: echo "Done\n";
! 41: ?>
! 42: --EXPECT--
! 43: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>