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.
This commit is contained in:
parent
ff34436a2e
commit
e43bc02e7b
7
mysql-test/suite/parts/r/update_and_cache.result
Normal file
7
mysql-test/suite/parts/r/update_and_cache.result
Normal file
@ -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;
|
12
mysql-test/suite/parts/t/update_and_cache.test
Normal file
12
mysql-test/suite/parts/t/update_and_cache.test
Normal file
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user