diff options
Diffstat (limited to 'storage/connect/filamzip.cpp')
-rw-r--r-- | storage/connect/filamzip.cpp | 74 |
1 files changed, 3 insertions, 71 deletions
diff --git a/storage/connect/filamzip.cpp b/storage/connect/filamzip.cpp index 4f1a02d8257..ae4e2c33227 100644 --- a/storage/connect/filamzip.cpp +++ b/storage/connect/filamzip.cpp @@ -403,7 +403,7 @@ ZBKFAM::ZBKFAM(PDOSDEF tdp) : ZIPFAM(tdp) CurLine = NULL; NxtLine = NULL; Closing = false; - BlkPos = tdp->GetTo_Pos(); + BlkPos = NULL; } // end of ZBKFAM standard constructor ZBKFAM::ZBKFAM(PZBKFAM txfp) : ZIPFAM(txfp) @@ -414,23 +414,6 @@ ZBKFAM::ZBKFAM(PZBKFAM txfp) : ZIPFAM(txfp) } // end of ZBKFAM copy constructor /***********************************************************************/ -/* Use BlockTest to reduce the table estimated size. */ -/***********************************************************************/ -int ZBKFAM::MaxBlkSize(PGLOBAL g, int s) - { - int 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++) - size += (CurBlk == Block - 1) ? Last : Nrec; - - CurBlk = savcur; - return size; - } // end of MaxBlkSize - -/***********************************************************************/ /* ZBK Cardinality: returns table cardinality in number of rows. */ /* This function can be called with a null argument to test the */ /* availability of Cardinality implementation (1 yes, 0 no). */ @@ -509,56 +492,8 @@ int ZBKFAM::SkipRecord(PGLOBAL g, bool header) /***********************************************************************/ int ZBKFAM::ReadBuffer(PGLOBAL g) { - int n, rc = RC_OK; - - /*********************************************************************/ - /* Sequential reading when Placed is not true. */ - /*********************************************************************/ - if (++CurNum < Rbuf) { - CurLine = NxtLine; - - // Get the position of the next line in the buffer - while (*NxtLine++ != '\n') ; - - // Set caller line buffer - n = NxtLine - CurLine - Ending; - memcpy(Tdbp->GetLine(), CurLine, n); - Tdbp->GetLine()[n] = '\0'; - return RC_OK; - } else if (Rbuf < Nrec && CurBlk != -1) - return RC_EF; - - /*********************************************************************/ - /* New block. */ - /*********************************************************************/ - CurNum = 0; - - if (++CurBlk >= Block) - return RC_EF; - - BlkLen = BlkPos[CurBlk + 1] - BlkPos[CurBlk]; - - if (!(n = gzread(Zfile, To_Buf, BlkLen))) { - rc = RC_EF; - } else if (n > 0) { - // Get the position of the current line - CurLine = To_Buf; - - // Now get the position of the next line - for (NxtLine = CurLine; *NxtLine++ != '\n';) ; - - // Set caller line buffer - n = NxtLine - CurLine - Ending; - memcpy(Tdbp->GetLine(), CurLine, n); - Tdbp->GetLine()[n] = '\0'; - Rbuf = (CurBlk == Block - 1) ? Last : Nrec; - IsRead = true; - rc = RC_OK; - num_read++; - } else - rc = Zerror(g); - - return rc; + strcpy(g->Message, "This AM cannot be used in this version"); + return RC_FX; } // end of ReadBuffer /***********************************************************************/ @@ -770,9 +705,6 @@ int ZIXFAM::ReadBuffer(PGLOBAL g) CurNum = 0; Tdbp->SetLine(To_Buf); -//if (++CurBlk >= Block) -// return RC_EF; - if (!(n = gzread(Zfile, To_Buf, Buflen))) { rc = RC_EF; } else if (n > 0) { |