Skip to content

Commit 6a5af5c

Browse files
fix bug about initial "conn" token
1 parent a9cbcb8 commit 6a5af5c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bvc_tokenizer_body.sql

+4-4
Original file line numberDiff line numberDiff line change
@@ -1478,22 +1478,22 @@ is
14781478
l_next_i int;
14791479
l_next_pos int;
14801480
begin
1481-
1482-
-- insert token containing beginning of statement
1481+
-- insert "conn" token containing beginning of statement
14831482
if p_tokens.first > 1 then
1484-
p_tokens(1) := substr (p_stmt, 1, l_i-1);
1483+
p_tokens(1) := substr (p_stmt, 1, p_tokens.first-1);
14851484
p_tokens_type(1) := 'conn';
14861485
end if;
14871486
-- insert fake token at the end
14881487
p_tokens (length(p_stmt)+1) := 'fake';
14891488
l_i := p_tokens.first;
14901489
loop
14911490
exit when p_tokens (l_i) = 'fake';
1491+
--log('l_id='||l_i||': <'||p_tokens (l_i)||'> '||p_tokens_type(l_i));
14921492
-- next token must start here:
14931493
l_next_pos := l_i + length(p_tokens(l_i));
14941494
-- next current token starts here:
14951495
l_next_i := p_tokens.next (l_i);
1496-
-- insert new token if tokens are not adjacent
1496+
-- insert new "conn" token if tokens are not adjacent
14971497
if l_next_pos != l_next_i then
14981498
p_tokens (l_next_pos) := substr (p_stmt, l_next_pos, l_next_i - l_next_pos);
14991499
p_tokens_type (l_next_pos) := 'conn';

0 commit comments

Comments
 (0)