Merge tables display their size as the sum of the underlying unioned tables, which is fine. But this size should not get counted to the overall sum, displayed besides the db nodes in the tree.

This commit is contained in:
Ansgar Becker
2008-07-07 18:24:57 +00:00
parent 75b7d25bf8
commit 6b942bf1e0

View File

@@ -5710,7 +5710,7 @@ procedure TMDIChild.DBtreeGetText(Sender: TBaseVirtualTree; Node:
WideString);
var
ds: TDataset;
db: String;
db, eng: String;
i: Integer;
Bytes: Int64;
AllListsCached: Boolean;
@@ -5759,7 +5759,10 @@ begin
Bytes := 0;
ds := FetchDbTableList(db);
while not ds.Eof do begin
Bytes := Bytes + GetTableSize(ds);
if ds.FindField('Type') <> nil then eng := FieldContent(ds, 'Type')
else eng := FieldContent(ds, 'Engine');
if UpperCase(eng) <> 'MRG_MYISAM' then
Bytes := Bytes + GetTableSize(ds);
ds.Next;
end;
if Bytes >= 0 then CellText := FormatByteNumber(Bytes)