db_options splits database functionality into modules that can be
selected in options.h to change the format used. Currently, only
Save/Lambda format (classic LambdaMOO databases) is
supported, but it is possible to write modules for other formats
such as an XML file or possibly a module for a SQL database.
db_options depends on unofficial functions that may be shared
by other patches. In order to reduce patch conflicts, I have them
seperated out to make it easy to add this sepeation to a server
that may be patched with other patches.
Dependencies:
Internal list_assoc -- May be provided with Martian's listutils
extentions or list_assoc.patch from this Patch page.
Stream deletion -- Adds stream_del_char and
stream_del_multiple functions. stream_deletion.patch
Internal dump_database_to -- Doesn't do anything, but it is
used to have an API for a possible future dump_database_to()
builtin function. dump_database_to-internal.patch
Internal strsub2 -- Moves the code for strsub into strsub2
so internal functions can use it. strsub2.patch
!!! read_activ bugfix -- This patch is included in db_options
and will conflict if it is merged seperately. Reverse-patch it if
your server uses it before attempting to merge db_options.
Due to the nature of this modification, you may experience
merging issues with the changelogs at the end of each file.
Deleting the comments or ignoring a failed merge of comments
should be fairly safe as long as you don't plan on using the
server for development (in which case such logs should be
preserved).
In addition, this patch moves database versions to the program
module (to be primarily a version indicator for the language).
This may conflict with patches adding new version levels, but it
should be simple to merge this change manually.
keywords.c is updated (via pgperf-2.7.2) by this patch. If you
have any issues merging keywords.c, the safest idea is to delete
it and use pgperf to recreate it from keywords.gperf
AFTER MERGING PATCH: After applying this patch, the files
db_file.c, db_io.c, db_io.h, and db_private.h are not used and
should be deleted. Also, the Makefile will probably try to recreate
keywords.c from keywords.gperf. Since most people won't have
pgperf, it will create an empty file and error during linking. To
prevent this and use the precreated keywords.c, run the
command `touch keywords.c' to update the modification date to
be more recent than keywords.gperf
Internal list_assoc function required by db_options
stream_del_char and stream_del_multiple functions required by db_options
Logged In: YES
user_id=25634
db_options patch is compressed since SF won't accept a 264KB file.
Internal dump_database_to patch required by db_options
Logged In: YES
user_id=25634
Small memory bug w/ the strsub2 patch... fixed
Internal strsub2 function required by db_options
Logged In: YES
user_id=25634
Updated AddingNewMOOTypes.txt to reflect seperation of
database IO.
Logged In: YES
user_id=25634
New patch to modify Makefile.in -- see description for details
Logged In: YES
user_id=25634
Noticed some bugs in the preprocessor code. Will fix when I get a
chance.
Logged In: YES
user_id=25634
Version 2 fixes mentioned bugs and should work properly.
This is available as two patches:
`db_options_1to2.patch' should be applied to a server using the
original db_options patch. It *should* be compatible with any
modifications made to the original patch neccesary to make it work
with a modified server.
`' should be applied to a server only after the prerequesites for the
original db_options patch. However, the read_activ bugfix is *not*
included in this patch and *should* be applied prior to patching.
NOTICE: Read Comment 2004-03-18 19:57; This is an upgrade patch!
Logged In: YES
user_id=25634
The first-time patch for the new version isn't done yet, as I'm working
on a script that attempts to patch it while preserving existing db_*
modifications (by moving code around).
Logged In: YES
user_id=25634
The smartpatch requires BASH, sed, and gperf (version=>3)
It should be a bit nicer with other prior modifications to the server
code, since it does a lot of code relocating (instead of just deleting and
adding unpatched code)
It takes a little over a minute to apply on my system (which is slow).
Alternatively, if you have a vanilla(+required patches) LambdaMOO
1.8.1, you can use the normal patch (bzip2'd since it's huge).
Upgrade from db_options version 2/3 to version 5
Primary db_options smartpatch; Run from the main source directory after required patches have been applied INCLUDING the read_activ bugfix (see comment 2004-03-18 19:57).
Logged In: YES
user_id=25634
A few minor fixes... Won't change the output binary at all, but it's been so
long since the last release without any other problems so I might as well
release it...
Bugfix required by db_options (v2+) for LambdaMOO 1.8.1 and earlier