Ever since we moved from MySql to Postgres (mostly
because Postgres is the de-facto GIS database), we had
people request a MySQL version. For this to remain
possible, we didn't use most of postgres's advanced
features. For the same reason, large efforts were made
to stick strictly to SQL99 features. The database
abstraction is there. Not much needs to be done
to make it work.
Unfortunately, so far all this work didn't pay off.
People complain, no one uses it and we are stuck with
the lowest common denominator. If someone actually
steps forward to maintain MySQL support, I'll
personally help him fix all the small problems that
will crop up (by now dozens of queries are untested
with mysql). If no one steps up in the near future,
I'll propose that we completely give up on MySQL to be
able to use Postgres more fully. To summarise, what
must be done to make MySQL fully supported again:
-Write a script to convert the schema to mysql
automatically using regular expressions. Currently the
initial schema is auto-generated from a working install
to avoid forgeting any schema changes or typos (this is
what update_sql_for_cvs does). It strips off as many
postgres specific attributes as possible. What has to
be done is mostly adding InnoDB table types so foreign
keys will work, and replace a few types MySQL does not
directly support.
-Correct the different queries, making sure that they
remain SQL99 compliant. When that is truly impossible,
use the constants in the config file to send a
different query to mysql.
-Do the same thing for the database schema update
script (schema_validate.php).