Skip to content

Commit

Permalink
MDEV-16682 Assertion `(buff[7] & 7) == HEAD_PAGE' failed
Browse files Browse the repository at this point in the history
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 42f09ad
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mysql-test/suite/maria/maria.result
Expand Up @@ -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
#
10 changes: 10 additions & 0 deletions mysql-test/suite/maria/maria.test
Expand Up @@ -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.