From a08d0d99493f52225957c8680ea8f199e0ee0711 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Wed, 8 Sep 2010 18:16:30 +0000 Subject: [PATCH] Remove feature: "Skip tables larger than X MB". Fixes issue #2153. --- source/const.inc | 1 - source/tabletools.dfm | 35 ----------------------------------- source/tabletools.pas | 12 +----------- 3 files changed, 1 insertion(+), 47 deletions(-) diff --git a/source/const.inc b/source/const.inc index 818ac402..630ebea1 100644 --- a/source/const.inc +++ b/source/const.inc @@ -177,7 +177,6 @@ const REGNAME_TOOLSWINHEIGHT = 'TableTools_WindowHeight'; REGNAME_TOOLSTREEWIDTH = 'TableTools_TreeWidth'; REGNAME_TOOLSFINDTEXT = 'TableTools_FindText'; - REGNAME_TOOLSSKIPMB = 'TableTools_SkipMB'; REGNAME_TOOLSDATATYPE = 'TableTools_Datatype'; REGNAME_USERMNGR_WINWIDTH = 'Usermanager_WindowWidth'; REGNAME_USERMNGR_WINHEIGHT = 'Usermanager_WindowHeight'; diff --git a/source/tabletools.dfm b/source/tabletools.dfm index 79b0fcb4..d8e698e7 100644 --- a/source/tabletools.dfm +++ b/source/tabletools.dfm @@ -21,22 +21,6 @@ object frmTableTools: TfrmTableTools 383) PixelsPerInch = 96 TextHeight = 13 - object lblSkipLargeTablesMB: TLabel - Left = 192 - Top = 355 - Width = 87 - Height = 13 - Anchors = [akLeft, akBottom] - Caption = 'MB (0 = unlimited)' - end - object lblSkipLargeTables: TLabel - Left = 8 - Top = 355 - Width = 107 - Height = 13 - Anchors = [akLeft, akBottom] - Caption = 'Skip tables larger than' - end object btnClose: TButton Left = 461 Top = 350 @@ -515,23 +499,4 @@ object frmTableTools: TfrmTableTools TabOrder = 2 OnClick = Execute end - object editSkipLargeTables: TEdit - Left = 130 - Top = 352 - Width = 40 - Height = 21 - Anchors = [akLeft, akBottom] - TabOrder = 3 - Text = '20' - end - object udSkipLargeTables: TUpDown - Left = 170 - Top = 352 - Width = 16 - Height = 21 - Anchors = [akLeft, akBottom] - Associate = editSkipLargeTables - Position = 20 - TabOrder = 4 - end end diff --git a/source/tabletools.pas b/source/tabletools.pas index 1275cb54..30b010bf 100644 --- a/source/tabletools.pas +++ b/source/tabletools.pas @@ -53,10 +53,6 @@ type lblExportTables: TLabel; lblExportOutputTarget: TLabel; btnExecute: TButton; - editSkipLargeTables: TEdit; - udSkipLargeTables: TUpDown; - lblSkipLargeTablesMB: TLabel; - lblSkipLargeTables: TLabel; btnExportOutputTargetSelect: TButton; tabBulkTableEdit: TTabSheet; chkBulkTableEditDatabase: TCheckBox; @@ -189,7 +185,6 @@ begin comboExportOutputTarget.Text := ''; // Various - udSkipLargeTables.Position := GetRegValue(REGNAME_TOOLSSKIPMB, udSkipLargeTables.Position); SetWindowSizeGrip( Self.Handle, True ); FixVT(TreeObjects); FixVT(ResultGrid); @@ -225,8 +220,6 @@ begin MainReg.WriteInteger(REGNAME_EXP_OUTPUT, OutputItem); MainReg.WriteString(REGNAME_EXP_OUTFILES, OutputFiles.Text); MainReg.WriteString(REGNAME_EXP_OUTDIRS, OutputDirs.Text); - - MainReg.WriteInteger( REGNAME_TOOLSSKIPMB, udSkipLargeTables.Position); end; @@ -464,8 +457,7 @@ begin if (csCheckedNormal in [TableNode.CheckState, DBNode.CheckState]) and (TableNode.CheckType <> ctNone) then begin DBObjects := Mainform.Connection.GetDBObjects(TreeObjects.Text[DBNode, 0]); DBObj := DBObjects[TableNode.Index]; - // Find table in cashed dataset and check its size - perhaps it has to be skipped - if (udSkipLargeTables.Position = 0) or ((DBObj.Size div SIZE_MB) < udSkipLargeTables.Position) then try + try case FToolMode of tmMaintenance: ProcessNodeFunc := DoMaintenance; tmFind: ProcessNodeFunc := DoFind; @@ -481,8 +473,6 @@ begin // The above SQL can easily throw an exception, e.g. if a table is corrupted. // In such cases we create a dummy row, including the error message AddNotes(DBObj.Database, DBObj.Name, 'error', E.Message) - end else begin - AddNotes(DBObj.Database, DBObj.Name, STRSKIPPED+FormatByteNumber(DBObj.Size), ''); end; end; TableNode := TreeObjects.GetNextSibling(TableNode);