[SQL][MINOR] Forbid duplicate SQLEXCEPTION and NOT FOUND handlers inside SQL Script
What changes were proposed in this pull request?
In this PR we forbid duplicate SQLEXCEPTION or NOT FOUND exception handlers to be defined in the same scope. This was already done for different conditions and sqlstates but was not done for these 2 types of exception handlers. Code like this should fail:
BEGIN
DECLARE EXIT HANDLER FOR NOT FOUND
BEGIN
SELECT 1;
END;
DECLARE EXIT HANDLER FOR NOT FOUND
BEGIN
SELECT 2;
END;
END
Why are the changes needed?
This is a bug fix.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
New tests in SqlScriptingInterpreterSuite.
Was this patch authored or co-authored using generative AI tooling?
No.
Adding @cloud-fan , @davidm-db, @MaxGekk
SqlScriptingInterpreterSuite fails
Let's create a JIRA ticket. This is not a minor change. Otherwise LGTM
Hey @cloud-fan, I created a JIRA ticket. Thanks for the review!
thanks, merging to master/4.0!