mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
Inform user about preference setting for limiting result tabs. Closes #73
This commit is contained in:
@@ -6322,3 +6322,6 @@ msgstr "Tab 5"
|
||||
|
||||
msgid "Go to tab 5"
|
||||
msgstr "Go to tab 5"
|
||||
|
||||
msgid "Reached maximum number of result tabs (%d). To display more results, increase setting in Preferences > SQL"
|
||||
msgstr "Reached maximum number of result tabs (%d). To display more results, increase setting in Preferences > SQL"
|
||||
|
||||
@@ -2842,7 +2842,7 @@ var
|
||||
SQL: String;
|
||||
i, BatchStartOffset, ResultCount: Integer;
|
||||
PacketSize, MaxAllowedPacket: Int64;
|
||||
DoStoreResult, ErrorAborted: Boolean;
|
||||
DoStoreResult, ErrorAborted, LogMaxResultsDone: Boolean;
|
||||
begin
|
||||
inherited;
|
||||
|
||||
@@ -2850,6 +2850,7 @@ begin
|
||||
i := 0;
|
||||
ResultCount := 0;
|
||||
ErrorAborted := False;
|
||||
LogMaxResultsDone := False;
|
||||
|
||||
while i < FBatch.Count do begin
|
||||
SQL := '';
|
||||
@@ -2880,6 +2881,13 @@ begin
|
||||
try
|
||||
FConnection.LockedByThread := Self;
|
||||
DoStoreResult := ResultCount < AppSettings.ReadInt(asMaxQueryResults);
|
||||
if (not DoStoreResult) and (not LogMaxResultsDone) then begin
|
||||
// Inform user about preference setting for limiting result tabs
|
||||
LogFromOutside(
|
||||
f_('Reached maximum number of result tabs (%d). To display more results, increase setting in Preferences > SQL', [AppSettings.ReadInt(asMaxQueryResults)]),
|
||||
lcInfo);
|
||||
LogMaxResultsDone := True;
|
||||
end;
|
||||
FConnection.Query(SQL, DoStoreResult, lcUserFiredSQL);
|
||||
Inc(ResultCount, FConnection.ResultCount);
|
||||
FBatchPosition := i;
|
||||
|
||||
Reference in New Issue
Block a user