Query failed : MySQL client ran out of memory