Skip to content
Permalink
Browse files
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
  • Loading branch information
mariadb-SachinSetiya committed Mar 23, 2019
1 parent 0c56764 commit 901e3dd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
@@ -235,3 +235,7 @@ ERROR 23000: Duplicate entry '
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;
@@ -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;
@@ -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),

0 comments on commit 901e3dd

Please sign in to comment.