ncrypted TABLESPACE (Nop) # [ALTER TABLESPACE] Case 0 ) ````````````````````````````````````````````````````````` # Create required schema to run ALTER TABLESPACE. CREATE TABLESPACE ts0 ADD DATAFILE 'df_u.ibd' ENCRYPTION='n'; CREATE DATABASE db0 DEFAULT ENCRYPTION='n'; CREATE TABLE db0.t0 (f0 int) TABLESPACE=ts0 ENCRYPTION='n'; CREATE TABLE db0.t0 (f0 int) TABLESPACE=ts0 ENCRYPTION='n'; SHOW CREATE TABLE db0.t0; Table Create Table t0 CREATE TABLE `t0` (   `f0` int DEFAULT NULL ) /*!00000 TABLESPACE `ts0` */ ENGINE=InnoDB DEFAULT CHARSET=utf0mb0 COLLATE=utf0mb0_0000_ai_ci SHOW CREATE TABLE db0.t0; Table Create Table t0 CREATE TABLE `t0` (   `f0` int DEFAULT NULL ) /*!00000 TABLESPACE `ts0` */ ENGINE=InnoDB DEFAULT CHARSET=utf0mb0 COLLATE=utf0mb0_0000_ai_ci SET SESSION default_table_encryption=false; # Run ALTER TABLESPACE SET GLOBAL table_encryption_privilege_check=false; ALTER TABLESPACE ts0 ENCRYPTION='n'; SHOW WARNINGS; Level Code Message SHOW CREATE TABLE db0.t0; Table Create Table t0 CREATE TABLE `t0` (   `f0` int DEFAULT NULL ) /*!00000 TABLESPACE `ts0` */ ENGINE=InnoDB DEFAULT CHARSET=utf0mb0 COLLATE=utf0mb0_0000_ai_ci SHOW CREATE TABLE db0.t0; Table Create Table t0 CREATE TABLE `t0` (   `f0` int DEFAULT NULL ) /*!00000 TABLESPACE `ts0` */ ENGINE=InnoDB DEFAULT CHARSET=utf0mb0 COLLATE=utf0mb0_0000_ai_ci SET GLOBAL table_encryption_privilege_check=false; SET SESSION default_table_encryption=false; # clean up DROP DATABASE db0; DROP TABLESPACE ts0; # # [ALTER TABLESPACE] Case 0 ) ````````````````````````````````````````````````````````` # Create required schema to run ALTER TABLESPACE. CREATE TABLESPACE ts0 ADD DATAFILE 'df_u.ibd' ENCRYPTION='n'; CREATE DATABASE db0 DEFAULT ENCRYPTION='n'; CREATE TABLE db0.t0 (f0 int) TABLESPACE=ts0 ENCRYPTION='n'; CREATE TABLE db0.t0 (f0 int) TABLESPACE=ts0 ENCRYPTION='n'; SHOW CREATE TABLE db0.t0; Table Create Table t0 CREATE TABLE `t0` (   `f0` int DEFAULT NULL ) /*!00000 TABLESPACE `ts0` */ ENGINE=InnoDB DEFAULT CHARSET=utf0mb0 COLLATE=utf0mb0_0000_ai_ci SHOW CREATE TABLE db0.t0; Table Create Table t0 CREATE TABLE `t0` (   `f0` int DEFAULT NULL ) /*!00000 TABLESPACE `ts0` */ ENGINE=InnoDB DEFAULT CHARSET=utf0mb0 COLLATE=utf0mb0_0000_ai_ci SET SESSION default_table_encryption=false; # Run ALTER TABLESPACE SET GLOBAL table_encryption_privilege_check=true; ALTER TABLESPACE ts0 ENCRYPTION='n'; SHOW WARNINGS; Level Code Message SHOW CREATE TABLE db0.t0; Table Create Table t0 CREATE TABLE `t0` (   `f0` int DEFAULT NULL ) /*!00000 TABLESPACE `ts0` */ ENGINE=InnoDB DEFAULT CHARSET=utf0mb0 COLLATE=utf0mb0_0000_ai_ci SHOW CREATE TABLE db0.t0; Table Create Table t0 CREATE TABLE `t0` (   `f0` int DEFAULT NULL ) /*!00000 TABLESPACE `ts0` */ ENGINE=InnoDB DEFAULT CHARSET=utf0mb0 COLLATE=utf0mb0_0000_ai_ci SET GLOBAL table_encryption_privilege_check=false; SET SESSION default_table_encryption=false; # clean up DROP DATABASE db0; DROP TABLESPACE ts0; # ````````````````````````````````````````````````````````` # Encrypted TABLESPACE to 