Skip to content
Permalink
Browse files

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.
  • Loading branch information...
montywi committed Aug 30, 2018
1 parent e560f2f commit 42f09adab68f80fb99d6da0413cd4983ec13f5ab
Showing with 14 additions and 0 deletions.
  1. +4 −0 mysql-test/suite/maria/maria.result
  2. +10 −0 mysql-test/suite/maria/maria.test
@@ -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
#
@@ -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 #

0 comments on commit 42f09ad

Please sign in to comment.
You can’t perform that action at this time.