     declare v_substr_length int unsigned default 0;
     set @_wrap_select_num_original_columns := 0;
     
-my_main: begin
+    my_main: begin
     -- part one: find the SELECT keyword.
     my_loop: repeat 
         set v_old_from = v_from;

        ;
    end while;

    end;
    
    set p_text= concat(
                    v_statement

                ) 
                or v_old_from = v_from
            ) then
                -- if we ran into the from clause and there is whitespace (or comments) between the last column expression and the from keyword,
                -- then v_prev_tokens will end with a v_token_separator. We remove that here to not mess up finding the handle
                if v_token = 'from' 
                and substr(v_prev_tokens, character_length(v_prev_tokens) + 1 - character_length(v_token_separator)) = v_token_separator then
                    set v_prev_tokens = substr(v_prev_tokens, 1, character_length(v_prev_tokens) - character_length(v_token_separator));
