 ------------------------------------------------------------------------------
         README for the OS/2 Warp Connect 'hack' of mSQL version 1.0.x
 ------------------------------------------------------------------------------

This is a hack of the UNIX (TM) or Linux version of the Minerva SQL server
and tools. For the original distribution contact ftp.bond.au and look there
for the sources. A WWW homepage can be found at "http://Hughes.com.au/".
Please keep the original terms of distribution and use in mind and do not
act against them. I only ported the original file to an OS/2 Warp Connect
platform and re-wrote the Makefiles. I did not change the files or bug-fixed
them.


WARNING!
--------

  As this is not a distribution of Minerva, but a hack of a third-party
  person, neither Minerva nor me will be responsible for any damage caused
  by using this program at your system. USE IT ON YOUR OWN RISK!


Configuration:
--------------

  * All configuration is to be done over the SRC\SITE.MM file. Look in
    there and make the changes in this file.

  * Additional configuration changes may be done in SRC\OS2_CLI\MAKEFILE
    if you have a non-IBM C (IBM C/C++ Set/2, VAC++) compiler.


Changes:
--------

  * 'site.mm' has been renamed to 'site.OS2' (multi-platform development)

  * The definition of ROOT and local machine is handled an other way as
    in the original version. The definitions goes like this:
      - the server takes the environment variables USER as root user
      - the server treats any access from the machine "localhost" as a
        local access attempt
      - any access from a client tool (msql, msqladm, relshow, msqldump)
        without specification of a host by '-h' will set the host infor-
        mation to "localhost" (same as calling the C API function
        "msqlConnect" with a NULL pointer)
      - any access from a client tool will use a user name equal the en-
        vironment variable USER

  * The access to directories has been changed. Up to 1.0.13c all paths
    were set absolutely. Since 1.0.14a the server msqld.exe the path detec-
    tion goes like this:
      - first the pre-defined path set in "site.OS2" (INSTPATH) will taken
      - if a environment variable MSQL_HOME does exist its values is taken
        instead of the pre-defined path
      --> if a sub-directory "MSQLDB" containing the database files could
          be found, no more path checking is done, else:
            - the server gets the path to its binary file (msqld.exe)
            - first, at that path is checked whether "MSQLDB" exists or not
            - if not, the same check is done a directory hierarchie higher
              than the server executable is located (i.e. \aaa\bbb\msqld.exe,
              first \aaa\bbb\msqldb\, second \aaa\msqldb\)
            - if this again fails the server terminates with an error message

  * Another changed definition is the one of the default editor. The ori-
    ginal version sets this info to 'vi', but the OS/2 port uses the
    system editor 'e'.

  * mSQL is somehow a good example of "why there is a command 'nice' on
    Unix" - the server in original version took over nearly 100% of the
    cpu! I fixed this by additional code, only available when compiling
    with option "/DOS2" (OS/2 code):
      - the variables 'lowSock' and 'highSock' limit the range where
        msqld scans for action requests by the clients
      - when there is no connection (numCons == 0), no scan is performed
        at all and msqld idles ...
      - on a connection established there is no idling and cpu load goes
        up to 100%
      - after closing the last connection, msqld will idle again ( :-) )

  * The following functions have not been implemented (dummies):
      - alarm                (not implemented)
      - flock                (dummy)
      - ualarm               (dummy)

  * The following signals have been changed (since not available under
    OS/2):
      - SIGALRM              -> SIGUSR1
      - SIGPIPE              -> SIGABRT

  * The following constants have been changed (naming conflict):
      - old name: QUERY
        new name: DB_QUERY
      - MAX_SOCK_NUM, old value:  120
                      new value: 2048

  * The following functions have been adapted to OS/2 pedants:
      - select               -> bsdselect (msqld.c)

  * The following files has been changed in name (8.3-convention):
      - *.test               -> *.tst
      - cachtest             -> c_test.sh
      - killer               -> killer.sh
      - msqladmin.*          -> msqladm.*
      - portability.h        -> portable.h
      - regexpr.c            -> regexp.c
      - rtest                -> rtest.sh

  * All database files are open in binary mode (O_BINARY), all others in
    text mode.


Compilation:
------------

My software is: * OS/2 Warp Connect 3.0 with the C libraries for TCP/IP
                  (see the file \CID\IMG\LAPS\TOOLKIT\MPTNTK.ZIP)
                * IBM C/C++ Firststep Tools for OS/2
                * GNU Bison V 1.22 (adapted for IBM C/C++ Set/2), if you
                  want to change 'SRC\MSQL\msql_yac.y'.
I added a file 'src\msql\alloca.obj' which contains the 'alloca' function
needed by the server. Normally, this file is distributed along with the GNU
bison or GNU flex (I don't know where it come with). But in order to give
the people not having a patched bison or flex I set the makefiles for not
necassarily using bison. A copy of 'alloca.obj' is put in the library
directory, too.


Bugs:
-----

  not known ... so far ;-)


Author of the 'hack':
---------------------

This small note and the 'hack' was written by
Dirk Ohme, eMail: Dirk.Ohme@transtec.de
                  ohme@rzsco.fh-albsig.de
                  Dirk_Ohme@p9.f2001.n246.z2.fidonet.org (2:246/2001.9)

 ------------------------------------------------------------------------------
                     M”ssingen (Germany), May. 22, 1996
 ------------------------------------------------------------------------------
