Copyright (C) 2000-2012 |
GNU Info (mysql.info)Using mSQL toolsHow to Convert `mSQL' Tools for MySQL ..................................... According to our experience, it would just take a few hours 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: 1. Run the shell script `msql2mysql' on the source. This requires the `replace' program, which is distributed with MySQL. 2. Compile. 3. Fix all compiler errors. Differences between the `mSQL' C API and the MySQL C API are: * MySQL uses a `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. * MySQL returns an error number and a text error message for all errors. `mSQL' returns only a text error message. * Some incompatibilities exist as a result of MySQL supporting multiple connections to the server from the same process. automatically generated by info2www version 1.2.2.9 |