Sfoglia il codice sorgente

* Do not call verbose if EscapeSQL does nothing

Michaël Van Canneyt 7 mesi fa
parent
commit
3677680c08
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      tests/utils/tsdb.pp

+ 2 - 1
tests/utils/tsdb.pp

@@ -463,7 +463,8 @@ class function TTestSQL.EscapeSQL(const S: String): String;
 begin
 //  Result:=StringReplace(S,'\','\\',[rfReplaceAll]);
   Result:=StringReplace(S,'''','''''',[rfReplaceAll]);
-  tsutils.Verbose(V_SQL,'EscapeSQL : "'+S+'" -> "'+Result+'"');
+  if (Result<>S) then
+    tsutils.Verbose(V_SQL,'EscapeSQL : "'+S+'" -> "'+Result+'"');
 end;