Fix test MySQL query