mSQL Tools for MySQL
According to our experience, it doesn't take long to convert tools
such as msql-tcl and msqljava that use the
mSQL C API so that they work with the MySQL C API.
The conversion procedure is:
msql2mysql on the source. This requires
the replace program, which is distributed with MySQL Server.
Differences between the mSQL C API and the MySQL C API are:
MYSQL structure as a connection type (mSQL
uses an int).
mysql_connect() takes a pointer to a MYSQL structure as a
parameter. It is easy to define one globally or to use malloc()
to get one. mysql_connect() also takes two parameters for
specifying the user and password. You may set these to
NULL, NULL for default use.
mysql_error() takes the MYSQL structure as a parameter.
Just add the parameter to your old msql_error() code if you are
porting old code.
mSQL returns only a text error message.