mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-17 04:40:18 +08:00
Enable EXPLAIN links and menu items also when relevant query does not start with SELECT.., as there may be a comment at the beginning. This leaves the responsibility for error messages to the server. Fixes issue #2986.
This commit is contained in:
@ -2485,8 +2485,7 @@ var
|
|||||||
begin
|
begin
|
||||||
// Sub menu with EXPLAIN items pops up
|
// Sub menu with EXPLAIN items pops up
|
||||||
SQL := GetCurrentQuery(ActiveQueryTab);
|
SQL := GetCurrentQuery(ActiveQueryTab);
|
||||||
actExplainCurrentQuery.Enabled := (UpperCase(GetFirstWord(SQL)) = 'SELECT')
|
actExplainCurrentQuery.Enabled := ActiveConnection.Parameters.NetTypeGroup = ngMySQL;
|
||||||
and (ActiveConnection.Parameters.NetTypeGroup = ngMySQL);
|
|
||||||
actExplainAnalyzeCurrentQuery.Enabled := actExplainCurrentQuery.Enabled;
|
actExplainAnalyzeCurrentQuery.Enabled := actExplainCurrentQuery.Enabled;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -6574,7 +6573,6 @@ begin
|
|||||||
SynMemoProcessView.Color := clBtnFace;
|
SynMemoProcessView.Color := clBtnFace;
|
||||||
end;
|
end;
|
||||||
lblExplainProcess.Enabled := enableSQLView
|
lblExplainProcess.Enabled := enableSQLView
|
||||||
and (UpperCase(GetFirstWord(SynMemoProcessView.Text)) = 'SELECT')
|
|
||||||
and (ActiveConnection.Parameters.NetTypeGroup = ngMySQL);
|
and (ActiveConnection.Parameters.NetTypeGroup = ngMySQL);
|
||||||
menuExplainProcess.Enabled := lblExplainProcess.Enabled;
|
menuExplainProcess.Enabled := lblExplainProcess.Enabled;
|
||||||
lblExplainProcessAnalyzer.Enabled := lblExplainProcess.Enabled;
|
lblExplainProcessAnalyzer.Enabled := lblExplainProcess.Enabled;
|
||||||
|
Reference in New Issue
Block a user