chander@chips.com (Chander Sarna) (09/14/90)
I am experiencing a problem with the rebuild (CTRBLD) and compaction (CTCMPC) utilities when working with variable length records. I have CTREE version 4.3 Release B2 running on SUN 4's with SUN OS 4.01 operating system. If I force a rebuild with CTRBLD on a database it always gets rid of all the entries regardless of whether the file is corrupted or not. CTCMPC on the other hand complains about a "bad recmark" and deletes an arbitrary number of bytes. Looking in the ".dat" files, I see that while at the time of creation, the data file header is padded to 256 bytes, subsequent additions of records into the file start from 256th byte, thus overwriting it. The "add", "delete", "read", "update" are consistent about it so normal operations are OK. CTRBLD and CTCMPC, however, expect the records to start after the 256th byte and hence find data shifted by a single byte and are confused by it. This happens with the Variable Length Records Example supplied with the CTREE software too (with the "ctvxam.p" parameter file, "ctvxmg" executable). The CTTEST utility does not flag any errors so this does not look like a compiler problem. I would very much like to know if anybody has run into similar problems, and what the solution is. chander@chips.com Chander Sarna (408) 434 0600 x2280