From 6b942bf1e034ca74c4b1a3aface42e4b2ef8be79 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Mon, 7 Jul 2008 18:24:57 +0000 Subject: [PATCH] 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. --- source/childwin.pas | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/childwin.pas b/source/childwin.pas index 78dcaf79..4cf3db2f 100644 --- a/source/childwin.pas +++ b/source/childwin.pas @@ -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)