Quantcast
Channel: Toad for MySQL
Viewing all articles
Browse latest Browse all 1315

Forum Post: Region Collapsing issue when region contains While statement

$
0
0
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?  

Viewing all articles
Browse latest Browse all 1315

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>