Add "EXPLAIN query" to context menu of process list. Fixes issue #1717.

This commit is contained in:
Ansgar Becker
2010-02-24 18:56:29 +00:00
parent c9950e1c51
commit b730230b09
2 changed files with 14 additions and 5 deletions

View File

@ -717,7 +717,7 @@ object MainForm: TMainForm
Left = 0
Top = 0
Width = 567
Height = 15
Height = 18
Align = alTop
Alignment = taLeftJustify
BevelOuter = bvNone
@ -725,7 +725,7 @@ object MainForm: TMainForm
TabOrder = 0
object lblExplainProcess: TLabel
Left = 87
Top = 1
Top = 2
Width = 41
Height = 13
Cursor = crHandPoint
@ -735,16 +735,16 @@ object MainForm: TMainForm
Font.Color = clBlue
Font.Height = -11
Font.Name = 'Default'
Font.Style = []
Font.Style = [fsUnderline]
ParentFont = False
OnClick = lblExplainProcessClick
end
end
object SynMemoProcessView: TSynMemo
Left = 0
Top = 15
Top = 18
Width = 567
Height = 54
Height = 51
SingleLineMode = False
Align = alClient
Font.Charset = DEFAULT_CHARSET
@ -7237,6 +7237,13 @@ object MainForm: TMainForm
ShortCut = 13
OnClick = menuEditVariableClick
end
object menuExplainProcess: TMenuItem
Caption = 'EXPLAIN query'
Enabled = False
Hint = 'Analyze selected process SQL'
ImageIndex = 39
OnClick = lblExplainProcessClick
end
object N1a: TMenuItem
Caption = '-'
end

View File

@ -459,6 +459,7 @@ type
actQueryFindAgain1: TMenuItem;
Replacetext1: TMenuItem;
lblExplainProcess: TLabel;
menuExplainProcess: TMenuItem;
procedure refreshMonitorConfig;
procedure loadWindowConfig;
procedure saveWindowConfig;
@ -5916,6 +5917,7 @@ begin
lblExplainProcess.Enabled := enableSQLView
and (UpperCase(GetFirstWord(SynMemoProcessView.Text)) <> 'SHOW')
and (SynMemoProcessView.GetTextLen > 0);
menuExplainProcess.Enabled := lblExplainProcess.Enabled;
end;