Patch mysql fetch method