aboutsummaryrefslogtreecommitdiffstats
path: root/lib/odbc/test/oracle.erl
diff options
context:
space:
mode:
authorSatoshi Kinoshita <[email protected]>2013-01-09 17:27:56 +0900
committerFredrik Gustafsson <[email protected]>2013-03-27 16:47:51 +0100
commit16ea5fc0048d121d9bd09e9389142cc3a09ad047 (patch)
tree9a3117b253e1beca906cd49de9b84003d146d293 /lib/odbc/test/oracle.erl
parent0555a3a947c3b63028daf1c4314c4d6bd4066732 (diff)
downloadotp-16ea5fc0048d121d9bd09e9389142cc3a09ad047.tar.gz
otp-16ea5fc0048d121d9bd09e9389142cc3a09ad047.tar.bz2
otp-16ea5fc0048d121d9bd09e9389142cc3a09ad047.zip
test case for stored procedure with (32bit) integer out params on 64bit platform
Diffstat (limited to 'lib/odbc/test/oracle.erl')
-rw-r--r--lib/odbc/test/oracle.erl23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/odbc/test/oracle.erl b/lib/odbc/test/oracle.erl
index d74863d8c1..3e5fd244a0 100644
--- a/lib/odbc/test/oracle.erl
+++ b/lib/odbc/test/oracle.erl
@@ -240,3 +240,26 @@ describe_floating() ->
{ok,[{"F",sql_double},{"R",sql_double},{"D",sql_double}]}.
describe_dec_num() ->
{ok,[{"MYDEC",{sql_decimal,9,3}},{"MYNUM",{sql_decimal,9,2}}]}.
+
+stored_proc_integer_out() ->
+ "create or replace PROCEDURE test_proc1(" ++
+ "int_a OUT NUMBER, " ++
+ "int_b OUT NUMBER) " ++
+ "is " ++
+ "begin " ++
+ " int_a := 123; " ++
+ " int_b := 456; " ++
+ "exception " ++
+ "WHEN NO_DATA_FOUND THEN " ++
+ " int_a := 0; " ++
+ " int_b := 0; " ++
+ "end;".
+
+param_query(Ref) ->
+ odbc:param_query(Ref, "call test_proc1(?,?)",
+ [{sql_integer, out, [0]},
+ {sql_integer, out, [0]}]).
+
+
+query_result() ->
+ {executed, 2, [{123, 456}]}.