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

View File

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