Condition Handling area is the handler’s current diagnostics area.  GET [CURRENT] DIAGNOSTICS  and  GET STACKED DIAGNOSTICS  can be used within the handler to access the contents of the current (handler) and stacked (stored program) diagnostics areas. Initially, they return the same result, but statements executing within the handler modify the current diagnostics area, clearing and setting its contents according to the normal rules (see How the Diagnostics Area is Cleared and Populated). The stacked diagnostics area cannot be modified by statements executing within the handler except  RESIGNAL . If the handler executes successfully, the current (handler) diagnostics area is popped and the stacked (stored program) diagnostics area again becomes the current diagnostics area. Conditions added to the handler diagnostics area during handler execution are added to the current diagnostics area. The  RESIGNAL  statement passes on the error condition information that is available during execution of a condition handler within a compound statement inside a stored program.  RESIGNAL  may change some or all information before passing it on, modifying the diagnostics stack as described in Section 13.6.7.4, “RESIGNAL Statement” . Example: If  max_error_count  is 10, the diagnostics area can contain a maximum of 10 condition areas. Suppose that a statement raises 20 conditions, 12 of which are errors. In that case, the diagnostics area contains the first 10 conditions,  NUMBER  is 10,  warning_count  is 20, and  error_count  is 12. Changes to the value of  max_error_count  have no effect until the next attempt to modify the diagnostics area. If the diagnostics area contains 10 condition areas and  max_error_count  is set to 5, that has no immediate effect on the size or content of the diagnostics area. If a stored procedure exits with an unhandled exception, modified values of  OUT  and  INOUT  parameters are not propogated back to the caller. If an exception is handled by a  CONTINUE  or  EXIT  handler that contains a  RESIGNAL  statement, execution of  RESIGNAL  pops the Diagnostics Area stack, thus signalling the exception (that is, the information that existed before entry into the handler). If the exception is an error, the values of  OUT  and INOUT  parameters are not propogated back to the caller. 13.6.7.8 Condition Handling and OUT or INOUT Parameters Diagnostics Area-Related System Variables •Execution of  RESIGNAL Certain system variables control or are related to some aspects of the diagnostics area: • max_error_count  controls the number of condition areas in the diagnostics area. If more conditions than this occur, MySQL silently discards information for the excess conditions. (Conditions added by RESIGNAL  are always added, with older conditions being discarded as necessary to make room.) • warning_count  indicates the number of conditions that occurred. This includes errors, warnings, and notes. Normally,  NUMBER  and  warning_count  are the same. However, as the number of conditions generated exceeds  max_error_count , the value of  warning_count  continues to rise whereas NUMBER  remains capped at  max_error_count  because no additional conditions are stored in the diagnostics area. • error_count  indicates the number of errors that occurred. This value includes “not found”  and exception conditions, but excludes warnings and notes. Like  warning_count , its value can exceed max_error_count . •If the  sql_notes  system variable is set to 0, notes are not stored and do not increment warning_count . 2833