In some exception handling scenarios, a stored program does not return the modified values of the OUT and INOUT parameters to the caller.
If the stored procedure exits due to an unhandled exception, the modified values of its OUT and INOUT parameters are not returned to the caller.
If the exception handler is a CONTINUE or EXIT handler containing a RESIGNAL statement, the diagnostics area stack is popped during the execution of RESIGNAL. This in turn signals the exception, which is the information that existed before the handler is entered. If the exception is an error, the values of the OUT and INOUT parameters are not returned to the caller.