Here is some silly example code to try to demonstrate my issue with collapsing. CREATE PROCEDURE Test () BEGIN DECLARE vCondition2 int ; DECLARE vCondition3 int ; --region test SET vCondition2 = 3 ; WHILE vCondition2 = 3 DO IF vCondition3 = 2 THEN SET vConditon2 = 1 ; ELSE SET vCondition2 = 3 ; END IF; END WHILE; --end region END; If I collapse on the BEGIN, I get: CREATE PROCEDURE Test () BEGIN WHILE; --end region END; I expected: CREATE PROCEDURE Test () BEGIN; If I collapse on –region test: I get: CREATE PROCEDURE Test () BEGIN DECLARE vCondition2 int ; DECLARE vCondition3 int ; test WHILE; --end region END; I expected: CREATE PROCEDURE Test () BEGIN DECLARE vCondition2 int ; DECLARE vCondition3 int ; test END; It seems the WHILE is screwing up the collapse logic. Is there an error in my syntax? Is there a work around?
↧