-
Jon Olav Hauglid authored
This worklog implements support for stacked diagnostic areas and the GET STACKED DIAGNOSTICS statement. Each connection has it's own stack of diagnostic areas. The diagnostic area on top of the stack is called the first diagnostic area. The diagnostic area just below is the second diagnostic area. There can be more than just two diagnostic areas, but only the top two are accessible. Normally all interaction happens with the first diagnostic area. This is where conditions (errors, warnings, notes) that are raised, are entered. The contents of the first diagnostic area can be queried by the existing GET [CURRENT] DIAGNOSTICS statement, while the contents of the second diagnostic area can be queried by the new GET STACKED DIAGNOSTICS statement. A new diagnostic area is pushed to the diagnostic area stack when a stored routine handler is activated. Initially, this new area contains a copy of the contents of the second diagnostic area (i.e. the first diagnostic area before the push). This allows GET STACKED DIAGNOSTICS to be used throughout the handler to inspect the conditions that triggered the handler, regardless of what happens with the first diagnostic area. This worklog also fixes Bug#14342913 SP HANDLER DOES NOT PRESERVE CURRENT DIAGNOSTICS AREA If a stored routine handler exits with RESIGNAL, the first diagnostic area now contains all conditions present when the handler was activated + the condition added by RESIGNAL. Before this fix, only the first condition present at handler activation was preserved. The worklog also contains serveral refactorings of the error handling API.
Jon Olav Hauglid authoredThis worklog implements support for stacked diagnostic areas and the GET STACKED DIAGNOSTICS statement. Each connection has it's own stack of diagnostic areas. The diagnostic area on top of the stack is called the first diagnostic area. The diagnostic area just below is the second diagnostic area. There can be more than just two diagnostic areas, but only the top two are accessible. Normally all interaction happens with the first diagnostic area. This is where conditions (errors, warnings, notes) that are raised, are entered. The contents of the first diagnostic area can be queried by the existing GET [CURRENT] DIAGNOSTICS statement, while the contents of the second diagnostic area can be queried by the new GET STACKED DIAGNOSTICS statement. A new diagnostic area is pushed to the diagnostic area stack when a stored routine handler is activated. Initially, this new area contains a copy of the contents of the second diagnostic area (i.e. the first diagnostic area before the push). This allows GET STACKED DIAGNOSTICS to be used throughout the handler to inspect the conditions that triggered the handler, regardless of what happens with the first diagnostic area. This worklog also fixes Bug#14342913 SP HANDLER DOES NOT PRESERVE CURRENT DIAGNOSTICS AREA If a stored routine handler exits with RESIGNAL, the first diagnostic area now contains all conditions present when the handler was activated + the condition added by RESIGNAL. Before this fix, only the first condition present at handler activation was preserved. The worklog also contains serveral refactorings of the error handling API.
Loading