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()
This commit is contained in:
Alexey Botchkov 2017-02-22 01:36:16 +04:00
parent 978179a9d4
commit cf673adee2
3 changed files with 38 additions and 0 deletions

View file

@ -248,3 +248,19 @@ PARTITION p1 VALUES LESS THAN (100) MAX_ROWS=100,
PARTITION pMax VALUES LESS THAN MAXVALUE);
INSERT INTO t1 VALUES (1, "Partition p1, first row");
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;

View file

@ -180,3 +180,24 @@ PARTITION BY RANGE (a)
PARTITION pMax VALUES LESS THAN MAXVALUE);
INSERT INTO t1 VALUES (1, "Partition p1, first row");
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;

View file

@ -6667,6 +6667,7 @@ int ha_partition::reset(void)
DBUG_ENTER("ha_partition::reset");
if (m_part_info)
bitmap_set_all(&m_part_info->used_partitions);
m_extra_prepare_for_update= FALSE;
file= m_file;
do
{