MDEV-22185 Failing assertion: node->pcur->rel_pos == BTR_PCUR_ON or ER_KEY_NOT_FOUND or Assertion `inited==NONE' failed in handler::ha_index_init
long unique checks should be done for a partitioned table as a whole, not for individual partitions. Followup for f3f31eaa8e8 that extends it to UPDATE
This commit is contained in:
parent
67aaf51cf9
commit
18502f99eb
@ -337,3 +337,7 @@ a b
|
|||||||
1 foo
|
1 foo
|
||||||
3 bar
|
3 bar
|
||||||
drop table if exists t1, t2;
|
drop table if exists t1, t2;
|
||||||
|
create table t1 (a int, b int, unique (b) using hash) engine=innodb partition by key (a) partitions 2;
|
||||||
|
insert into t1 values (1,10),(2,20);
|
||||||
|
update t1 set b = 30 limit 1;
|
||||||
|
drop table t1;
|
||||||
|
@ -402,3 +402,11 @@ create or replace table t2 (a int, b blob, unique(b)) replace as select * from t
|
|||||||
select * from t2;
|
select * from t2;
|
||||||
|
|
||||||
drop table if exists t1, t2;
|
drop table if exists t1, t2;
|
||||||
|
|
||||||
|
#
|
||||||
|
# MDEV-22185 Failing assertion: node->pcur->rel_pos == BTR_PCUR_ON or ER_KEY_NOT_FOUND or Assertion `inited==NONE' failed in handler::ha_index_init
|
||||||
|
#
|
||||||
|
create table t1 (a int, b int, unique (b) using hash) engine=innodb partition by key (a) partitions 2;
|
||||||
|
insert into t1 values (1,10),(2,20);
|
||||||
|
update t1 set b = 30 limit 1;
|
||||||
|
drop table t1;
|
||||||
|
@ -7009,7 +7009,7 @@ int handler::ha_update_row(const uchar *old_data, const uchar *new_data)
|
|||||||
MYSQL_UPDATE_ROW_START(table_share->db.str, table_share->table_name.str);
|
MYSQL_UPDATE_ROW_START(table_share->db.str, table_share->table_name.str);
|
||||||
mark_trx_read_write();
|
mark_trx_read_write();
|
||||||
increment_statistics(&SSV::ha_update_count);
|
increment_statistics(&SSV::ha_update_count);
|
||||||
if (table->s->long_unique_table &&
|
if (table->s->long_unique_table && this == table->file &&
|
||||||
(error= check_duplicate_long_entries_update(new_data)))
|
(error= check_duplicate_long_entries_update(new_data)))
|
||||||
{
|
{
|
||||||
return error;
|
return error;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user