summaryrefslogtreecommitdiff
path: root/mysql-test/main
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2018-10-20 12:49:46 +0300
committerSergei Golubchik <serg@mariadb.org>2018-11-13 10:30:27 +0100
commit50bc55d462047281a4f74081a5325b64918494f1 (patch)
treef9baadb3b36abfef630b5b5868e71cbd043eee7a /mysql-test/main
parent6db773a5420fc7eedd6c02989967abbca3212143 (diff)
downloadmariadb-git-50bc55d462047281a4f74081a5325b64918494f1.tar.gz
MDEV-16241 Assertion `inited==RND' failed in handler::ha_rnd_end()
Discrepancy in open indexes due to overwritten `read_partitions` upon `ha_open()` in `ha_partition::clone()`. [Fixes tempesta-tech/mariadb#551]
Diffstat (limited to 'mysql-test/main')
-rw-r--r--mysql-test/main/partition_innodb.result11
-rw-r--r--mysql-test/main/partition_innodb.test10
2 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/main/partition_innodb.result b/mysql-test/main/partition_innodb.result
index d27abc07984..c63cbc4601d 100644
--- a/mysql-test/main/partition_innodb.result
+++ b/mysql-test/main/partition_innodb.result
@@ -925,3 +925,14 @@ test_jfg test_jfg11
test_jfg test_jfg12#P#p1000
test_jfg test_jfg12#P#pmax
DROP DATABASE test_jfg;
+#
+# MDEV-16241 Assertion `inited==RND' failed in handler::ha_rnd_end()
+#
+CREATE TABLE t1 (pk INT PRIMARY KEY, x INT, y INT, z INT, KEY (x), KEY (y, z))
+WITH SYSTEM VERSIONING
+PARTITION BY SYSTEM_TIME (PARTITION p1 HISTORY, PARTITION pn CURRENT);
+INSERT INTO t1 VALUES (1, 7, 8, 9), (2, NULL, NULL, NULL), (3, NULL, NULL, NULL);
+SELECT COUNT(*) FROM t1 WHERE x IS NULL AND y IS NULL AND z IS NULL;
+COUNT(*)
+2
+DROP TABLE t1;
diff --git a/mysql-test/main/partition_innodb.test b/mysql-test/main/partition_innodb.test
index 49430414913..d5b28430af3 100644
--- a/mysql-test/main/partition_innodb.test
+++ b/mysql-test/main/partition_innodb.test
@@ -1015,3 +1015,13 @@ SELECT database_name, table_name FROM mysql.innodb_table_stats WHERE
database_name = 'test_jfg';
DROP DATABASE test_jfg;
+
+--echo #
+--echo # MDEV-16241 Assertion `inited==RND' failed in handler::ha_rnd_end()
+--echo #
+CREATE TABLE t1 (pk INT PRIMARY KEY, x INT, y INT, z INT, KEY (x), KEY (y, z))
+WITH SYSTEM VERSIONING
+PARTITION BY SYSTEM_TIME (PARTITION p1 HISTORY, PARTITION pn CURRENT);
+INSERT INTO t1 VALUES (1, 7, 8, 9), (2, NULL, NULL, NULL), (3, NULL, NULL, NULL);
+SELECT COUNT(*) FROM t1 WHERE x IS NULL AND y IS NULL AND z IS NULL;
+DROP TABLE t1;