cross-platform use of berkley db - 07-13-2005 , 03:23 PM
I create a RECNO database and a secondary index on the little-endian
machine. When I access the database on a big-endian machine via
secondary index I get an error saying that "secondary index
inconsistent with primary" although on little-endian machine it remains
I do all byte-swapping when necessary, e.g. in my key compare callback
for the seconday index.
I, actually, found the reason for this problem in the debugger:
berkeley's engine, after it locates the record number in the secondary
index, goes for the record in the database and uses record number which
is still in little-endian. So it does not find the record and returns
Is it a bug in berkeley db or I do something wrong?
Thanks in advance.