2013年8月22日星期四

mysql ERROR 1114 (HY000): The table '#sql-951_2' is full

修改一个表,发现执行一半的时候出现 is full 的错误,查看mysql 的 tmp 空间,
已经用完:


mysql> alter table templatelinks add (id int(10) default 10);               
ERROR 1114 (HY000): The table '#sql-951_2' is full
mysql> system df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/vda1              20G  3.5G   16G  19% /
tmpfs                1004M     0 1004M   0% /dev/shm
/dev/vdb1              50G   10G   37G  22% /data

mysql> show variables like '%tmp%';
+-------------------+-----------+
| Variable_name     | Value     |
+-------------------+-----------+
| max_tmp_tables    | 32        |
| slave_load_tmpdir | /dev/shm  |
| tmp_table_size    | 134217728 |
| tmpdir            | /dev/shm  |
+-------------------+-----------+
4 rows in set (0.00 sec)
 
应该不属于内存参数,需要修改 my.cnf 中默认tmp 路径重启,再修改表,确认ok:
 
mysql> alter table templatelinks add (id int(10) default 10);                
Query OK, 44424181 rows affected (8 min 54.28 sec)
Records: 44424181  Duplicates: 0  Warnings: 0

mysql>

没有评论:

发表评论