Introduced in MySQL 5.7 version Online DDL features and characteristics shared temporary table space, temporary data is stored mainly in the form of:
1, DML file sorting process command (file sore) operation generates a temporary file storage directory is controlled by the parameters TMPDIR, beginning MY
2, large transaction commits the temporary binary log file generating process for the data cache, the storage directory tmpdir control parameters, beginning with ML
. 3, using compressed ROW_FORMAT = cOMPRESSED InnoDB temporary tables created, controlled by parameters tmpdir storage directory, and ending frm IDB
. 4, useless ROW_FORMAT = non-compressed InnoDB cOMPRESSED created temporary tables, is stored in innodb_temp_data_file_path parameters specified by the shared temporary file
5, the temporary files created DDL Onine COPY mode, the operation is stored in the same directory table sql- beginning to end idb frm and
6, Onine INPLACE patterns created by DDL temporary files stored in the same directory operation table, and begin sql- sql-ib, and to end frm IDB
. 7, during operation Online DDL operations using temporary files sorted, controlled by the parameter storage directory TMPDIR, beginning IB
. 8 , internal temporary table storage engine MySQL InnoDB layer used, stored in the parameter innodb_temp_data_file_pat Share specified in the temporary file h
MySQL shared temporary table space (shared temporary tablespace)
incorporated MySQL version 5.7.1, the temporary table space independent processing space from the system table, used to store:
1, non-compressed InnoDB temporary tables (non-compressed InnoDB temporary tables)
2, the relationship between the object (Related objects)
. 3, rollback (rollback segment)
Because the shared temporary table space to store the data without the involvement of the main Crash Recovery, it can be removed rebuild restart, easy to reclaim space.
Tablespace by the shared temporary innodb_temp_data_file_path control parameters, the default configuration is ibtmp1: 12M: autoextend, when present at a innodb_data_home_dir path is specified.
Use the following command can view the files in the MySQL temporary directory
lsof |grep '/export/data/mysql/tmp/'
The output is:
mysqld 22346 mysql 5u REG 8,17 0 47278234 /export/data/mysql/tmp/ibW1DoSr (deleted) mysqld 22346 mysql 6u REG 8,17 0 47278235 /export/data/mysql/tmp/ibAhuhtS (deleted) mysqld 22346 mysql 7u REG 8,17 0 47278236 /export/data/mysql/tmp/ibiiHa4i (deleted) mysqld 22346 mysql 8u REG 8,17 0 47278237 /export/data/mysql/tmp/ibeje7dX (deleted) mysqld 22346 mysql 13u REG 8,17 0 47278238 /export/data/mysql/tmp/ibLORUJC (deleted) mysqld 22346 mysql 2943u REG 8,17 0 47278301 /export/data/mysql/tmp/MLVChF9b (deleted) mysqld 22346 mysql 3785u REG 8,17 0 47278326 /export/data/mysql/tmp/MLx6V0TO (deleted) mysqld 22346 mysql 4795u REG 8,17 0 47278371 /export/data/mysql/tmp/MLz5r2Yv (deleted) mysqld 22346 mysql 4928u REG 8,17 0 47278574 /export/data/mysql/tmp/ML7ivmrd (deleted) mysqld 22346 mysql 5414u REG 8,17 0 47278653 /export/data/mysql/tmp/MLx4HGxW (deleted) mysqld 22346 mysql 6105u REG 8,17 0 47278714 /export/data/mysql/tmp/MLADScmK (deleted) mysqld 22346 mysql 6314u REG 8,17 0 47278715 /export/data/mysql/tmp/MLG8aCpz (deleted) mysqld 22346 mysql 6315u REG 8,17 0 47278716 /export/data/mysql/tmp/MLJ7MuCo (deleted)
ML can see the beginning and the beginning of the file in the directory ib, used to cache BINLOG and sort the results.