• Thirunarayanan Balathandayuthapani's avatar
    MDEV-34372 Temporary tablespace decryption fails with ER_NOT_KEYFILE · 1050126b
    Thirunarayanan Balathandayuthapani authored
    Reason:
    ======
      Temporary tablespace uses the innodb redo encryption key and key
    version(v1) to encrypt the temporary tablespace/files. When
    encryption key rotation happens, InnoDB assigns the new redo
    encryption key version(v2) during checkpoint. After this, InnoDB
    encrypts the temporary tablespace pages using key version (v2).
    This lead to failure of decrypting the temporary tablespace
    pages which was encrypted using key version (v1).
    
    Fix:
    ===
      Store the temporary file/tablespace key and key version
    seperately during redo log initialization. Even though
    InnoDB does key rotation, it doesn't affect temporary file
    key and key version.
    
    log_crypt_init(): Assign the temporary file/tablespace
    key and key version
    
    i_s_dict_fill_temp_tablespaces_encryption(): Adds the temporary
    tablespace information if
    innodb_encrypt_temporary_tables is enabled
    1050126b
redo_key_rotation.result 1.08 KB