Skip to content
Permalink
Browse files

Issue #685: Fix fatal performance bug, calling GetSQL on each examine…

…d character of a TSQLSentence. See report on https://www.heidisql.com/forum.php?t=34935
  • Loading branch information
ansgarbecker committed Nov 13, 2019
1 parent 586b34c commit 7b99bcc823a383e806e13c8aeabf26fb0f16f758
Showing with 3 additions and 3 deletions.
  1. +3 −3 source/apphelpers.pas
@@ -3150,10 +3150,10 @@ function TSQLSentence.GetSQLWithoutComments: String;
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;

0 comments on commit 7b99bcc

Please sign in to comment.
You can’t perform that action at this time.