遇到报错:
[ERROR] [MY-013132] [Server] The table '/mysqldata/mysqltmp/#sql482e_2f6f60_3b' is full!
[ERROR] [MY-013132] [Server] The table '/mysqldata/mysqltmp/#sql482e_2f6f7a_1e' is full!
[ERROR] [MY-013132] [Server] The table '/mysqldata/mysqltmp/#sql482e_2ff345_65' is full!
[ERROR] [MY-013132] [Server] The table '/mysqldata/mysqltmp/#sql482e_30929b_119' is full!
[ERROR] [MY-013132] [Server] The table '/mysqldata/mysqltmp/#sql482e_313165_119' is full!
[ERROR] [MY-013132] [Server] The table '/mysqldata/mysqltmp/#sql482e_31ac7d_6fd' is full!
检查数据库参数:
show variables like '%_temp%';
+-----------------------------+-----------------------+
| Variable_name | Value |
+-----------------------------+-----------------------+
| avoid_temporal_upgrade | OFF |
| innodb_temp_data_file_path | ibtmp1:12M:autoextend |
| innodb_temp_tablespaces_dir | ./#innodb_temp/ |
| show_old_temporals | OFF |
+-----------------------------+-----------------------+
show variables like '%tmp%';
+---------------------------------+---------------------+
| Variable_name | Value |
+---------------------------------+---------------------+
| default_tmp_storage_engine | InnoDB |
| innodb_tmpdir | |
| internal_tmp_mem_storage_engine | TempTable |
| slave_load_tmpdir | /mysqldata/mysqltmp |
| tmp_table_size | 8388608 |
| tmpdir | /mysqldata/mysqltmp |
+---------------------------------+---------------------+
分析点一:执行的sql是 insert......select.....,会产生内部临时表;
分析点二:数据库版本8.0.24,so 查查是否有bug;参考bug:【https://forums.percona.com/t/mysql-8-0-the-table-tmp-sql1-f519f-7-is-full/10767】
New MySQL 8 temporary engine TempTable have shown various bugs and regressions in the early versions of MySQL 8. What you can try doing is setting: set global internal_tmp_mem_storage_engine=Memory;
解决办法:
set global internal_tmp_mem_storage_engine=Memory;
PS: Internal Temporary Table Use in MySQL --------再学习
【https://dev.mysql.com/doc/refman/8.0/en/internal-temporary-tables.html】