mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 03:01:07 +08:00
Do not fetch database objects from information_schema, which has gotten extremely slow on servers with many databases and triggers, since we support triggers.
* Instead, use separate SHOW commands for tables, functions, procedures and triggers * Catch this chance to move these methods from main unit to mysql_connection, so they're accessible in a more generic way * Additionally, introduce new classes TDBObject and TDBObjectList which provide a more generic way than TMySQLQuery to access these database objects. Fixes issue #1529
This commit is contained in:
@ -1964,10 +1964,11 @@ var
|
||||
VT: TVirtualStringTree;
|
||||
EnumEditor: TEnumEditorLink;
|
||||
SetEditor: TSetEditorLink;
|
||||
Results: TMySQLQuery;
|
||||
DBObjects: TDBObjectList;
|
||||
Key: TForeignKey;
|
||||
ColNode: PVirtualNode;
|
||||
Col: PTableColumn;
|
||||
i: Integer;
|
||||
begin
|
||||
// Init grid editor in foreign key list
|
||||
VT := Sender as TVirtualStringTree;
|
||||
@ -1986,11 +1987,9 @@ begin
|
||||
2: begin
|
||||
EnumEditor := TEnumEditorLink.Create(VT);
|
||||
EnumEditor.AllowCustomText := True;
|
||||
Results := Mainform.FetchActiveDbTableList;
|
||||
while not Results.Eof do begin
|
||||
EnumEditor.ValueList.Add(Results.Col(DBO_NAME));
|
||||
Results.Next;
|
||||
end;
|
||||
DBObjects := Mainform.Connection.GetDBObjects(Mainform.ActiveDatabase);
|
||||
for i:=0 to DBObjects.Count-1 do
|
||||
EnumEditor.ValueList.Add(DBObjects[i].Name);
|
||||
EditLink := EnumEditor;
|
||||
end;
|
||||
3: begin
|
||||
|
Reference in New Issue
Block a user