diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2015-08-06 17:46:47 +0200 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2015-08-06 17:46:47 +0200 |
commit | 5f533035d3ad8dc56ef339196633a931d7bff60c (patch) | |
tree | 5995948550927610863d8810a60e4c0f2c8eea18 /storage | |
parent | 7962add6c4d4ddf2928059fb4e009014f704b206 (diff) | |
download | mariadb-git-5f533035d3ad8dc56ef339196633a931d7bff60c.tar.gz |
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
Diffstat (limited to 'storage')
-rw-r--r-- | storage/connect/reldef.h | 3 | ||||
-rw-r--r-- | 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 |