Fixed MySQL query files for MySQL 5