diff options
author | Sachin <sachin.setiya@mariadb.com> | 2019-03-22 14:54:24 +0530 |
---|---|---|
committer | Sachin <sachin.setiya@mariadb.com> | 2019-03-23 18:26:50 +0530 |
commit | 901e3ddf796376f3ac1022e14b2826241d76380f (patch) | |
tree | ae28602e55f6a4f0c13c8feb122490c5b5432a22 | |
parent | 0c567648a481a8e1ff3223d955f2ef6e4603291e (diff) | |
download | mariadb-git-901e3ddf796376f3ac1022e14b2826241d76380f.tar.gz |
MDEV-18904 Assertion `m_part_spec.start_part >= m_part_spec.end_part' failed in ha_partition::index_read_idx_map
Remove the DBUG_ASSERT
-rw-r--r-- | mysql-test/main/long_unique_bugs.result | 4 | ||||
-rw-r--r-- | mysql-test/main/long_unique_bugs.test | 9 | ||||
-rw-r--r-- | sql/ha_partition.cc | 6 |
3 files changed, 13 insertions, 6 deletions
diff --git a/mysql-test/main/long_unique_bugs.result b/mysql-test/main/long_unique_bugs.result index d2fc5d7cfff..87a57fb4614 100644 --- a/mysql-test/main/long_unique_bugs.result +++ b/mysql-test/main/long_unique_bugs.result @@ -235,3 +235,7 @@ ERROR 23000: Duplicate entry 'Ð' for key 'a' insert into t1 values ('ббб'); ERROR 23000: Duplicate entry 'Ð' for key 'a' drop table t1; +CREATE TABLE t1 (a INT, UNIQUE USING HASH (a)) PARTITION BY HASH (a) PARTITIONS 2; +INSERT INTO t1 VALUES (2); +REPLACE INTO t1 VALUES (2); +DROP TABLE t1; diff --git a/mysql-test/main/long_unique_bugs.test b/mysql-test/main/long_unique_bugs.test index f94c3ba39f8..ed0daee426f 100644 --- a/mysql-test/main/long_unique_bugs.test +++ b/mysql-test/main/long_unique_bugs.test @@ -265,3 +265,12 @@ insert into t1 values ('бб'); --error ER_DUP_ENTRY insert into t1 values ('ббб'); drop table t1; + +# +# MDEV-18904 Assertion `m_part_spec.start_part >= m_part_spec.end_part' failed in ha_partition::index_read_idx_map +# +--source include/have_partition.inc +CREATE TABLE t1 (a INT, UNIQUE USING HASH (a)) PARTITION BY HASH (a) PARTITIONS 2; +INSERT INTO t1 VALUES (2); +REPLACE INTO t1 VALUES (2); +DROP TABLE t1; diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 1fae1eaaca3..6d12a0aa55a 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -5759,12 +5759,6 @@ int ha_partition::index_read_idx_map(uchar *buf, uint index, get_partition_set(table, buf, index, &m_start_key, &m_part_spec); - /* - We have either found exactly 1 partition - (in which case start_part == end_part) - or no matching partitions (start_part > end_part) - */ - DBUG_ASSERT(m_part_spec.start_part >= m_part_spec.end_part); /* The start part is must be marked as used. */ DBUG_ASSERT(m_part_spec.start_part > m_part_spec.end_part || bitmap_is_set(&(m_part_info->read_partitions), |