mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Move database filter again from mainform to session manager, so people without privilege to run SHOW DATABASE are not stuck. Fixes issue #1485. Also, allow to see available databases when user does a dropdown. Also, simplify logic for refreshing database list in mainform.
This commit is contained in:
@ -106,7 +106,7 @@ procedure TfrmSelectDBObject.FormShow(Sender: TObject);
|
||||
begin
|
||||
TreeDBO.Clear;
|
||||
TreeDBO.RootNodeCount := Mainform.DBtree.RootNodeCount;
|
||||
SetLength(FColumns, Mainform.Databases.Count);
|
||||
SetLength(FColumns, Mainform.AllDatabases.Count);
|
||||
// TreeDBO.OnFocusChanged(TreeDBO, TreeDBO.FocusedNode, 0);
|
||||
editDB.Clear;
|
||||
editTable.Clear;
|
||||
@ -186,9 +186,9 @@ begin
|
||||
case Sender.GetNodeLevel(Node) of
|
||||
1: SetLength(FColumns[Node.Index], ChildCount);
|
||||
2: begin // Table expanding
|
||||
DBObjects := Mainform.Connection.GetDBObjects(Mainform.Databases[Node.Parent.Index]);
|
||||
DBObjects := Mainform.Connection.GetDBObjects(Mainform.AllDatabases[Node.Parent.Index]);
|
||||
cols := Mainform.Connection.GetCol('SHOW COLUMNS FROM '
|
||||
+ Mainform.mask(Mainform.Databases[Node.Parent.Index])+'.'
|
||||
+ Mainform.mask(Mainform.AllDatabases[Node.Parent.Index])+'.'
|
||||
+ Mainform.Mask(DBObjects[Node.Index].Name));
|
||||
FColumns[Node.Parent.Index][Node.Index] := cols;
|
||||
ChildCount := cols.Count;
|
||||
|
Reference in New Issue
Block a user