mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-16 11:42:12 +08:00
A yes/no message dialog may also return mrCancel, when the user clicks the X button to close it. Handle this case as if the user clicked "no", when HeidiSQL detects an unsafe query. See http://www.heidisql.com/forum.php?t=19697
This commit is contained in:
@ -2492,12 +2492,7 @@ begin
|
||||
if ContainsUnsafeQueries then begin
|
||||
Screen.Cursor := crDefault;
|
||||
msg := _('Your query contains UPDATEs and/or DELETEs without a WHERE clause. Please confirm that you know what you''re doing.');
|
||||
case MessageDialog(_('Unsafe queries found'), msg, mtConfirmation, [mbYes, mbNo], asWarnUnsafeUpdates) of
|
||||
mrYes:
|
||||
DoExecute := True; // Proceed to query execution below
|
||||
mrNo:
|
||||
DoExecute := False;
|
||||
end;
|
||||
DoExecute := MessageDialog(_('Unsafe queries found'), msg, mtConfirmation, [mbYes, mbNo], asWarnUnsafeUpdates) = mrYes;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Reference in New Issue
Block a user