1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-12720 recovery fails with "Generic error" for ROW_FORMAT=compressed

This bug was introduced in the fix of MDEV-12123, which invoked
page_zip_write_header() in the wrong way.

page_zip_write_header(): Assert that the length is not zero, to
be compatible with page_zip_parse_write_header().

btr_root_raise_and_insert(): Update the uncompressed page and then
invoke page_zip_write_header() with the correct length.
This commit is contained in:
Marko Mäkelä
2017-05-09 11:41:35 +03:00
parent d0ce870466
commit b3939a35aa
4 changed files with 48 additions and 8 deletions

View File

@ -0,0 +1,24 @@
--source include/have_innodb.inc
--source include/have_innodb_max_16k.inc
--source include/not_embedded.inc
--echo #
--echo # MDEV-12720 recovery fails with "Generic error"
--echo # for ROW_FORMAT=compressed
--echo #
CREATE TABLE a(i INT PRIMARY KEY AUTO_INCREMENT, s VARCHAR(255)) ENGINE=InnoDB
ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
BEGIN;
insert into a(i) select null;
insert into a select null, uuid() from a a, a b, a c;
insert into a select null, uuid() from a a, a b, a c;
insert into a select null, uuid() from a a, a b, a c;
SET GLOBAL innodb_flush_log_at_trx_commit=1;
COMMIT;
--let $shutdown_timeout=0
--source include/restart_mysqld.inc
SELECT COUNT(*) from a;
DROP TABLE a;