In some exception-handling scenarios, the stored program does not return the modified values of OUT and INOUT parameters to the caller.
If a stored procedure exits due to an unhandled exception, the modified values of its OUT and INOUT parameters will not be returned to the caller.
If the exception handler is a CONTINUE or EXIT handler containing a RESIGNAL statement, executing RESIGNAL will pop the stack from the diagnostic area, thereby raising an exception signal (that is, the information present before entering the handler). If the exception is an error, the values of the OUT and INOUT parameters are not returned to the caller.