Fix issue #991: Termination char ; in SQL log.

This commit is contained in:
Ansgar Becker
2009-02-22 13:50:44 +00:00
parent 00cf179e31
commit 42e969cbcd

View File

@@ -3335,22 +3335,21 @@ var
begin
// Shorten very long messages
snip := (prefLogSqlWidth > 0) and (Length(msg) > prefLogSqlWidth);
if snip then
begin
if snip then begin
msg :=
Copy( msg, 0, prefLogSqlWidth ) +
'/* large SQL query, snipped at ' +
FormatNumber( prefLogSqlWidth ) +
' characters */';
end;
end else if (not snip) and (not comment) then
msg := msg + Delimiter
else if comment then
msg := '/* ' + msg + ' */';
msg := WideStringReplace( msg, #9, ' ', [rfReplaceAll] );
msg := WideStringReplace( msg, #10, ' ', [rfReplaceAll] );
msg := WideStringReplace( msg, #13, ' ', [rfReplaceAll] );
msg := WideStringReplace( msg, ' ', ' ', [rfReplaceAll] );
if ( comment ) then
begin
msg := '/* ' + msg + ' */';
end;
EnterCriticalSection(SqlMessagesLock);
try