ALTER DATABASE Statement thread_id BIGINT UNSIGNED NOT NULL, type INT UNSIGNED NOT NULL, space_id INT UNSIGNED, page_no INT UNSIGNED, index_id BIGINT UNSIGNED, table_id BIGINT UNSIGNED, old_file_path VARCHAR(512) COLLATE UTF8_BIN, new_file_path VARCHAR(512) COLLATE UTF8_BIN, KEY(thread_id) ); • id : A unique identifier for a DDL log record. • thread_id : Each DDL log record is assigned a  thread_id , which is used to replay and remove DDL logs that belong to a particular DDL operation. DDL operations that involve multiple data file operations generate multiple DDL log records. • type : The DDL operation type. Types include  FREE  (drop an index tree),  DELETE  (delete a file),  RENAME (rename a file), or  DROP  (drop metadata from the  mysql.innodb_dynamic_metadata  data dictionary table). • space_id : The tablespace ID. • page_no : A page that contains allocation information; an index tree root page, for example. • index_id : The index ID. • table_id : The table ID. • old_file_path : The old tablespace file path. Used by DDL operations that create or drop tablespace files; also used by DDL operations that rename a tablespace. • new_file_path : The new tablespace file path. Used by DDL operations that rename tablespace files. This example demonstrates enabling  innodb_print_ddl_logs  to view DDL logs written to  strderr  for a  CREATE TABLE  operation. mysql> SET GLOBAL innodb_print_ddl_logs=1; mysql> CREATE TABLE t1 (c1 INT) ENGINE = InnoDB; [Note] [000000] InnoDB: DDL log insert : [DDL record: DELETE SPACE, id=18, thread_id=7, space_id=5, old_file_path=./test/t1.ibd] [Note] [000000] InnoDB: DDL log delete : by id 18 [Note] [000000] InnoDB: DDL log insert : [DDL record: REMOVE CACHE, id=19, thread_id=7, table_id=1058, new_file_path=test/t1] [Note] [000000] InnoDB: DDL log delete : by id 19 [Note] [000000] InnoDB: DDL log insert : [DDL record: FREE, id=20, thread_id=7, space_id=5, index_id=132, page_no=4] [Note] [000000] InnoDB: DDL log delete : by id 20 [Note] [000000] InnoDB: DDL log post ddl : begin for thread id : 7 [Note] [000000] InnoDB: DDL log post ddl : end for thread id : 7 ALTER {DATABASE | SCHEMA} [ db_name ] alter_option  ... alter_option : { [DEFAULT] CHARACTER SET [=]  charset_name | [DEFAULT] COLLATE [=]  collation_name | [DEFAULT] ENCRYPTION [=] {’Y’ | ’N’} | READ ONLY [=] {DEFAULT | 0 | 1} } 13.1.2 ALTER DATABASE Statement 2470