Added test and new functions for MySQL