【MySQL 5.7 Reference Manual】15.4.12 Temporary Tablespace(临时表空间)

15.4.12 Temporary Tablespace (临时表空间)

15.4.12.1 InnoDB Temporary Table Undo Logs (InnoDB临时表空间Undo日志)

The temporary tablespace, introduced in MySQL 5.7.1, is a tablespace for non-compressed InnoDB temporary tables and related objects. The configuration option, innodb_temp_data_file_path, defines a relative path for the temporary tablespace data file. If innodb_temp_data_file_path is not defined, a single auto-extending 12MB data file named ibtmp1 is created in the data directory. The temporary tablespace is recreated on each server start and receives a dynamically generated space ID, which helps avoid conflicts with existing space IDs. The temporary tablespace cannot reside on a raw device. Startup is refused if the temporary tablespace cannot be created.

临时表空间,在MySQL 5.7.1中被引入,该表空间用于存放非压缩状态的InnoDB临时表和相关对象。配置项innodb_temp_data_file_path定义了临时表空间数据文件的相关路径。如果innodb_temp_data_file_path未定义,一个单独自动扩展大小为12MB名为ibtmp1的数据文件会被创建在数据目录中。任何一个服务启动时临时表空间都会被重建并接收一个动态生成的空间ID,这样可以帮助避免与已存在的空间ID冲突。临时表空间不可以驻留在一个原始设备上。如果临时表空间无法创建,那么启动将被拒绝。

The temporary tablespace is removed on normal shutdown or on an aborted initialization. The temporary tablespace is not removed when a crash occurs. In this case, the database administrator may remove the temporary tablespace manually or restart the server with the same configuration, which removes and recreates the temporary tablespace.

在服务正常关闭或初始化失败时表空间会被删除。当崩溃发生时临时表空间不会被删除。在这种情况下,数据库管理员可以手动删除临时表空间或用相同的配置重启服务,这样就会删除并重建临时表空间。

你可能感兴趣的:(Mysql,mysql)