Revised the MySQL implementation