mirror of
https://github.com/MariaDB/server.git
synced 2025-08-09 22:24:09 +03:00
buf_page_t::read_complete(): Fix an incorrect condition that had been
added in commit aaef2e1d8c
(MDEV-27058).
Also for compressed-only pages we must remember that buffered changes
may exist.
buf_read_page(): Correct the function comment; this is for a synchronous
and not asynchronous read. Pass the parameter unzip=true to
buf_read_page_low(), because each of our callers will be interested in
the uncompressed page frame. This will cause the test
encryption.innodb-compressed-blob to emit more errors when the
correct keys for decrypting the clustered index root page are unavailable.
Reviewed by: Debarun Banerjee
44 lines
2.2 KiB
Plaintext
44 lines
2.2 KiB
Plaintext
-- source include/innodb_page_size_small.inc
|
|
-- source include/have_file_key_management_plugin.inc
|
|
|
|
# embedded does not support restart
|
|
-- source include/not_embedded.inc
|
|
|
|
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted; key_version=1");
|
|
call mtr.add_suppression("InnoDB: Recovery failed to read page");
|
|
call mtr.add_suppression("InnoDB: Unable to decompress ..test.t[12]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]");
|
|
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test/t[12]\\.ibd' page \\[page id: space=[1-9][0-9]*, page number=3\\]");
|
|
call mtr.add_suppression("InnoDB: File '.*test/t[12]\\.ibd' is corrupted");
|
|
call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` is corrupted");
|
|
|
|
--echo # Restart mysqld --file-key-management-filename=keys2.txt
|
|
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
|
|
-- source include/restart_mysqld.inc
|
|
|
|
SET GLOBAL innodb_file_per_table = ON;
|
|
|
|
set GLOBAL innodb_default_encryption_key_id=4;
|
|
create table t1(a int not null primary key, b blob, index(b(10))) engine=innodb row_format=compressed;
|
|
create table t2(a int not null primary key, b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes;
|
|
create table t3(a int not null primary key, b blob, index(b(10))) engine=innodb row_format=compressed encrypted=no;
|
|
|
|
insert into t1 values (1, repeat('secret',6000));
|
|
insert into t2 values (1, repeat('secret',6000));
|
|
insert into t3 values (1, repeat('secret',6000));
|
|
|
|
--echo # Restart mysqld --file-key-management-filename=keys3.txt
|
|
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys3.txt
|
|
-- source include/restart_mysqld.inc
|
|
|
|
--error ER_NO_SUCH_TABLE_IN_ENGINE
|
|
select count(*) from t1 FORCE INDEX (b) where b like 'secret%';
|
|
--error ER_NO_SUCH_TABLE_IN_ENGINE
|
|
select count(*) from t2 FORCE INDEX (b) where b like 'secret%';
|
|
select count(*) from t3 FORCE INDEX (b) where b like 'secret%';
|
|
|
|
--echo # Restart mysqld --file-key-management-filename=keys2.txt
|
|
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
|
|
-- source include/restart_mysqld.inc
|
|
|
|
drop table t1,t2,t3;
|