diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2014-03-10 12:21:17 +0100 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2014-03-10 12:21:17 +0100 |
commit | 85e8aee47d2e1cc58857148293f84ccd7e2ec620 (patch) | |
tree | 078efdcf3dfa65b84a05353645276dc1d3b07bc5 /storage/connect/filamvct.cpp | |
parent | 126bb34513f34eba97598d2357bfc1c2fbf594b4 (diff) | |
download | mariadb-git-85e8aee47d2e1cc58857148293f84ccd7e2ec620.tar.gz |
- Temporary
modified:
storage/connect/catalog.h
storage/connect/colblk.cpp
storage/connect/colblk.h
storage/connect/connect.cc
storage/connect/filamap.cpp
storage/connect/filamfix.cpp
storage/connect/filamfix.h
storage/connect/filamtxt.cpp
storage/connect/filamvct.cpp
storage/connect/filamzip.cpp
storage/connect/filamzip.h
storage/connect/ha_connect.cc
storage/connect/ha_connect.h
storage/connect/plgdbsem.h
storage/connect/plgdbutl.cpp
storage/connect/reldef.cpp
storage/connect/reldef.h
storage/connect/tabdos.cpp
storage/connect/tabdos.h
storage/connect/tabfix.cpp
storage/connect/tabfix.h
storage/connect/tabfmt.cpp
storage/connect/tabfmt.h
storage/connect/table.cpp
storage/connect/tabmac.h
storage/connect/tabmul.h
storage/connect/tabmysql.cpp
storage/connect/tabodbc.cpp
storage/connect/tabsys.cpp
storage/connect/tabsys.h
storage/connect/tabtbl.cpp
storage/connect/tabtbl.h
storage/connect/tabvct.cpp
storage/connect/tabvct.h
storage/connect/tabwmi.cpp
storage/connect/tabwmi.h
storage/connect/tabxml.cpp
storage/connect/tabxml.h
storage/connect/valblk.cpp
storage/connect/valblk.h
storage/connect/value.cpp
storage/connect/value.h
storage/connect/xobject.cpp
storage/connect/xobject.h
storage/connect/xtable.h
Diffstat (limited to 'storage/connect/filamvct.cpp')
-rwxr-xr-x | storage/connect/filamvct.cpp | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/storage/connect/filamvct.cpp b/storage/connect/filamvct.cpp index 11c9ac69d4d..4887d7e52fd 100755 --- a/storage/connect/filamvct.cpp +++ b/storage/connect/filamvct.cpp @@ -1,11 +1,11 @@ /*********** File AM Vct C++ Program Source Code File (.CPP) ***********/ /* PROGRAM NAME: FILAMVCT */ /* ------------- */ -/* Version 2.4 */ +/* Version 2.5 */ /* */ /* COPYRIGHT: */ /* ---------- */ -/* (C) Copyright to the author Olivier BERTRAND 2005-2013 */ +/* (C) Copyright to the author Olivier BERTRAND 2005-2014 */ /* */ /* WHAT THIS PROGRAM DOES: */ /* ----------------------- */ @@ -249,13 +249,20 @@ bool VCTFAM::SetBlockInfo(PGLOBAL g) /***********************************************************************/ int VCTFAM::MaxBlkSize(PGLOBAL g, int s) { - int savcur = CurBlk; + int rc = RC_OK, savcur = CurBlk; int size; // Roughly estimate the table size as the sum of blocks // that can contain good rows for (size = 0, CurBlk = 0; CurBlk < Block; CurBlk++) +#if defined(BLK_INDX) + if ((rc = Tdbp->TestBlock(g)) == RC_OK) + size += (CurBlk == Block - 1) ? Last : Nrec; + else if (rc == RC_EF) + break; +#else // !BLK_INDX size += (CurBlk == Block - 1) ? Last : Nrec; +#endif // !BLK_INDX CurBlk = savcur; return size; @@ -572,9 +579,25 @@ int VCTFAM::ReadBuffer(PGLOBAL g) /*******************************************************************/ CurNum = 0; +#if defined(BLK_INDX) + next: +#endif // BLK_INDX if (++CurBlk == Block) return RC_EF; // End of file +#if defined(BLK_INDX) + /*******************************************************************/ + /* Before reading a new block, check whether block optimizing */ + /* can be done, as well as for join as for local filtering. */ + /*******************************************************************/ + switch (Tdbp->TestBlock(g)) { + case RC_EF: + return RC_EF; + case RC_NF: + goto next; + } // endswitch rc +#endif // BLK_INDX + num_there++; } // endif CurNum |