diff options
author | Nikita Malyavin <nikitamalyavin@gmail.com> | 2020-10-22 01:32:44 +1000 |
---|---|---|
committer | Nikita Malyavin <nikitamalyavin@gmail.com> | 2020-11-02 14:11:43 +1000 |
commit | a79c6e369e8d07786395a04493f2142f41f7befc (patch) | |
tree | 061037ea112901441b2a7050a302d19536e43775 /mysql-test/suite/period | |
parent | d9e00770a31892588fe6293a70e81312eaf329a6 (diff) | |
download | mariadb-git-a79c6e369e8d07786395a04493f2142f41f7befc.tar.gz |
MDEV-22677 UPDATE crashes on partitioned HEAP table WITHOUT OVERLAPS
`ha_heap::clone` was creating a handler by share's handlerton, which is
partition handlerton.
handler's handlerton should be used instead.
Here in particular, HEAP handlerton will be used and it will create ha_heap
handler.
Diffstat (limited to 'mysql-test/suite/period')
-rw-r--r-- | mysql-test/suite/period/r/overlaps.result | 6 | ||||
-rw-r--r-- | mysql-test/suite/period/t/overlaps.test | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/suite/period/r/overlaps.result b/mysql-test/suite/period/r/overlaps.result index d7eb1a92b2b..efbbe7cf15b 100644 --- a/mysql-test/suite/period/r/overlaps.result +++ b/mysql-test/suite/period/r/overlaps.result @@ -344,4 +344,10 @@ insert into t1 values ('2024-12-21','2034-06-29',0), ('2024-12-21','2034-06-29',1); update t1 set b = 1; ERROR 23000: Duplicate entry '\x01-2034-06-29-2024-12-21' for key 'b' +# MDEV-22677 Server crashes in ha_partition::open upon update on +# partitioned HEAP table with WITHOUT OVERLAPS +create or replace table t (id int, s date, e date, period for p(s,e), +primary key(id, p without overlaps) +) engine=heap partition by hash(id); +update t set id = 1; drop table t, t1; diff --git a/mysql-test/suite/period/t/overlaps.test b/mysql-test/suite/period/t/overlaps.test index adf004ad405..6cd78769d4a 100644 --- a/mysql-test/suite/period/t/overlaps.test +++ b/mysql-test/suite/period/t/overlaps.test @@ -335,4 +335,12 @@ insert into t1 values ('2024-12-21','2034-06-29',0), update t1 set b = 1; +--echo # MDEV-22677 Server crashes in ha_partition::open upon update on +--echo # partitioned HEAP table with WITHOUT OVERLAPS + +create or replace table t (id int, s date, e date, period for p(s,e), + primary key(id, p without overlaps) + ) engine=heap partition by hash(id); +update t set id = 1; + drop table t, t1; |