are done by creating new table and copying all the contents from the source table to this new one.
Table created in two steps:
- table file is created, first page initialized and table flags are written (including encryption flag) using os_file_write which writes directly into the file, skipping redo log.
- fil_set_encryption is called to store encryption information into the tablespace header. This call does not write into the file directly, instead information is updated in buffer pool and written to the redo log.
Error happens when xtrabackup is trying to open the tablespace which has been created, but it's encryption information has not been flushed to the file yet.
Fix will be to allow such tablespaces. Encryption info will be restored from the redo log during preapre.