Let partition_data_id() and partition_data_time() return v_total_rows instead 0

Trivial fix.