MySQL 4.1 compatibility

no joke ;-)

I exchanged calls to SCHEMA() for DATABASE() since SCHEMA() is defined as an alias for DATABASE() in MySQL >= 5.0 and is not present in earlier MySQL versions.