From 5f533035d3ad8dc56ef339196633a931d7bff60c Mon Sep 17 00:00:00 2001 From: Olivier Bertrand Date: Thu, 6 Aug 2015 17:46:47 +0200 Subject: [PATCH] Fix the TDBDOS::EstimatedLength function that was wrongly counting its calculation virtual and special columns. modified: storage/connect/reldef.h modified: storage/connect/tabdos.cpp --- storage/connect/reldef.h | 3 ++- storage/connect/tabdos.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/storage/connect/reldef.h b/storage/connect/reldef.h index 4aa29037dfc..dada5716dbe 100644 --- a/storage/connect/reldef.h +++ b/storage/connect/reldef.h @@ -193,7 +193,8 @@ class DllExport COLDEF : public COLCRT { /* Column description block friend class COLBLK; friend class DBFFAM; friend class TDBASE; - public: + friend class TDBDOS; +public: COLDEF(void); // Constructor // Implementation diff --git a/storage/connect/tabdos.cpp b/storage/connect/tabdos.cpp index a1e58ab3344..527fe55dd89 100644 --- a/storage/connect/tabdos.cpp +++ b/storage/connect/tabdos.cpp @@ -2018,7 +2018,8 @@ int TDBDOS::EstimatedLength(void) // result if we set dep to 1 dep = 1 + cdp->GetLong() / 20; // Why 20 ????? } else for (; cdp; cdp = cdp->GetNext()) - dep = MY_MAX(dep, cdp->GetOffset()); + if (!(cdp->Flags & (U_VIRTUAL|U_SPECIAL))) + dep = MY_MAX(dep, cdp->GetOffset()); return (int)dep; } // end of Estimated Length