summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2017-02-22 01:36:16 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2017-02-22 01:36:16 +0400
commitcf673adee2d1e43d5cdeab91c7f1fc3e73fa3b37 (patch)
treee0a26286083fa45b809eedd640993c7e8e09c730 /mysql-test
parent978179a9d4933d3d8d2ac99028798e8a07095dd4 (diff)
downloadmariadb-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()
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/partition_myisam.result16
-rw-r--r--mysql-test/t/partition_myisam.test21
2 files changed, 37 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;