diff options
author | Yuchen Pei <yuchen.pei@mariadb.com> | 2022-12-15 10:42:07 +1100 |
---|---|---|
committer | Yuchen Pei <yuchen.pei@mariadb.com> | 2022-12-15 10:42:07 +1100 |
commit | c758eda7d43d1a83ca975796a8893424104f6443 (patch) | |
tree | 013393fefe94212300b235f225e82083c4898f5a /sql/ha_partition.cc | |
parent | 87eccd78a791ff3acfa00914254f0bf858a14aa4 (diff) | |
download | mariadb-git-bb-10.4-MDEV-21007.tar.gz |
MDEV-21007 Do not assert auto_increment_value unless all parts openbb-10.4-MDEV-21007
Commit 6dce6aecebe6ef78a14cb5c5c5daa8a355551e40 breaks out of a loop
in ha_partition::info when some partitions aren't opened, in which
case auto_increment_value assertion will fail. This commit patches
that hole.
Signed-off-by: Yuchen Pei <yuchen.pei@mariadb.com>
Reviewed-by: Alexey Botchkov <holyfoot@mariadb.com>
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r-- | sql/ha_partition.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 06ae329ee3a..4b153ba1135 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -8413,7 +8413,9 @@ int ha_partition::info(uint flag) file->stats.auto_increment_value); } while (*(++file_array)); - DBUG_ASSERT(auto_increment_value); + if (all_parts_opened) { + DBUG_ASSERT(auto_increment_value); + } stats.auto_increment_value= auto_increment_value; if (all_parts_opened && auto_inc_is_first_in_idx) { |