diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2020-09-02 14:36:14 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2020-09-02 14:36:14 +0200 |
commit | 5edf3e03887142f83044ee9fcc8fcf65386c43c7 (patch) | |
tree | 179e1f56be501aeb8ed2a975ee49efad5e5144dd /sql/ha_partition.cc | |
parent | 32a29afea777d8bbfcea7a2b5e6e5ee674013cb5 (diff) | |
parent | c58e184b14ccdf0b0eaeeeb7947e23b8b5fff7a7 (diff) | |
download | mariadb-git-5edf3e03887142f83044ee9fcc8fcf65386c43c7.tar.gz |
Merge branch '10.5' into 10.6
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r-- | sql/ha_partition.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 0a378bde0bd..921b461f15e 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -9683,7 +9683,6 @@ double ha_partition::read_time(uint index, uint ranges, ha_rows rows) ha_rows ha_partition::records() { - int error; ha_rows tot_rows= 0; uint i; DBUG_ENTER("ha_partition::records"); @@ -9692,9 +9691,10 @@ ha_rows ha_partition::records() i < m_tot_parts; i= bitmap_get_next_set(&m_part_info->read_partitions, i)) { - ha_rows rows; - if (unlikely((error= m_file[i]->pre_records()) || - (rows= m_file[i]->records()) == HA_POS_ERROR)) + if (unlikely(m_file[i]->pre_records())) + DBUG_RETURN(HA_POS_ERROR); + const ha_rows rows= m_file[i]->records(); + if (unlikely(rows == HA_POS_ERROR)) DBUG_RETURN(HA_POS_ERROR); tot_rows+= rows; } |