Tablespaces shell> cd  BASEDIR /data/#innodb_temp shell> ls temp_10.ibt temp_2.ibt temp_4.ibt temp_6.ibt temp_8.ibt temp_1.ibt temp_3.ibt temp_5.ibt temp_7.ibt temp_9.ibt In statement based replication (SBR) mode, temporary tables created on a replica reside in a single session temporary tablespace that is truncated only when the MySQL server is shut down. The  INNODB_SESSION_TEMP_TABLESPACES  table provides metadata about session temporary tablespaces. The  INFORMATION_SCHEMA.INNODB_TEMP_TABLE_INFO  table provides metadata about user-created temporary tables that are active in an  InnoDB  instance. The global temporary tablespace ( ibtmp1 ) stores rollback segments for changes made to user-created temporary tables. Global Temporary Tablespace The  innodb_temp_data_file_path  variable defines the relative path, name, size, and attributes for global temporary tablespace data files. If no value is specified for  innodb_temp_data_file_path , the default behavior is to create a single auto-extending data file named  ibtmp1  in the innodb_data_home_dir  directory. The initial file size is slightly larger than 12MB. The global temporary tablespace is removed on normal shutdown or on an aborted initialization, and recreated each time the server is started. The global temporary tablespace receives a dynamically generated space ID when it is created. Startup is refused if the global temporary tablespace cannot be created. The global temporary tablespace is not removed if the server halts unexpectedly. In this case, a database administrator can remove the global temporary tablespace manually or restart the MySQL server. Restarting the MySQL server removes and recreates the global temporary tablespace automatically. The global temporary tablespace cannot reside on a raw device. INFORMATION_SCHEMA.FILES  provides metadata about the global temporary tablespace. Issue a query similar to this one to view global temporary tablespace metadata: By default, the global temporary tablespace data file is autoextending and increases in size as necessary. To determine if a global temporary tablespace data file is autoextending, check the innodb_temp_data_file_path  setting: To check the size of global temporary tablespace data files, query the  INFORMATION_SCHEMA.FILES table using a query similar to this one: 3067 mysql>  SELECT FILE_NAME, TABLESPACE_NAME, ENGINE, INITIAL_SIZE, TOTAL_EXTENTS*EXTENT_SIZE AS TotalSizeBytes, DATA_FREE, MAXIMUM_SIZE FROM INFORMATION_SCHEMA.FILES WHERE TABLESPACE_NAME = ’innodb_temporary’\G *************************** 1. row *************************** FILE_NAME: ./ibtmp1 TABLESPACE_NAME: innodb_temporary ENGINE: InnoDB INITIAL_SIZE: 12582912 mysql>  SELECT @@innodb_temp_data_file_path; +------------------------------+ | @@innodb_temp_data_file_path | +------------------------------+ | ibtmp1:12M:autoextend | +------------------------------+ mysql>  SELECT * FROM INFORMATION_SCHEMA.FILES WHERE TABLESPACE_NAME=’innodb_temporary’\G