From: Yasir A. <li...@en...> - 2005-10-08 06:47:07
|
Many thanks to the team for developing this code - I've found it very useful. I'm using the latest CVS version on Linux I think I found a bug in data.c which causes mdb-export -I to sometimes print NULL for boolean columns (even when the value is not null). Here's the CVS diff: $ cvs diff data.c Index: data.c =================================================================== RCS file: /cvsroot/mdbtools/mdbtools/src/libmdb/data.c,v retrieving revision 1.102 diff -r1.102 data.c 173a174,176 > if (col->len_ptr) { > *col->len_ptr = 1; > } I hardly know the code at all, so my fix could be completely wrong, but it looks as though we're not updating *col->len_ptr for for boolean fields and this causes the -I switch of mdb-export (which relies on col->len_ptr) to think its value is 0. In fact I'm not sure of the value is ever set to 0 to begin with so whether it prints NULL or not depends on what's in the block of memory when bound_lens is allocated (see mdb-export.c). Just in case this isn't clear, the change is in data.c, function mdb_xfer_bound_bool(), with the new code inserted at line 174. Thanks, Yasir |