summaryrefslogtreecommitdiff
path: root/ext/oci8/tests/bug44113.phpt
blob: 8a48d6aff08a5747bc3ab926f1f0f280d159187d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
--TEST--
Bug #44113 (New collection creation can fail with OCI-22303)
--SKIPIF--
<?php
$target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on these DBs
require(__DIR__.'/skipif.inc');
if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
?>
--FILE--
<?php

require(__DIR__.'/connect.inc');

// Initialization

$stmtarray = array(
	"create or replace type bug44113_list_t as table of number"
);

oci8_test_sql_execute($c, $stmtarray);

// Run Test
// The test can take some time to complete and can exceed PHP's test
// timout limit on slow networks.

for ($x = 0; $x < 70000; $x++) {
	if (!($var = oci_new_collection($c, 'BUG44113_LIST_T'))) {
		print "Failed new collection creation on $x\n";
		break;
	}
}

print "Completed $x\n";

// Cleanup

$stmtarray = array(
	"drop type bug44113_list_t"
);

oci8_test_sql_execute($c, $stmtarray);

echo "Done\n";

?>
--EXPECT--
Completed 70000
Done