[Commits] f6166101e0f: MDEV-18904 Assertion `m_part_spec.start_part >= m_part_spec.end_part' failed in ha_partition::index_read_idx_map
revision-id: f6166101e0fa3dc354baee7c560ee473cdb59491 (mariadb-10.4.3-86-gf6166101e0f) parent(s): 8076c594ce206222d1daf70d4193095061dd5d2f author: sachinsetia1001@gmail.com committer: Sachin timestamp: 2019-03-19 16:43:43 +0530 message: MDEV-18904 Assertion `m_part_spec.start_part >= m_part_spec.end_part' failed in ha_partition::index_read_idx_map We do not support long unique index in partition. --- mysql-test/main/long_unique_bugs.result | 2 ++ mysql-test/main/long_unique_bugs.test | 7 +++++++ sql/share/errmsg-utf8.txt | 2 ++ sql/sql_partition.cc | 8 ++++++++ 4 files changed, 19 insertions(+) diff --git a/mysql-test/main/long_unique_bugs.result b/mysql-test/main/long_unique_bugs.result index dec5153ad85..5f15171a4f5 100644 --- a/mysql-test/main/long_unique_bugs.result +++ b/mysql-test/main/long_unique_bugs.result @@ -202,3 +202,5 @@ ERROR 23000: Duplicate entry ' insert into t1 values ('ббб'); ERROR 23000: Duplicate entry '�' for key 'a' drop table t1; +CREATE TABLE t1 (a int , unique(a) using hash) PARTITION BY HASH (a) PARTITIONS 2; +ERROR HY000: Long unique index is not supported in partition diff --git a/mysql-test/main/long_unique_bugs.test b/mysql-test/main/long_unique_bugs.test index db1cd0fbae4..674e844a374 100644 --- a/mysql-test/main/long_unique_bugs.test +++ b/mysql-test/main/long_unique_bugs.test @@ -1,4 +1,5 @@ --source include/have_innodb.inc +--source include/have_partition.inc # # MDEV-18707 Server crash in my_hash_sort_bin, ASAN heap-use-after-free in Field::is_null, server hang, corrupted double-linked list @@ -230,3 +231,9 @@ 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 +# +--error ER_LONG_UNIQUE_IN_PART_FUNC_ERROR +CREATE TABLE t1 (a int , unique(a) using hash) PARTITION BY HASH (a) PARTITIONS 2; diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt index cc2ac272458..43a71e76df5 100644 --- a/sql/share/errmsg-utf8.txt +++ b/sql/share/errmsg-utf8.txt @@ -7954,3 +7954,5 @@ ER_PERIOD_CONSTRAINT_DROP eng "Can't DROP CONSTRAINT `%s`. Use DROP PERIOD `%s` for this" ER_TOO_LONG_KEYPART 42000 S1009 eng "Specified key part was too long; max key part length is %u bytes" +ER_LONG_UNIQUE_IN_PART_FUNC_ERROR + eng "Long unique index is not supported in partition" diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index 6b530a95efb..a2aeedc1fdc 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -369,6 +369,14 @@ static bool set_up_field_array(THD *thd, TABLE *table, ptr= table->field; while ((field= *(ptr++))) { + /* + We currently don't support long unique hash index in partition + */ + if (unlikely(field->flags & LONG_UNIQUE_HASH_FIELD)) + { + my_error(ER_LONG_UNIQUE_IN_PART_FUNC_ERROR, MYF(0)); + result= TRUE; + } if (field->flags & GET_FIXED_FIELDS_FLAG) { field->flags&= ~GET_FIXED_FIELDS_FLAG;
participants (1)
-
sachin.setiya@mariadb.com