mirror of
https://github.com/php/php-src.git
synced 2024-09-23 02:47:26 +00:00
Test multiple execution of a prepared EXEC PROCEDURE statement
This commit is contained in:
parent
36716c2525
commit
c78169086b
@ -24,6 +24,13 @@ InterBase: binding (may take a while)
|
|||||||
v_smallint smallint,
|
v_smallint smallint,
|
||||||
v_varchar varchar(10000)
|
v_varchar varchar(10000)
|
||||||
)");
|
)");
|
||||||
|
ibase_query(
|
||||||
|
"create procedure add1 (arg integer)
|
||||||
|
returns (result integer)
|
||||||
|
as
|
||||||
|
begin
|
||||||
|
result = arg +1;
|
||||||
|
end");
|
||||||
ibase_commit();
|
ibase_commit();
|
||||||
|
|
||||||
/* if timefmt not supported, hide error */
|
/* if timefmt not supported, hide error */
|
||||||
@ -181,6 +188,19 @@ InterBase: binding (may take a while)
|
|||||||
ibase_free_result($res);
|
ibase_free_result($res);
|
||||||
|
|
||||||
ibase_free_query($query);
|
ibase_free_query($query);
|
||||||
|
|
||||||
|
/* test execute procedure */
|
||||||
|
$query = ibase_prepare("execute procedure add1(?)");
|
||||||
|
$res = array();
|
||||||
|
for ($i = 0; $i < 10; $i++) {
|
||||||
|
$res[] = ibase_execute($query,$i);
|
||||||
|
}
|
||||||
|
ibase_free_query($query);
|
||||||
|
foreach ($res as $r) {
|
||||||
|
out_result($r, "proc add1");
|
||||||
|
ibase_free_result($r);
|
||||||
|
}
|
||||||
|
|
||||||
ibase_close();
|
ibase_close();
|
||||||
echo "end of test\n";
|
echo "end of test\n";
|
||||||
?>
|
?>
|
||||||
@ -220,5 +240,35 @@ prepare and exec select
|
|||||||
6
|
6
|
||||||
7
|
7
|
||||||
---
|
---
|
||||||
|
--- proc add1 ---
|
||||||
|
1
|
||||||
|
---
|
||||||
|
--- proc add1 ---
|
||||||
|
2
|
||||||
|
---
|
||||||
|
--- proc add1 ---
|
||||||
|
3
|
||||||
|
---
|
||||||
|
--- proc add1 ---
|
||||||
|
4
|
||||||
|
---
|
||||||
|
--- proc add1 ---
|
||||||
|
5
|
||||||
|
---
|
||||||
|
--- proc add1 ---
|
||||||
|
6
|
||||||
|
---
|
||||||
|
--- proc add1 ---
|
||||||
|
7
|
||||||
|
---
|
||||||
|
--- proc add1 ---
|
||||||
|
8
|
||||||
|
---
|
||||||
|
--- proc add1 ---
|
||||||
|
9
|
||||||
|
---
|
||||||
|
--- proc add1 ---
|
||||||
|
10
|
||||||
|
---
|
||||||
end of test
|
end of test
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user