Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.3.14
-
None
Description
A data import (using SQLines as import tool) into encrypted tables failed with:
SHOW WARNINGS: LOAD DATA LOCAL INFILE 'filename' IGNORE INTO
|
TABLE db_name.table:name
|
Level: Warning; Code: 192; Message: Table
|
db_name.table_name is encrypted but encryption service or used
|
key_id is not available. Can't continue reading table.
|
Level: Warning; Code: 192; Message: Table
|
db_name.table_name is encrypted but encryption service or used
|
key_id is not available. Can't continue reading table.
|
Level: Error; Code: 1296; Message: 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
|
Simple file_key_management is used to manage encryption keys,
all tables use the same key id, and there has only been a single
key version.
Still just this one table reports encryption key errors, while other
encrypted tables using the same key id and version still work fine.
E.g. when checing tablespace encryption information for the table "table_name" triggering the error, and another table "other_table" that works fine, there are no visible differences apart from the space number and table name:
SELECT * FROM
|
INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION
|
WHERE NAME in
|
('db_name/table_name', 'db_name/other_table')\G
|
*************************** 1. row ***************************
|
SPACE: 3406
|
NAME: db_name/other_table
|
ENCRYPTION_SCHEME: 1
|
KEYSERVER_REQUESTS: 1
|
MIN_KEY_VERSION: 1
|
CURRENT_KEY_VERSION: 1
|
KEY_ROTATION_PAGE_NUMBER: NULL
|
KEY_ROTATION_MAX_PAGE_NUMBER: NULL
|
CURRENT_KEY_ID: 1
|
ROTATING_OR_FLUSHING: 0
|
*************************** 2. row ***************************
|
SPACE: 3449
|
NAME: db_name/table_name
|
ENCRYPTION_SCHEME: 1
|
KEYSERVER_REQUESTS: 1
|
MIN_KEY_VERSION: 1
|
CURRENT_KEY_VERSION: 1
|
KEY_ROTATION_PAGE_NUMBER: NULL
|
KEY_ROTATION_MAX_PAGE_NUMBER: NULL
|
CURRENT_KEY_ID: 1
|
ROTATING_OR_FLUSHING: 0
|
Error log repeatedly contains:
[ERROR] InnoDB: Failed to read file
|
'./db_name/table_name.ibd' at offset 1162674: Table is
|
encrypted but decrypt failed.
|
[ERROR] InnoDB: The page [page id: space=3449, page
|
number=1162674] in file './db_name/table_name.ibd' cannot be
|
decrypted.
|
[Note] InnoDB: However key management plugin or used key_version
|
1 is not found or used encryption algorithm or method does not match.
|
[Note] InnoDB: Marking tablespace as missing. You may drop this
|
table or install correct key management plugin and key file.
|
Attachments
Issue Links
- relates to
-
MDEV-12699 Improve crash recovery of corrupted data pages
- Closed