From c78169086bc5e71551152bed0c7e46dd0d165bc0 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Thu, 28 Aug 2003 00:18:27 +0000 Subject: [PATCH] Test multiple execution of a prepared EXEC PROCEDURE statement --- ext/interbase/tests/006.phpt | 50 ++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) 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 -- 2.40.0