Commit 42f09ada authored by Monty's avatar Monty

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.
parent e560f2f3
......@@ -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 #
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment