From 7b99bcc823a383e806e13c8aeabf26fb0f16f758 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Wed, 13 Nov 2019 08:16:24 +0100 Subject: [PATCH] Issue #685: Fix fatal performance bug, calling GetSQL on each examined character of a TSQLSentence. See report on https://www.heidisql.com/forum.php?t=34935 --- source/apphelpers.pas | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/apphelpers.pas b/source/apphelpers.pas index 54579946..b4cd3b29 100644 --- a/source/apphelpers.pas +++ b/source/apphelpers.pas @@ -3150,10 +3150,10 @@ begin Prev1 := #0; Prev2 := #0; for i:=1 to Length(FullSQL) do begin - Cur := SQL[i]; + Cur := FullSQL[i]; AddCur := True; - if i > 1 then Prev1 := SQL[i-1]; - if i > 2 then Prev2 := SQL[i-2]; + if i > 1 then Prev1 := FullSQL[i-1]; + if i > 2 then Prev2 := FullSQL[i-2]; if (Cur = '*') and (Prev1 = '/') then begin InMultiLineComment := True;