Bug in copying MDB_NUMERIC fields

Jakob Egger <[email protected]> Tue, 25 Jan 2011 02:28:52 +0100
Newsgroups gmane.comp.db.mdb-tools.devel
Message-ID <[email protected]>
There is a serious bug in libmdb, where the first two digits after the comma are deleted in numeric fields.

The problem is in the file "src/libmdb/data.c" in function "mdb_num_to_string" around line 718:

The line is supposed to be:
memmove(text+prec-scale+1, text+prec-scale, scale+1); //RIGHT

And not:
memmove(text+prec-scale, text+prec-scale+1, scale+1); //WRONG

WORKAROUND: use DOUBLE rather than NUMERIC fields

best regards,
Jakob Egger
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d