add SQL_CALC_FOUND_ROWS support