Issue #1965: show warnings from some internal queries as well, and when running an SQL file

This commit is contained in:
Ansgar Becker
2024-06-18 16:53:09 +02:00
parent 02ea2d5199
commit 5b214a3d75
4 changed files with 33 additions and 10 deletions

View File

@ -3160,15 +3160,7 @@ begin
end;
FConnection.LockedByThread := nil;
Synchronize(procedure begin MainForm.AfterQueryExecution(Self); end);
// Show warnings and notes in log panel
if FConnection.WarningCount > 0 then begin
Warnings := FConnection.GetResults('SHOW WARNINGS');
while not Warnings.Eof do begin
FConnection.Log(lcError, Warnings.Col('Level') + ': ('+Warnings.Col('Code')+') ' + Warnings.Col('Message'));
Warnings.Next;
end;
Warnings.Free;
end;
FConnection.ShowWarnings;
// Check if FAborted is set by the main thread, to avoid proceeding the loop in case
// FStopOnErrors is set to false
if FAborted or ErrorAborted then