Tmp_table_size This configuration limits the size of temporary tables in memory. The default value is 16 MB. If the temporary table size exceeds tMP_table_size, the memory temporary table is converted to a disk temporary table
The default engine used for disk temporary tables is InnoDB, which is controlled by internal_tmp_disk_storage_engine.