Menu

#25 Database Format Selection in options.h

open
nobody
None
5
2004-01-31
2004-01-31
Luke-Jr
No

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

Discussion

  • Luke-Jr

    Luke-Jr - 2004-01-31

    Internal list_assoc function required by db_options

     
  • Luke-Jr

    Luke-Jr - 2004-01-31

    stream_del_char and stream_del_multiple functions required by db_options

     
  • Luke-Jr

    Luke-Jr - 2004-01-31

    Logged In: YES
    user_id=25634

    db_options patch is compressed since SF won't accept a 264KB file.

     
  • Luke-Jr

    Luke-Jr - 2004-01-31

    Internal dump_database_to patch required by db_options

     
  • Luke-Jr

    Luke-Jr - 2004-01-31

    Logged In: YES
    user_id=25634

    Small memory bug w/ the strsub2 patch... fixed

     
  • Luke-Jr

    Luke-Jr - 2004-01-31

    Internal strsub2 function required by db_options

     
  • Luke-Jr

    Luke-Jr - 2004-02-08

    Logged In: YES
    user_id=25634

    Updated AddingNewMOOTypes.txt to reflect seperation of
    database IO.

     
  • Luke-Jr

    Luke-Jr - 2004-02-25

    Logged In: YES
    user_id=25634

    New patch to modify Makefile.in -- see description for details

     
  • Luke-Jr

    Luke-Jr - 2004-03-16

    Logged In: YES
    user_id=25634

    Noticed some bugs in the preprocessor code. Will fix when I get a
    chance.

     
  • Luke-Jr

    Luke-Jr - 2004-03-19

    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.

     
  • Luke-Jr

    Luke-Jr - 2004-03-19

    NOTICE: Read Comment 2004-03-18 19:57; This is an upgrade patch!

     
  • Luke-Jr

    Luke-Jr - 2004-03-20

    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).

     
  • Luke-Jr

    Luke-Jr - 2004-03-20

    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).

     
  • Luke-Jr

    Luke-Jr - 2004-07-25

    Upgrade from db_options version 2/3 to version 5

     
  • Luke-Jr

    Luke-Jr - 2004-07-25

    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).

     
  • Luke-Jr

    Luke-Jr - 2004-07-25

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

     
  • Luke-Jr

    Luke-Jr - 2004-07-25

    Bugfix required by db_options (v2+) for LambdaMOO 1.8.1 and earlier

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.