Skip to content
Permalink
Browse files
MDEV-16741 Assertion `m_extra_cache' failed in ha_partition::late_ext…
…ra_cache

multi_delete sets TABLE::no_cache=1 and should set it to 0 when DELETE is done.
  • Loading branch information
kevgs authored and vaintroub committed Sep 10, 2018
1 parent ff34436 commit e43bc02
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
@@ -0,0 +1,7 @@
CREATE TABLE t1 (pk INT PRIMARY KEY, a INT);
INSERT INTO t1 VALUES (1,10),(2,20);
CREATE TABLE t2 (b INT) PARTITION BY KEY (b) PARTITIONS 2;
INSERT INTO t2 VALUES (1),(2);
DELETE t2 FROM t2 WHERE b BETWEEN 5 AND 9;
UPDATE t2 JOIN t1 SET b = 5;
DROP TABLE t1, t2;
@@ -0,0 +1,12 @@
--source include/have_partition.inc

CREATE TABLE t1 (pk INT PRIMARY KEY, a INT);
INSERT INTO t1 VALUES (1,10),(2,20);

CREATE TABLE t2 (b INT) PARTITION BY KEY (b) PARTITIONS 2;
INSERT INTO t2 VALUES (1),(2);

DELETE t2 FROM t2 WHERE b BETWEEN 5 AND 9;
UPDATE t2 JOIN t1 SET b = 5;

DROP TABLE t1, t2;
@@ -744,6 +744,7 @@ multi_delete::~multi_delete()
{
TABLE *table= table_being_deleted->table;
table->no_keyread=0;
table->no_cache= 0;
}

for (uint counter= 0; counter < num_of_tables; counter++)
@@ -1868,7 +1868,7 @@ multi_update::~multi_update()
TABLE_LIST *table;
for (table= update_tables ; table; table= table->next_local)
{
table->table->no_keyread= table->table->no_cache= 0;
table->table->no_keyread= 0;
if (ignore)
table->table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
}

0 comments on commit e43bc02

Please sign in to comment.