diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2017-02-22 01:36:16 +0400 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2017-02-22 01:36:16 +0400 |
commit | cf673adee2d1e43d5cdeab91c7f1fc3e73fa3b37 (patch) | |
tree | e0a26286083fa45b809eedd640993c7e8e09c730 | |
parent | 978179a9d4933d3d8d2ac99028798e8a07095dd4 (diff) | |
download | mariadb-git-cf673adee2d1e43d5cdeab91c7f1fc3e73fa3b37.tar.gz |
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()
-rw-r--r-- | mysql-test/r/partition_myisam.result | 16 | ||||
-rw-r--r-- | mysql-test/t/partition_myisam.test | 21 | ||||
-rw-r--r-- | sql/ha_partition.cc | 1 |
3 files changed, 38 insertions, 0 deletions
diff --git a/mysql-test/r/partition_myisam.result b/mysql-test/r/partition_myisam.result index f9bf3a9fb07..d54e2a2856a 100644 --- a/mysql-test/r/partition_myisam.result +++ b/mysql-test/r/partition_myisam.result @@ -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; diff --git a/mysql-test/t/partition_myisam.test b/mysql-test/t/partition_myisam.test index 0fdd351c714..d6b1af1379e 100644 --- a/mysql-test/t/partition_myisam.test +++ b/mysql-test/t/partition_myisam.test @@ -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; diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 15fa7d12b16..43743544c25 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -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 { |