summaryrefslogtreecommitdiff
path: root/mysql-test/suite
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2018-08-30 13:45:27 +0300
committerMonty <monty@mariadb.org>2018-08-30 13:45:27 +0300
commit42f09adab68f80fb99d6da0413cd4983ec13f5ab (patch)
treeafa002216fc73fd45788aa3a035f4f4d9a571af9 /mysql-test/suite
parente560f2f342aeb2d72937e9c6f5a4fcbfecc1c35e (diff)
downloadmariadb-git-42f09adab68f80fb99d6da0413cd4983ec13f5ab.tar.gz
MDEV-16682 Assertion `(buff[7] & 7) == HEAD_PAGE' failed
Problem was that SQL level tried to read a record with rnd_pos() that was already deleted by the same statement. In the case where the page for the record had been deleted, this caused an assert. Fixed by extending the assert to also handle empty pages and return HA_ERR_RECORD_DELETED for reads to deleted pages.
Diffstat (limited to 'mysql-test/suite')
-rw-r--r--mysql-test/suite/maria/maria.result4
-rw-r--r--mysql-test/suite/maria/maria.test10
2 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/suite/maria/maria.result b/mysql-test/suite/maria/maria.result
index 2aca47538cb..1cf48b0628d 100644
--- a/mysql-test/suite/maria/maria.result
+++ b/mysql-test/suite/maria/maria.result
@@ -2723,6 +2723,10 @@ id name
-1 dog
2 cat
DROP TABLE t1;
+CREATE TABLE t1 (pk int, i2 int) ENGINE=Aria;
+INSERT INTO t1 VALUES (1,2), (2,3),(3,4);
+DELETE FROM tt.*, t1.* USING t1 AS tt LEFT JOIN t1 ON (tt.i2 = t1.pk);
+DROP TABLE t1;
#
# End of 5.5 tests
#
diff --git a/mysql-test/suite/maria/maria.test b/mysql-test/suite/maria/maria.test
index ab8e72dc321..954bd15744e 100644
--- a/mysql-test/suite/maria/maria.test
+++ b/mysql-test/suite/maria/maria.test
@@ -2012,6 +2012,16 @@ INSERT INTO t1 (name) VALUES ('cat');
SELECT * FROM t1;
DROP TABLE t1;
+#
+# MDEV-16682
+# Assertion `(buff[7] & 7) == HEAD_PAGE' failed.
+#
+
+CREATE TABLE t1 (pk int, i2 int) ENGINE=Aria;
+INSERT INTO t1 VALUES (1,2), (2,3),(3,4);
+DELETE FROM tt.*, t1.* USING t1 AS tt LEFT JOIN t1 ON (tt.i2 = t1.pk);
+DROP TABLE t1;
+
--echo #
--echo # End of 5.5 tests
--echo #