First, Run the shell script msql2mysql over your source. This needs the binary program replace, which is distributed with mysql. This will translate mSQL function names to mysql. It will NOT fix parameter types or change the number of parameters in mysql functions that need additional parameters.
How does the mysql client/server protocol differ from mSQL?
There are significant differences. Amongst them are...
- CREATE TABLE: mysql: Has the following field option types: UNSIGNED, ZEROFILL, Has DEFAULT on not null fields. mSQL: - To create indexes: mysql: All indexes have to be given at CREATE TABLE. mSQL: Indexes must be created by a separate CREATE INDEX clause. (Does mSQL use a new key file for each index?) Indexes may be dropped with DROP INDEX - To get a unique identifier at insert: mysql: Use 'auto_increment' as a column type specifier. The used index may be retrieved after update by the API function mysql_insert_id(). mSQL: Create a SEQUENCE on a table and use the __seq function to get a unique index. - Group functions: mysql: count(), avg(), min(), max() and sum(). min() and max() may take string arguments. count(*) is optimized to return directly if no other column is used. mSQL: none - searching case-independent: mysql: LIKE is always case independent. If possible mysql uses indexes if the like argument doesn't start with a wild-card. mSQL: Use CLIKE. - searching with regular expressions. mysql: Use REGEXP or RLIKE mSQL: Use RLIKE. - What is the difference in the WHERE statement: mysql has braces, Soon it will have full function support in the WHERE. - Qualifying column names: mysql: If a column name is unique you don't have to use the full qualifier. mSQL: When using more than one table in a select you must use full table qualifiers. - Aliasing mysql: Has table and column aliasing. mSQL: Has table aliasing. - Insert/update with calculations. mysql: Full calculation support. In an insert you may use values of preceding fields. mSQL: Only insert update with constants. - Which formulas may be used in the select statement. mysql: To many to print here. Check the manual. mSQL: none - HAVING mysql: Supported, but can only use calculation on the selected fields. To select on a calculated value one must use a column alias. Ex: SELECT COUNT(*) AS id_count,id FROM groups GROUP BY id HAVING id_count > 10 mSQL: Not supported