bug44113.phpt 980 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. --TEST--
  2. Bug #44113 (New collection creation can fail with OCI-22303)
  3. --EXTENSIONS--
  4. oci8
  5. --SKIPIF--
  6. <?php
  7. $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
  8. require(__DIR__.'/skipif.inc');
  9. if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
  10. ?>
  11. --FILE--
  12. <?php
  13. require(__DIR__.'/connect.inc');
  14. // Initialization
  15. $stmtarray = array(
  16. "create or replace type bug44113_list_t as table of number"
  17. );
  18. oci8_test_sql_execute($c, $stmtarray);
  19. // Run Test
  20. // The test can take some time to complete and can exceed PHP's test
  21. // timeout limit on slow networks.
  22. for ($x = 0; $x < 70000; $x++) {
  23. if (!($var = oci_new_collection($c, 'BUG44113_LIST_T'))) {
  24. print "Failed new collection creation on $x\n";
  25. break;
  26. }
  27. }
  28. print "Completed $x\n";
  29. // Cleanup
  30. $stmtarray = array(
  31. "drop type bug44113_list_t"
  32. );
  33. oci8_test_sql_execute($c, $stmtarray);
  34. echo "Done\n";
  35. ?>
  36. --EXPECT--
  37. Completed 70000
  38. Done