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