From d2fb5733e00b0fd77176fa6b72ba84bc6ebb0ceb Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Fri, 19 Oct 2012 14:55:19 +0000 Subject: [PATCH] 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. --- source/main.pas | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/main.pas b/source/main.pas index 66c66117..95a3a58a 100644 --- a/source/main.pas +++ b/source/main.pas @@ -2485,8 +2485,7 @@ var begin // Sub menu with EXPLAIN items pops up SQL := GetCurrentQuery(ActiveQueryTab); - actExplainCurrentQuery.Enabled := (UpperCase(GetFirstWord(SQL)) = 'SELECT') - and (ActiveConnection.Parameters.NetTypeGroup = ngMySQL); + actExplainCurrentQuery.Enabled := ActiveConnection.Parameters.NetTypeGroup = ngMySQL; actExplainAnalyzeCurrentQuery.Enabled := actExplainCurrentQuery.Enabled; end; @@ -6574,7 +6573,6 @@ begin SynMemoProcessView.Color := clBtnFace; end; lblExplainProcess.Enabled := enableSQLView - and (UpperCase(GetFirstWord(SynMemoProcessView.Text)) = 'SELECT') and (ActiveConnection.Parameters.NetTypeGroup = ngMySQL); menuExplainProcess.Enabled := lblExplainProcess.Enabled; lblExplainProcessAnalyzer.Enabled := lblExplainProcess.Enabled;