dbTalk Databases Forums  

cross-platform use of berkley db

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss cross-platform use of berkley db in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
efimd
 
Posts: n/a

Default 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
consistent.

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
the error.

Is it a bug in berkeley db or I do something wrong?

Thanks in advance.


Reply With Quote
  #2  
Old   
Andi Vajda
 
Posts: n/a

Default Re: cross-platform use of berkley db - 07-16-2005 , 04:56 AM






Did you set the endianness of your databases with db->set_lorder() ?
Andi..


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.