tackling sqlite byte-order problem

David Relson relson at osagesoftware.com
Thu Feb 10 02:48:33 CET 2005


On Thu, 10 Feb 2005 02:46:55 +0100
Matthias Andree wrote:

> David Relson <relson at osagesoftware.com> writes:
> 
> >> Yup. I'd think we'd better add .ENDIAN32 at creation time to remove
> >> hunting for dates. The YYYY must be >= 2002 (first bogofilter release)
> >> and the MMDD <= 1231. We can gather dates almost everywhere, token
> >> timestamp, .WORDLIST_VERSION, we can sanity check .ROBX, but whenever
> >> the database is open for update, we'd better place an .ENDIAN32 tag for
> >> efficiency.
> >
> > It seems that this is needed only for sqlite3, because the other
> > databases support is_swapped(), right?
> 
> I'm not sure about TDB and QDBM. QDBM appears not to support sharing
> database files across endianness, TDB is virtually undocumented and
> documentation and code are notoriously out of synch.
> 
> I don't want to make a sqlite3-local solution if the code can be reused
> for another DB backend.

Fair enough.  One extra symbol and a dozen lines of code (estimated) do
not a problem make.




More information about the bogofilter-dev mailing list