Annotation of embedaddon/php/ext/oci8/tests/bug35973.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #35973 (Error ORA-24806 occurs when trying to fetch a NCLOB field)
! 3: --SKIPIF--
! 4: <?php
! 5: $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
! 6: require(dirname(__FILE__).'/skipif.inc');
! 7: ?>
! 8: --FILE--
! 9: <?php
! 10:
! 11: require dirname(__FILE__).'/connect.inc';
! 12:
! 13: $s1 = oci_parse($c, "drop table test_nclob");
! 14: @oci_execute($s1);
! 15:
! 16: $s2 = oci_parse($c, "create table test_nclob (nc NCLOB)");
! 17: oci_execute($s2);
! 18:
! 19: $s3 = oci_parse($c, "insert into test_nclob (nc) values ('12345data')");
! 20: oci_execute($s3);
! 21:
! 22: $s3 = oci_parse($c, "select * from test_nclob");
! 23: oci_execute($s3);
! 24:
! 25: var_dump($data = oci_fetch_assoc($s3));
! 26: $d = $data['NC'];
! 27:
! 28: var_dump($d->read(5));
! 29: var_dump($d->read(4));
! 30:
! 31: $s1 = oci_parse($c, "drop table test_nclob");
! 32: @oci_execute($s1);
! 33:
! 34: echo "Done\n";
! 35: ?>
! 36: --EXPECTF--
! 37: array(1) {
! 38: ["NC"]=>
! 39: object(OCI-Lob)#%d (1) {
! 40: ["descriptor"]=>
! 41: resource(%d) of type (oci8 descriptor)
! 42: }
! 43: }
! 44: string(%d) "%s5"
! 45: string(%d) "%sa"
! 46: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>