|
From: <kn...@gr...> - 2000-03-14 04:15:50
|
The calculation of number of fixed and variable columns doesn't work for
some database material that I have. I have replaced a portion of
data.c:mdb_read_row() with the following (perhaps non-optimal, but more
accurate) algorithm.
/* find out all the important stuff about the row */
num_cols = mdb->pg_buf [row_start];
var_cols = 0;
fixed_cols = 0;
for (j = 0; j < table->num_cols; j++)
{
col = g_ptr_array_index (table->columns, j);
if (mdb_is_fixed_col (col))
fixed_cols++;
else
var_cols++;
}
I also have been finding that a mixture of int / long / varchar is causing
some of the varchars to be included inline and some to be "referenced"
outside the data stream. As a result, I get data something like:
INT LONG VC VC (26) INT
(00 00) (00 01 7c 01) (31) ("1996-xx-yy-17.54.36.000000") (00 04)
And the data that the VC above should have (it's a VC 30, by the way) is
further down, after all the rest of the fixed and variable data...
I'm going to see if I can generate a small database to distribute.
-- Karl --
|