Commit e43bc02e authored by Eugene Kosov's avatar Eugene Kosov Committed by Vladislav Vaintroub

MDEV-16741 Assertion `m_extra_cache' failed in ha_partition::late_extra_cache

multi_delete sets TABLE::no_cache=1 and should set it to 0 when DELETE is done.
parent ff34436a
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;
--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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment