mirror of
https://github.com/MariaDB/server.git
synced 2025-06-01 19:42:01 +03:00
Problem was that checksum check resulted false positives that page is both not encrypted and encryted when checksum_algorithm was strict_none. Encrypton checksum will use only crc32 regardless of setting. buf_zip_decompress: If compression fails report a error message containing the space name if available (not available during import). And note if space could be encrypted. buf_page_get_gen: Do not assert if decompression fails, instead unfix the page and return NULL to upper layer. fil_crypt_calculate_checksum: Use only crc32 method. fil_space_verify_crypt_checksum: Here we need to check crc32, innodb and none method for old datafiles. fil_space_release_for_io: Allow null space. encryption.innodb-compressed-blob is now run with crc32 and none combinations. Note that with none and strict_none method there is not really a way to detect page corruptions and page corruptions after decrypting the page with incorrect key. New test innodb-checksum-algorithm to test different checksum algorithms with encrypted, row compressed and page compressed tables.
24 lines
1.8 KiB
Plaintext
24 lines
1.8 KiB
Plaintext
call mtr.add_suppression("InnoDB: However key management plugin or used key_version .*");
|
|
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[0-9]+\\] in file test/t[1-3] cannot be decrypted.");
|
|
call mtr.add_suppression("Unable to decompress space ..test.t[1-3].ibd \\[[1-9][0-9]*:[0-9]+\\]");
|
|
# Restart mysqld --file-key-management-filename=keys2.txt
|
|
SET GLOBAL innodb_file_format = `Barracuda`;
|
|
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));
|
|
# Restart mysqld --file-key-management-filename=keys3.txt
|
|
select count(*) from t1 FORCE INDEX (b) where b like 'secret%';
|
|
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
|
|
select count(*) from t2 FORCE INDEX (b) where b like 'secret%';
|
|
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
|
|
select count(*) from t3 FORCE INDEX (b) where b like 'secret%';
|
|
count(*)
|
|
1
|
|
# Restart mysqld --file-key-management-filename=keys2.txt
|
|
drop table t1,t2,t3;
|