summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArd Biesheuvel <abies@php.net>2003-08-28 00:18:27 +0000
committerArd Biesheuvel <abies@php.net>2003-08-28 00:18:27 +0000
commitc78169086bc5e71551152bed0c7e46dd0d165bc0 (patch)
tree0cc8d91f64b422870fdee7ad4870c331bd393466
parent36716c25255ac057b87b0a05706716310067c634 (diff)
downloadphp-git-c78169086bc5e71551152bed0c7e46dd0d165bc0.tar.gz
Test multiple execution of a prepared EXEC PROCEDURE statement
-rw-r--r--ext/interbase/tests/006.phpt50
1 files changed, 50 insertions, 0 deletions
diff --git a/ext/interbase/tests/006.phpt b/ext/interbase/tests/006.phpt
index 8a47986134..03abba8b87 100644
--- a/ext/interbase/tests/006.phpt
+++ b/ext/interbase/tests/006.phpt
@@ -24,6 +24,13 @@ InterBase: binding (may take a while)
v_smallint smallint,
v_varchar varchar(10000)
)");
+ ibase_query(
+ "create procedure add1 (arg integer)
+ returns (result integer)
+ as
+ begin
+ result = arg +1;
+ end");
ibase_commit();
/* if timefmt not supported, hide error */
@@ -181,6 +188,19 @@ InterBase: binding (may take a while)
ibase_free_result($res);
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();
echo "end of test\n";
?>
@@ -220,5 +240,35 @@ prepare and exec select
6
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