Commit cf673ade authored by Alexey Botchkov's avatar Alexey Botchkov

MDEV-10418 Assertion `m_extra_cache' failed in

ha_partition::late_extra_cache(uint).

        m_extra_prepare_for_update should be cleaned in
        ha_partition::reset()
parent 978179a9
...@@ -248,3 +248,19 @@ PARTITION p1 VALUES LESS THAN (100) MAX_ROWS=100, ...@@ -248,3 +248,19 @@ PARTITION p1 VALUES LESS THAN (100) MAX_ROWS=100,
PARTITION pMax VALUES LESS THAN MAXVALUE); PARTITION pMax VALUES LESS THAN MAXVALUE);
INSERT INTO t1 VALUES (1, "Partition p1, first row"); INSERT INTO t1 VALUES (1, "Partition p1, first row");
DROP TABLE t1; DROP TABLE t1;
#
# MDEV-10418 Assertion `m_extra_cache' failed
# in ha_partition::late_extra_cache(uint)
#
CREATE TABLE t1 (f1 INT) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (f2 INT) ENGINE=MyISAM PARTITION BY RANGE(f2) (PARTITION pmax VALUES LESS THAN MAXVALUE);
INSERT INTO t2 VALUES (8);
CREATE ALGORITHM = MERGE VIEW v AS SELECT f2 FROM t2, t1;
UPDATE v SET f2 = 1;
SELECT * FROM t2;
f2
1
DROP VIEW v;
DROP TABLE t2;
DROP TABLE t1;
...@@ -180,3 +180,24 @@ PARTITION BY RANGE (a) ...@@ -180,3 +180,24 @@ PARTITION BY RANGE (a)
PARTITION pMax VALUES LESS THAN MAXVALUE); PARTITION pMax VALUES LESS THAN MAXVALUE);
INSERT INTO t1 VALUES (1, "Partition p1, first row"); INSERT INTO t1 VALUES (1, "Partition p1, first row");
DROP TABLE t1; DROP TABLE t1;
--echo #
--echo # MDEV-10418 Assertion `m_extra_cache' failed
--echo # in ha_partition::late_extra_cache(uint)
--echo #
CREATE TABLE t1 (f1 INT) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (f2 INT) ENGINE=MyISAM PARTITION BY RANGE(f2) (PARTITION pmax VALUES LESS THAN MAXVALUE);
INSERT INTO t2 VALUES (8);
CREATE ALGORITHM = MERGE VIEW v AS SELECT f2 FROM t2, t1;
UPDATE v SET f2 = 1;
SELECT * FROM t2;
DROP VIEW v;
DROP TABLE t2;
DROP TABLE t1;
...@@ -6667,6 +6667,7 @@ int ha_partition::reset(void) ...@@ -6667,6 +6667,7 @@ int ha_partition::reset(void)
DBUG_ENTER("ha_partition::reset"); DBUG_ENTER("ha_partition::reset");
if (m_part_info) if (m_part_info)
bitmap_set_all(&m_part_info->used_partitions); bitmap_set_all(&m_part_info->used_partitions);
m_extra_prepare_for_update= FALSE;
file= m_file; file= m_file;
do do
{ {
......
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