|
From: <br...@br...> - 2004-03-05 17:44:16
|
fields[].colnum is a match to the index of the table->columns hash. It represents the current column structure of the table. col->row_col_num (its a bad name) represents the columns position within the row. Example, take a table with 5 columns and delete the 3rd. colnum is still 1,2,3,4.....whereas row_col_num is 1,2,4,5. For tables with no deleted columns there is no difference between the two, but it's needed to properly read tables with deleted columns. Newly generated rows continue to write out deleted (fixed) columns with garbage so the row_col_num is constant for all rows, both pre and post deletion. Good eye spot on the colstart, will remove. I have more work to do on crack_row4 with deleted var cols and added columns (deleted fixed cols works). Then I need to translate that to crack_row3. Brian On Fri, 5 Mar 2004 08:37:39 -0800 (PST), Jeff Smith wrote: > > I noticed this change in your patch to write.c: > > before: > byte_num = i / 8; > bit_num = i % 8; > > after: > col = g_ptr_array_index (table->columns, i); > row_pos = col->row_col_num; > byte_num = row_pos / 8; > bit_num = row_pos % 8; > > If col->row_col_num really could be different than i, then I > think a change (in four places) is needed for consistency: > > this: > fields[i].colnum = i; > > should become this: > fields[i] = col->row_col_num; > > > -- Jeff S > > P.S. > Because of code you commented out in mdb_crack_row4 (which is already > rotting, BTW), you no longer need the initilization 'col_start = 2'. > > > --- br...@br... wrote: > > I found out something with the position of the column in the > > null_mask. There is a field in the tdef page that determines the > > order, and it's important for tables with deleted columns. I'm just > > about finished with my fixes for deleted columns, so I'm going to > wrap > > them up together and commit them. Patch looks good though, and I > > merged it into my tree this morning. > > > > Stay tuned. > > > > Brian > > > > On Tue, 2 Mar 2004 22:05:33 -0800 (PST), Jeff Smith wrote: > > > > > > > > FYI, I have submitted it to the patches page at sf. > > > > > > -- Jeff S (sf username: whydoubt) > > > > > > --- br...@br... wrote: > > > > Excellent! I'll add a note to the HACKING file about the order. > > The > > > > mdb_crack_row() stuff is a fairly recent change, and not all of > it > > > may > > > > have made it from the old data.c routine (although I hope it > did). > > > > I'm working on this area myself at the moment trying to get > > > > deleted/added columns working correctly. > > > > > > > > Sorry about the Jet4 thing, been working on write support under > > Jet3 > > > > primarily and haven't gotten to the point of translating that to > > > > Jet4....doh! > > > > > > > > I'll be looking forward to your patch. > > > > > > > > Brian > > > __________________________________ > Do you Yahoo!? > Yahoo! Search - Find what you�re looking for faster > http://search.yahoo.com |