Prefer RAII class for MYSQL_RES* to avoid manually freeing the result