Implement usage of mysql_warning_count(). Ask for running SHOW WARNINGS in a new query tab if there are more than the 5 warnings which already get displayed in the popup dialog. Fixes issue #2768.

This commit is contained in:
Ansgar Becker
2012-03-10 09:13:31 +00:00
parent 530c27d064
commit 9b7a1a88cd
3 changed files with 47 additions and 5 deletions

View File

@ -88,6 +88,7 @@ type
FQueryNetTime: Cardinal;
FRowsAffected: Int64;
FRowsFound: Int64;
FWarningCount: Int64;
FLogMsg: String;
FLogCategory: TDBLogCategory;
procedure BeforeQuery;
@ -104,6 +105,7 @@ type
property QueryNetTime: Cardinal read FQueryNetTime;
property RowsAffected: Int64 read FRowsAffected;
property RowsFound: Int64 read FRowsFound;
property WarningCount: Int64 read FWarningCount;
property Aborted: Boolean read FAborted write FAborted;
property ErrorMessage: String read FErrorMessage;
constructor Create(Connection: TDBConnection; Batch: TSQLBatch; TabNumber: Integer);
@ -2627,6 +2629,7 @@ begin
FQueryNetTime := 0;
FRowsAffected := 0;
FRowsFound := 0;
FWarningCount := 0;
FErrorMessage := '';
FBatchInOneGo := MainForm.actBatchInOneGo.Checked;
FStopOnErrors := MainForm.actQueryStopOnErrors.Checked;
@ -2689,6 +2692,7 @@ begin
Inc(FQueryNetTime, FConnection.LastQueryNetworkDuration);
Inc(FRowsAffected, FConnection.RowsAffected);
Inc(FRowsFound, FConnection.RowsFound);
Inc(FWarningCount, FConnection.WarningCount);
except
on E:EDatabaseError do begin
if FStopOnErrors or (i = FBatch.Count - 1) then begin