fixed compute of bitmask size

This commit is contained in:
brianb 2000-03-15 13:11:22 +00:00
parent 6f42c3e345
commit 62e65cdd26
2 changed files with 8 additions and 2 deletions

View File

@ -133,7 +133,11 @@ the start of the page (though not always) begins a series of 18 byte records
one for each column present. It's format is as follows: one for each column present. It's format is as follows:
+------+---------+--------------------------------------------------------+ +------+---------+--------------------------------------------------------+
| ???? | 1 byte | Column Type (see table below) | | ???? | 1 byte | Column Type (see table below) |
| ???? |15 bytes | ??? | | ???? | 2 bytes | Column Number, ascending sequential number, starts at 0|
| ???? | 1 byte | appears to denote whether a text field is required |
| ???? | 1 byte | unknown |
| ???? | 4 bytes | Column Number (again) |
| ???? | 7 bytes | ??? (timestamp?) |
| ???? | 2 bytes | length of column | | ???? | 2 bytes | length of column |
+-------------------------------------------------------------------------+ +-------------------------------------------------------------------------+

View File

@ -54,6 +54,7 @@ int fixed_cols_found, var_cols_found;
int col_start, len; int col_start, len;
int eod; /* end of data */ int eod; /* end of data */
int delflag, lookupflag; int delflag, lookupflag;
int bitmask_sz;
row_start = mdb_get_int16(mdb, 10+(row*2)); row_start = mdb_get_int16(mdb, 10+(row*2));
row_end = mdb_find_end_of_row(mdb, row); row_end = mdb_find_end_of_row(mdb, row);
@ -88,7 +89,8 @@ int delflag, lookupflag;
else else
var_cols++; var_cols++;
} }
eod = mdb->pg_buf[row_end-2-var_cols]; bitmask_sz = (num_cols - 1) / 8 - 1;
eod = mdb->pg_buf[row_end-1-var_cols-bitmask_sz];
#if MDB_DEBUG #if MDB_DEBUG
fprintf(stdout,"#cols: %-3d #varcols %-3d EOD %-3d\n", fprintf(stdout,"#cols: %-3d #varcols %-3d EOD %-3d\n",