diff options
Diffstat (limited to 'storage/connect/filamvct.cpp')
-rwxr-xr-x | storage/connect/filamvct.cpp | 162 |
1 files changed, 81 insertions, 81 deletions
diff --git a/storage/connect/filamvct.cpp b/storage/connect/filamvct.cpp index 871613cb4b4..244acfdc5c8 100755 --- a/storage/connect/filamvct.cpp +++ b/storage/connect/filamvct.cpp @@ -336,7 +336,7 @@ int VCTFAM::Cardinality(PGLOBAL g) else sprintf(g->Message, MSG(NOT_FIXED_LEN), To_File, len, clen); - if (trace) + if (trace(1)) htrc(" Computed max_K=%d Filen=%d Clen=%d\n", card, len, clen); } else @@ -469,14 +469,14 @@ bool VCTFAM::OpenTableFile(PGLOBAL g) PlugSetPath(filename, To_File, Tdbp->GetPath()); if (!(Stream = PlugOpenFile(g, filename, opmode))) { - if (trace) + if (trace(1)) htrc("%s\n", g->Message); return (mode == MODE_READ && errno == ENOENT) ? PushWarning(g, Tdbp) : true; } // endif Stream - if (trace) + if (trace(1)) htrc("File %s is open in mode %s\n", filename, opmode); To_Fb = dbuserp->Openlist; // Keep track of File block @@ -581,7 +581,7 @@ bool VCTFAM::InitInsert(PGLOBAL g) cp->ReadBlock(g); } catch (int n) { - if (trace) + if (trace(1)) htrc("Exception %d: %s\n", n, g->Message); rc = true; } catch (const char *msg) { @@ -652,7 +652,7 @@ int VCTFAM::ReadBuffer(PGLOBAL g) OldBlk = CurBlk; // Last block actually read } // endif oldblk - if (trace) + if (trace(1)) htrc(" Read: CurNum=%d CurBlk=%d rc=%d\n", CurNum, CurBlk, RC_OK); return rc; @@ -663,7 +663,7 @@ int VCTFAM::ReadBuffer(PGLOBAL g) /***********************************************************************/ int VCTFAM::WriteBuffer(PGLOBAL g) { - if (trace) + if (trace(1)) htrc("VCT WriteBuffer: R%d Mode=%d CurNum=%d CurBlk=%d\n", Tdbp->GetTdb_No(), Tdbp->GetMode(), CurNum, CurBlk); @@ -756,7 +756,7 @@ int VCTFAM::DeleteRecords(PGLOBAL g, int irc) { bool eof = false; - if (trace) + if (trace(1)) htrc("VCT DeleteDB: rc=%d UseTemp=%d Fpos=%d Tpos=%d Spos=%d\n", irc, UseTemp, Fpos, Tpos, Spos); @@ -766,7 +766,7 @@ int VCTFAM::DeleteRecords(PGLOBAL g, int irc) /*******************************************************************/ Fpos = (Block - 1) * Nrec + Last; - if (trace) + if (trace(1)) htrc("Fpos placed at file end=%d\n", Fpos); eof = UseTemp && !MaxBlk; @@ -807,7 +807,7 @@ int VCTFAM::DeleteRecords(PGLOBAL g, int irc) #endif Spos++; // New start position is on next line - if (trace) + if (trace(1)) htrc("after: Tpos=%d Spos=%d\n", Tpos, Spos); } else { @@ -856,7 +856,7 @@ int VCTFAM::DeleteRecords(PGLOBAL g, int irc) close(h); - if (trace) + if (trace(1)) htrc("done, h=%d irc=%d\n", h, irc); } else @@ -899,7 +899,7 @@ bool VCTFAM::OpenTempFile(PGLOBAL g) opmode = "wb"; if (!(T_Stream = PlugOpenFile(g, tempname, opmode))) { - if (trace) + if (trace(1)) htrc("%s\n", g->Message); rc = true; @@ -947,7 +947,7 @@ bool VCTFAM::MoveIntermediateLines(PGLOBAL g, bool *b) len = fread(To_Buf, Clens[i], req, Stream); - if (trace) + if (trace(1)) htrc("after read req=%d len=%d\n", req, len); if (len != req) { @@ -976,7 +976,7 @@ bool VCTFAM::MoveIntermediateLines(PGLOBAL g, bool *b) } // endif UseTemp - if (trace) + if (trace(1)) htrc("after write pos=%d\n", ftell(Stream)); } // endfor i @@ -1007,7 +1007,7 @@ bool VCTFAM::MoveIntermediateLines(PGLOBAL g, bool *b) } // endif UseTemp - if (trace) + if (trace(1)) htrc("loop: Tpos=%d Spos=%d\n", Tpos, Spos); } // endfor n @@ -1144,7 +1144,7 @@ void VCTFAM::CloseTableFile(PGLOBAL g, bool abort) if (!(UseTemp && T_Stream)) rc = PlugCloseFile(g, To_Fb); - if (trace) + if (trace(1)) htrc("VCT CloseTableFile: closing %s wrc=%d rc=%d\n", To_File, wrc, rc); @@ -1217,7 +1217,7 @@ bool VCTFAM::ReadBlock(PGLOBAL g, PVCTCOL colp) else // Blocked vector format len = Nrec * (colp->Deplac + Lrecl * CurBlk); - if (trace) + if (trace(1)) htrc("len=%d Nrec=%d Deplac=%d Lrecl=%d CurBlk=%d maxblk=%d\n", len, Nrec, colp->Deplac, Lrecl, CurBlk, MaxBlk); @@ -1236,13 +1236,13 @@ bool VCTFAM::ReadBlock(PGLOBAL g, PVCTCOL colp) sprintf(g->Message, MSG(READ_ERROR), To_File, strerror(errno)); - if (trace) + if (trace(1)) htrc(" Read error: %s\n", g->Message); return true; } // endif - if (trace) + if (trace(1)) num_read++; return false; @@ -1268,7 +1268,7 @@ bool VCTFAM::WriteBlock(PGLOBAL g, PVCTCOL colp) else // Old VCT format len = Nrec * (colp->Deplac + Lrecl * colp->ColBlk); - if (trace) + if (trace(1)) htrc("modif=%d len=%d Nrec=%d Deplac=%d Lrecl=%d colblk=%d\n", Modif, len, Nrec, colp->Deplac, Lrecl, colp->ColBlk); @@ -1287,7 +1287,7 @@ bool VCTFAM::WriteBlock(PGLOBAL g, PVCTCOL colp) sprintf(g->Message, MSG(WRITE_STRERROR), (UseTemp) ? To_Fbt->Fname : To_File, strerror(errno)); - if (trace) + if (trace(1)) htrc("Write error: %s\n", strerror(errno)); return true; @@ -1358,7 +1358,7 @@ bool VCMFAM::OpenTableFile(PGLOBAL g) && fp->Count && fp->Mode == mode) break; - if (trace) + if (trace(1)) htrc("Mapping VCM file, fp=%p cnt=%d\n", fp, fp->Count); } else @@ -1416,7 +1416,7 @@ bool VCMFAM::OpenTableFile(PGLOBAL g) sprintf(g->Message, MSG(OPEN_MODE_ERROR), "map", (int) rc, filename); - if (trace) + if (trace(1)) htrc("%s\n", g->Message); return (mode == MODE_READ && rc == ENOENT) @@ -1467,7 +1467,7 @@ bool VCMFAM::OpenTableFile(PGLOBAL g) To_Fb = fp; // Useful when closing - if (trace) + if (trace(1)) htrc("fp=%p count=%d MapView=%p len=%d Top=%p\n", fp, fp->Count, Memory, len); @@ -1551,7 +1551,7 @@ bool VCMFAM::InitInsert(PGLOBAL g) cp->ReadBlock(g); } catch (int n) { - if (trace) + if (trace(1)) htrc("Exception %d: %s\n", n, g->Message); rc = true; } catch (const char *msg) { @@ -1567,7 +1567,7 @@ bool VCMFAM::InitInsert(PGLOBAL g) /***********************************************************************/ int VCMFAM::WriteBuffer(PGLOBAL g) { - if (trace) + if (trace(1)) htrc("VCM WriteBuffer: R%d Mode=%d CurNum=%d CurBlk=%d\n", Tdbp->GetTdb_No(), Tdbp->GetMode(), CurNum, CurBlk); @@ -1608,7 +1608,7 @@ int VCMFAM::WriteBuffer(PGLOBAL g) /***********************************************************************/ int VCMFAM::DeleteRecords(PGLOBAL g, int irc) { - if (trace) + if (trace(1)) htrc("VCM DeleteDB: irc=%d tobuf=%p Tpos=%p Spos=%p\n", irc, To_Buf, Tpos, Spos); @@ -1618,7 +1618,7 @@ int VCMFAM::DeleteRecords(PGLOBAL g, int irc) /*******************************************************************/ Fpos = (Block - 1) * Nrec + Last; - if (trace) + if (trace(1)) htrc("Fpos placed at file top=%p\n", Fpos); } else // Fpos is the Deleted line position @@ -1636,7 +1636,7 @@ int VCMFAM::DeleteRecords(PGLOBAL g, int irc) if (irc == RC_OK) { Spos = Fpos + 1; // New start position - if (trace) + if (trace(1)) htrc("after: Tpos=%p Spos=%p\n", Tpos, Spos); } else { @@ -1680,7 +1680,7 @@ int VCMFAM::DeleteRecords(PGLOBAL g, int irc) return RC_FX; } // endif - if (trace) + if (trace(1)) htrc("done, Tpos=%p newsize=%d drc=%d\n", Tpos, n, drc); if (!SetEndOfFile(fp->Handle)) { @@ -1755,7 +1755,7 @@ bool VCMFAM::MoveIntermediateLines(PGLOBAL, bool *) Tpos += n; } // endif MaxBlk - if (trace) + if (trace(1)) htrc("move %d bytes\n", n); } // endif n @@ -1812,14 +1812,14 @@ bool VCMFAM::ReadBlock(PGLOBAL, PVCTCOL colp) /*********************************************************************/ mempos = Memcol[i] + n * CurBlk; - if (trace) + if (trace(1)) htrc("mempos=%p i=%d Nrec=%d Clen=%d CurBlk=%d\n", mempos, i, Nrec, colp->Clen, CurBlk); if (colp->GetStatus(BUF_MAPPED)) colp->Blk->SetValPointer(mempos); - if (trace) + if (trace(1)) num_read++; return false; @@ -1843,7 +1843,7 @@ bool VCMFAM::WriteBlock(PGLOBAL, PVCTCOL colp __attribute__((unused))) /*********************************************************************/ mempos = Memcol[i] + n * CurBlk; - if (trace) + if (trace(1)) htrc("modif=%d mempos=%p i=%d Nrec=%d Clen=%d colblk=%d\n", Modif, mempos, i, Nrec, colp->Clen, colp->ColBlk); @@ -2008,14 +2008,14 @@ bool VECFAM::OpenColumnFile(PGLOBAL g, PCSZ opmode, int i) sprintf(filename, Colfn, i+1); if (!(Streams[i] = PlugOpenFile(g, filename, opmode))) { - if (trace) + if (trace(1)) htrc("%s\n", g->Message); return (Tdbp->GetMode() == MODE_READ && errno == ENOENT) ? PushWarning(g, Tdbp) : true; } // endif Streams - if (trace) + if (trace(1)) htrc("File %s is open in mode %s\n", filename, opmode); To_Fbs[i] = dup->Openlist; // Keep track of File blocks @@ -2163,7 +2163,7 @@ void VECFAM::ResetBuffer(PGLOBAL g) /***********************************************************************/ int VECFAM::WriteBuffer(PGLOBAL g) { - if (trace) + if (trace(1)) htrc("VCT WriteBuffer: R%d Mode=%d CurNum=%d CurBlk=%d\n", Tdbp->GetTdb_No(), Tdbp->GetMode(), CurNum, CurBlk); @@ -2205,7 +2205,7 @@ int VECFAM::WriteBuffer(PGLOBAL g) /***********************************************************************/ int VECFAM::DeleteRecords(PGLOBAL g, int irc) { - if (trace) + if (trace(1)) htrc("VEC DeleteDB: rc=%d UseTemp=%d Fpos=%d Tpos=%d Spos=%d\n", irc, UseTemp, Fpos, Tpos, Spos); @@ -2215,7 +2215,7 @@ int VECFAM::DeleteRecords(PGLOBAL g, int irc) /*******************************************************************/ Fpos = Cardinality(g); - if (trace) + if (trace(1)) htrc("Fpos placed at file end=%d\n", Fpos); } else // Fpos is the Deleted line position @@ -2251,7 +2251,7 @@ int VECFAM::DeleteRecords(PGLOBAL g, int irc) #endif Spos++; // New start position is on next line - if (trace) + if (trace(1)) htrc("after: Tpos=%d Spos=%d\n", Tpos, Spos); } else { @@ -2294,7 +2294,7 @@ int VECFAM::DeleteRecords(PGLOBAL g, int irc) close(h); - if (trace) + if (trace(1)) htrc("done, h=%d irc=%d\n", h, irc); } // endfor i @@ -2332,7 +2332,7 @@ bool VECFAM::OpenTempFile(PGLOBAL g) sprintf(tempname, Tempat, i+1); if (!(T_Streams[i] = PlugOpenFile(g, tempname, "wb"))) { - if (trace) + if (trace(1)) htrc("%s\n", g->Message); return true; @@ -2391,7 +2391,7 @@ bool VECFAM::MoveIntermediateLines(PGLOBAL g, bool *) len = fread(To_Buf, Clens[i], req, Streams[i]); - if (trace) + if (trace(1)) htrc("after read req=%d len=%d\n", req, len); if (len != req) { @@ -2410,7 +2410,7 @@ bool VECFAM::MoveIntermediateLines(PGLOBAL g, bool *) return true; } // endif - if (trace) + if (trace(1)) htrc("after write pos=%d\n", ftell(Streams[i])); } // endfor i @@ -2418,7 +2418,7 @@ bool VECFAM::MoveIntermediateLines(PGLOBAL g, bool *) Tpos += (int)req; Spos += (int)req; - if (trace) + if (trace(1)) htrc("loop: Tpos=%d Spos=%d\n", Tpos, Spos); b = true; @@ -2541,7 +2541,7 @@ void VECFAM::CloseTableFile(PGLOBAL g, bool abort) To_Fbs[i] = NULL; } // endif Streams - if (trace) + if (trace(1)) htrc("VCT CloseTableFile: closing %s wrc=%d rc=%d\n", To_File, wrc, rc); } // end of CloseTableFile @@ -2560,7 +2560,7 @@ bool VECFAM::ReadBlock(PGLOBAL g, PVCTCOL colp) len = Nrec * colp->Clen * CurBlk; i = colp->Index - 1; - if (trace) + if (trace(1)) htrc("len=%d i=%d Nrec=%d Deplac=%d Lrecl=%d CurBlk=%d\n", len, i, Nrec, colp->Deplac, Lrecl, CurBlk); @@ -2586,13 +2586,13 @@ bool VECFAM::ReadBlock(PGLOBAL g, PVCTCOL colp) sprintf(g->Message, MSG(READ_ERROR), fn, strerror(errno)); - if (trace) + if (trace(1)) htrc(" Read error: %s\n", g->Message); return true; } // endif - if (trace) + if (trace(1)) num_read++; return false; @@ -2615,7 +2615,7 @@ bool VECFAM::WriteBlock(PGLOBAL g, PVCTCOL colp) len = Nrec * colp->Clen * colp->ColBlk; i = colp->Index - 1; - if (trace) + if (trace(1)) htrc("modif=%d len=%d i=%d Nrec=%d Deplac=%d Lrecl=%d colblk=%d\n", Modif, len, i, Nrec, colp->Deplac, Lrecl, colp->ColBlk); @@ -2638,7 +2638,7 @@ bool VECFAM::WriteBlock(PGLOBAL g, PVCTCOL colp) sprintf(fn, (UseTemp) ? Tempat : Colfn, colp->Index); sprintf(g->Message, MSG(WRITE_STRERROR), fn, strerror(errno)); - if (trace) + if (trace(1)) htrc("Write error: %s\n", strerror(errno)); return true; @@ -2782,7 +2782,7 @@ bool VMPFAM::MapColumnFile(PGLOBAL g, MODE mode, int i) && fp->Count && fp->Mode == mode) break; - if (trace) + if (trace(1)) htrc("Mapping file, fp=%p\n", fp); } else @@ -2807,7 +2807,7 @@ bool VMPFAM::MapColumnFile(PGLOBAL g, MODE mode, int i) if (!(*g->Message)) sprintf(g->Message, MSG(OPEN_MODE_ERROR), "map", (int) rc, filename); - if (trace) + if (trace(1)) htrc("%s\n", g->Message); return (mode == MODE_READ && rc == ENOENT) @@ -2858,7 +2858,7 @@ bool VMPFAM::MapColumnFile(PGLOBAL g, MODE mode, int i) To_Fbs[i] = fp; // Useful when closing - if (trace) + if (trace(1)) htrc("fp=%p count=%d MapView=%p len=%d\n", fp, fp->Count, Memcol[i], len); @@ -2903,7 +2903,7 @@ int VMPFAM::DeleteRecords(PGLOBAL g, int irc) int i; int m, n; - if (trace) + if (trace(1)) htrc("VMP DeleteDB: irc=%d tobuf=%p Tpos=%p Spos=%p\n", irc, To_Buf, Tpos, Spos); @@ -2913,7 +2913,7 @@ int VMPFAM::DeleteRecords(PGLOBAL g, int irc) /*******************************************************************/ Fpos = (Block - 1) * Nrec + Last; - if (trace) + if (trace(1)) htrc("Fpos placed at file top=%p\n", Fpos); } else // Fpos is the Deleted line position @@ -2936,7 +2936,7 @@ int VMPFAM::DeleteRecords(PGLOBAL g, int irc) Tpos += n; - if (trace) + if (trace(1)) htrc("move %d bytes\n", n); } // endif n @@ -2944,7 +2944,7 @@ int VMPFAM::DeleteRecords(PGLOBAL g, int irc) if (irc == RC_OK) { Spos = Fpos + 1; // New start position - if (trace) + if (trace(1)) htrc("after: Tpos=%p Spos=%p\n", Tpos, Spos); } else { @@ -2981,7 +2981,7 @@ int VMPFAM::DeleteRecords(PGLOBAL g, int irc) return RC_FX; } // endif - if (trace) + if (trace(1)) htrc("done, Tpos=%p newsize=%d drc=%d\n", Tpos, n, drc); if (!SetEndOfFile(fp->Handle)) { @@ -3088,7 +3088,7 @@ bool BGVFAM::BigRead(PGLOBAL g, HANDLE h, void *inbuf, int req) DWORD nbr, drc, len = (DWORD)req; bool brc = ReadFile(h, inbuf, len, &nbr, NULL); - if (trace) + if (trace(1)) htrc("after read req=%d brc=%d nbr=%d\n", req, brc, nbr); if (!brc || nbr != len) { @@ -3105,7 +3105,7 @@ bool BGVFAM::BigRead(PGLOBAL g, HANDLE h, void *inbuf, int req) sprintf(g->Message, MSG(READ_ERROR), To_File, buf); - if (trace) + if (trace(1)) htrc("BIGREAD: %s\n", g->Message); rc = true; @@ -3119,7 +3119,7 @@ bool BGVFAM::BigRead(PGLOBAL g, HANDLE h, void *inbuf, int req) sprintf(g->Message, MSG(READ_ERROR), fn, strerror(errno)); - if (trace) + if (trace(1)) htrc("BIGREAD: nbr=%d len=%d errno=%d %s\n", nbr, len, errno, g->Message); @@ -3141,7 +3141,7 @@ bool BGVFAM::BigWrite(PGLOBAL g, HANDLE h, void *inbuf, int req) DWORD nbw, drc, len = (DWORD)req; bool brc = WriteFile(h, inbuf, len, &nbw, NULL); - if (trace) + if (trace(1)) htrc("after write req=%d brc=%d nbw=%d\n", req, brc, nbw); if (!brc || nbw != len) { @@ -3159,7 +3159,7 @@ bool BGVFAM::BigWrite(PGLOBAL g, HANDLE h, void *inbuf, int req) sprintf(g->Message, MSG(WRITE_STRERROR), fn, buf); - if (trace) + if (trace(1)) htrc("BIGWRITE: nbw=%d len=%d errno=%d %s\n", nbw, len, drc, g->Message); @@ -3174,7 +3174,7 @@ bool BGVFAM::BigWrite(PGLOBAL g, HANDLE h, void *inbuf, int req) sprintf(g->Message, MSG(WRITE_STRERROR), fn, strerror(errno)); - if (trace) + if (trace(1)) htrc("BIGWRITE: nbw=%d len=%d errno=%d %s\n", nbw, len, errno, g->Message); @@ -3224,7 +3224,7 @@ int BGVFAM::GetBlockInfo(PGLOBAL g) if (h == INVALID_HANDLE_VALUE || !_filelength(h)) { #endif // !__WIN__ // Consider this is a void table - if (trace) + if (trace(1)) htrc("Void table h=%d\n", h); Last = Nrec; @@ -3248,7 +3248,7 @@ int BGVFAM::GetBlockInfo(PGLOBAL g) Block = (vh.NumRec > 0) ? (vh.NumRec + Nrec - 1) / Nrec : 0; Last = (vh.NumRec + Nrec - 1) % Nrec + 1; - if (trace) + if (trace(1)) htrc("Block=%d Last=%d\n", Block, Last); } // endif's @@ -3348,7 +3348,7 @@ bool BGVFAM::MakeEmptyFile(PGLOBAL g, PCSZ fn) of.QuadPart = (BIGINT)n + (BIGINT)MaxBlk * (BIGINT)Blksize - (BIGINT)1; - if (trace) + if (trace(1)) htrc("MEF: of=%lld n=%d maxblk=%d blksize=%d\n", of.QuadPart, n, MaxBlk, Blksize); @@ -3394,7 +3394,7 @@ bool BGVFAM::MakeEmptyFile(PGLOBAL g, PCSZ fn) pos = (BIGINT)n + (BIGINT)MaxBlk * (BIGINT)Blksize - (BIGINT)1; - if (trace) + if (trace(1)) htrc("MEF: pos=%lld n=%d maxblk=%d blksize=%d\n", pos, n, MaxBlk, Blksize); @@ -3439,7 +3439,7 @@ bool BGVFAM::OpenTableFile(PGLOBAL g) PlugSetPath(filename, To_File, Tdbp->GetPath()); - if (trace) + if (trace(1)) htrc("OpenTableFile: filename=%s mode=%d Last=%d\n", filename, mode, Last); @@ -3516,7 +3516,7 @@ bool BGVFAM::OpenTableFile(PGLOBAL g) strcat(g->Message, filename); } // endif Hfile - if (trace) + if (trace(1)) htrc(" rc=%d access=%p share=%p creation=%d handle=%p fn=%s\n", rc, access, share, creation, Hfile, filename); @@ -3605,7 +3605,7 @@ bool BGVFAM::OpenTableFile(PGLOBAL g) strcat(g->Message, strerror(errno)); } // endif Hfile - if (trace) + if (trace(1)) htrc(" rc=%d oflag=%p mode=%p handle=%d fn=%s\n", rc, oflag, mode, Hfile, filename); #endif // UNIX @@ -3626,7 +3626,7 @@ bool BGVFAM::OpenTableFile(PGLOBAL g) To_Fb->Mode = mode; To_Fb->Handle = Hfile; - if (trace) + if (trace(1)) htrc("File %s is open in mode %d\n", filename, mode); if (del) @@ -3729,7 +3729,7 @@ bool BGVFAM::AllocateBuffer(PGLOBAL g) /***********************************************************************/ int BGVFAM::WriteBuffer(PGLOBAL g) { - if (trace) + if (trace(1)) htrc("BGV WriteDB: R%d Mode=%d CurNum=%d CurBlk=%d\n", Tdbp->GetTdb_No(), Tdbp->GetMode(), CurNum, CurBlk); @@ -3829,7 +3829,7 @@ int BGVFAM::DeleteRecords(PGLOBAL g, int irc) /* 2 - directly move the not deleted lines inside the original */ /* file, and at the end erase all trailing records. */ /*********************************************************************/ - if (trace) + if (trace(1)) htrc("BGV DeleteDB: irc=%d UseTemp=%d Fpos=%d Tpos=%d Spos=%d\n", irc, UseTemp, Fpos, Tpos, Spos); @@ -3839,7 +3839,7 @@ int BGVFAM::DeleteRecords(PGLOBAL g, int irc) /*******************************************************************/ Fpos = (Block - 1) * Nrec + Last; - if (trace) + if (trace(1)) htrc("Fpos placed at file end=%d\n", Fpos); eof = UseTemp && !MaxBlk; @@ -3878,7 +3878,7 @@ int BGVFAM::DeleteRecords(PGLOBAL g, int irc) #endif Spos++; // New start position is on next line - if (trace) + if (trace(1)) htrc("after: Tpos=%d Spos=%d\n", Tpos, Spos); } else { @@ -4065,7 +4065,7 @@ bool BGVFAM::MoveIntermediateLines(PGLOBAL g, bool *b) } // endif Usetemp... - if (trace) + if (trace(1)) htrc("loop: Tpos=%d Spos=%d\n", Tpos, Spos); } // endfor n @@ -4201,7 +4201,7 @@ void BGVFAM::CloseTableFile(PGLOBAL g, bool abort) if (Hfile != INVALID_HANDLE_VALUE) rc = PlugCloseFile(g, To_Fb); - if (trace) + if (trace(1)) htrc("BGV CloseTableFile: closing %s wrc=%d rc=%d\n", To_File, wrc, rc); @@ -4247,7 +4247,7 @@ bool BGVFAM::ReadBlock(PGLOBAL g, PVCTCOL colp) pos = (BIGINT)Nrec * ((BIGINT)colp->Deplac + (BIGINT)Lrecl * (BIGINT)CurBlk); - if (trace) + if (trace(1)) htrc("RB: offset=%lld Nrec=%d Deplac=%d Lrecl=%d CurBlk=%d MaxBlk=%d\n", pos, Nrec, colp->Deplac, Lrecl, CurBlk, MaxBlk); @@ -4257,7 +4257,7 @@ bool BGVFAM::ReadBlock(PGLOBAL g, PVCTCOL colp) if (BigRead(g, Hfile, colp->Blk->GetValPointer(), colp->Clen * Nrec)) return true; - if (trace) + if (trace(1)) num_read++; return false; @@ -4284,7 +4284,7 @@ bool BGVFAM::WriteBlock(PGLOBAL g, PVCTCOL colp) pos = (BIGINT)Nrec * ((BIGINT)colp->Deplac + (BIGINT)Lrecl * (BIGINT)colp->ColBlk); - if (trace) + if (trace(1)) htrc("WB: offset=%lld Nrec=%d Deplac=%d Lrecl=%d ColBlk=%d\n", pos, Nrec, colp->Deplac, Lrecl, colp->ColBlk); |