select id from catalogs where name='main' order by id desc limit 1MySQL server has gone away