diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-11-20 14:11:54 +0800 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-11-20 14:11:54 +0800 |
commit | 1c9240633792ecce562358d86cd8d2c18b94ae32 (patch) | |
tree | 0940c908260775decbabb3db78acfeef0fbe53ed /sql/ha_partition.cc | |
parent | 589a1235b64866c7bbe85da2a6f6bf19ee8282fe (diff) | |
parent | aa3d28ac34322940c2ac59f74e50b450d2cff531 (diff) | |
download | mariadb-git-1c9240633792ecce562358d86cd8d2c18b94ae32.tar.gz |
Merge 10.3 into 10.4
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r-- | sql/ha_partition.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 93c6bf1af5b..9ca6408007e 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -5267,7 +5267,10 @@ bool ha_partition::init_record_priority_queue() { size_t alloc_len; uint used_parts= bitmap_bits_set(&m_part_info->read_partitions); - DBUG_ASSERT(used_parts > 0); + + if (used_parts == 0) /* Do nothing since no records expected. */ + DBUG_RETURN(false); + /* Allocate record buffer for each used partition. */ m_priority_queue_rec_len= m_rec_length + PARTITION_BYTES_IN_POS; if (!m_using_extended_keys) |