mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Clear cached objects of modified databases after bulk editing, which can include a table moving. Fixes issue #1506.
This commit is contained in:
@ -112,6 +112,7 @@ type
|
|||||||
ExportLastDatabase: Widestring;
|
ExportLastDatabase: Widestring;
|
||||||
FTargetConnection: TMySQLConnection;
|
FTargetConnection: TMySQLConnection;
|
||||||
FLastOutputSelectedIndex: Integer;
|
FLastOutputSelectedIndex: Integer;
|
||||||
|
FModifiedDbs: TWideStringList;
|
||||||
procedure SetToolMode(Value: TToolMode);
|
procedure SetToolMode(Value: TToolMode);
|
||||||
procedure AddResults(SQL: WideString);
|
procedure AddResults(SQL: WideString);
|
||||||
procedure AddNotes(Col1, Col2, Col3, Col4: WideString);
|
procedure AddNotes(Col1, Col2, Col3, Col4: WideString);
|
||||||
@ -195,6 +196,8 @@ begin
|
|||||||
FixVT(ResultGrid);
|
FixVT(ResultGrid);
|
||||||
FResults := TObjectList.Create;
|
FResults := TObjectList.Create;
|
||||||
SelectedTables := TWideStringList.Create;
|
SelectedTables := TWideStringList.Create;
|
||||||
|
FModifiedDbs := TWideStringList.Create;
|
||||||
|
FModifiedDbs.Duplicates := dupIgnore;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -482,6 +485,14 @@ begin
|
|||||||
FreeAndNil(ExportStream);
|
FreeAndNil(ExportStream);
|
||||||
end;
|
end;
|
||||||
ExportLastDatabase := '';
|
ExportLastDatabase := '';
|
||||||
|
|
||||||
|
if FModifiedDbs.Count > 0 then begin
|
||||||
|
for i:=0 to FModifiedDbs.Count-1 do
|
||||||
|
Mainform.Connection.ClearDbObjects(FModifiedDbs[i]);
|
||||||
|
TreeObjects.ResetNode(TreeObjects.GetFirst);
|
||||||
|
Mainform.DBtree.ResetNode(Mainform.DBtree.GetFirst);
|
||||||
|
FModifiedDbs.Clear;
|
||||||
|
end;
|
||||||
Screen.Cursor := crDefault;
|
Screen.Cursor := crDefault;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1101,8 +1112,11 @@ var
|
|||||||
Specs, LogRow: TWideStringList;
|
Specs, LogRow: TWideStringList;
|
||||||
begin
|
begin
|
||||||
Specs := TWideStringlist.Create;
|
Specs := TWideStringlist.Create;
|
||||||
if chkBulkTableEditDatabase.Checked and (comboBulkTableEditDatabase.Text <> DBObj.Database) then
|
if chkBulkTableEditDatabase.Checked and (comboBulkTableEditDatabase.Text <> DBObj.Database) then begin
|
||||||
Specs.Add('RENAME ' + Mainform.mask(comboBulkTableEditDatabase.Text)+'.'+Mainform.mask(DBObj.Name));
|
Specs.Add('RENAME ' + Mainform.mask(comboBulkTableEditDatabase.Text)+'.'+Mainform.mask(DBObj.Name));
|
||||||
|
FModifiedDbs.Add(DBObj.Database);
|
||||||
|
FModifiedDbs.Add(comboBulkTableEditDatabase.Text);
|
||||||
|
end;
|
||||||
if chkBulkTableEditEngine.Checked then begin
|
if chkBulkTableEditEngine.Checked then begin
|
||||||
if Mainform.Connection.ServerVersionInt < 40018 then
|
if Mainform.Connection.ServerVersionInt < 40018 then
|
||||||
Specs.Add('TYPE '+comboBulkTableEditEngine.Text)
|
Specs.Add('TYPE '+comboBulkTableEditEngine.Text)
|
||||||
|
Reference in New Issue
Block a user