1--TEST--
2oci8.default_prefetch ini option
3--EXTENSIONS--
4oci8
5--SKIPIF--
6<?php
7require_once 'skipifconnectfailure.inc';
8?>
9--INI--
10oci8.default_prefetch=100
11--FILE--
12<?php
13
14require __DIR__.'/connect.inc';
15
16// Initialize
17
18$stmtarray = array(
19    "drop table default_prefetch1_tab",
20    "create table default_prefetch1_tab (id number, value number)",
21    "insert into default_prefetch1_tab (id, value) values (1,1)",
22    "insert into default_prefetch1_tab (id, value) values (1,1)",
23    "insert into default_prefetch1_tab (id, value) values (1,1)",
24);
25
26oci8_test_sql_execute($c, $stmtarray);
27
28// Run Test
29
30$select_sql = "select * from default_prefetch1_tab";
31
32if (!($s = oci_parse($c, $select_sql))) {
33    die("oci_parse(select) failed!\n");
34}
35
36if (!oci_execute($s)) {
37    die("oci_execute(select) failed!\n");
38}
39
40var_dump(oci_fetch($s));
41var_dump(oci_num_rows($s));
42
43
44// Cleanup
45
46$stmtarray = array(
47    "drop table default_prefetch1_tab"
48);
49
50oci8_test_sql_execute($c, $stmtarray);
51
52echo "Done\n";
53?>
54--EXPECT--
55bool(true)
56int(1)
57Done
58