Hello, everybody.
I've noticed very strange DB2 behaviour in a stored procedure
parameters handling, and it looks like a bug for me. Consider stored
procedure defined as:
Create procedure test_proc(
IN p_x char(1),
OUT p_y char(1)
)
language sql result sets 0 modifies sql data BEGIN ...
Nothing special occurs if you make such a call from another stored
procedure:
call test_proc( var_x, var_y );
But if you pass the same variable for both parameters, like:
call test_proc( the_var, the_var );
then parameter "p_x" gets NULL value upon the entry "test_proc",
regardless of the real "the_var" value.
Why so ? Is this a bug or a feature ? Is this documented somewhere ?
I've detected this on "DB2 8.1.6 Enterprise Edition for Windows IA32".
--
Konstantin Andreev.