mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-17 04:40:18 +08:00
Keep EXPLAIN link disabled if selected process is a SHOW command or even has an empty SQL. Fixes issue #1717.
This commit is contained in:
@ -5903,7 +5903,6 @@ begin
|
||||
enableSQLView := Assigned(Node);
|
||||
SynMemoProcessView.Enabled := enableSQLView;
|
||||
pnlProcessView.Enabled := enableSQLView;
|
||||
lblExplainProcess.Enabled := enableSQLView;
|
||||
if enableSQLView then begin
|
||||
NodeData := ListProcesses.GetNodeData(Node);
|
||||
SynMemoProcessView.Highlighter := SynSQLSyn1;
|
||||
@ -5914,6 +5913,9 @@ begin
|
||||
SynMemoProcessView.Text := 'Please select a process in the above list.';
|
||||
SynMemoProcessView.Color := clBtnFace;
|
||||
end;
|
||||
lblExplainProcess.Enabled := enableSQLView
|
||||
and (UpperCase(GetFirstWord(SynMemoProcessView.Text)) <> 'SHOW')
|
||||
and (SynMemoProcessView.GetTextLen > 0);
|
||||
end;
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user