sqllite-for-amigaos

SQLite is a Self-contained, embeddable, zero-configuration SQL database engine. This is the Amiga version of sqlite-3.6.1 and can be considered stable. The regression tests either succeed without failure or reported errors can be explained. This port is different in that it only uses AmigaOS 3 native functions for implementing the OS interface. The changes to the original version 3.5.4 are in writing a custom Makefile for Amiga, implementing the OS module for AmigaOS, adding some work-arounds for char to 64bit integer conversion bugs in the gcc-3.4.0 compiler, and making some other minor changes in several files. Mathias Parnaudeau provides the AmigaOS 4 binaries under directory build-ppc-amigaos and Ilkka Lehtoranta the MorphOS binaries under directory build-ppc-morphOS.

Limitations:

– No support for large files (LFS). To the best of my knowledge files under AmigaOS can be at most (2**31 – 1) bytes. This limitation arises from the LONG parameters in dos.library. Compile switch -DSQLITE_DISABLE_LFS (AOS4 and MorphOS introduce support for large files and implementation is in progress).

– No byte-range-locking. Tried several file systems (OFS, FFS) but they do not seem to support the LockRecord/UnLockRecord calls (The RAM: disk does support it and maybe SFS also has it implemented). Therefore, the default way of locking is by using (several) .lock files. Read os_amiga.c if you want to know more about this.

– Truncate file by replace. The dos.library/SetFileSize call is unsupported by most file systems (OFS, FFS) and therefore truncating a file to a target size doesn’t work. My workaround to this is to write a new file of the target size and replace the files. This does not always work though if the file is still opened by another process/handle. In this case truncating fails which means that the ‘VACUUM’ command of sqlite fails. Use a file system that supports SetFileSize (try SFS) if you need to rely on a proper functioning of the VACUUM command.

– 71 errors in 58122 tests remain. The errors can be categorized into the following classes which explain what is happening.

 

download

 

More news: Generation Amiga magazine