Add status_flags and number of warnings into result_set