select (CHARACTER_LENGTH(group_concat(dest_mobile separator ';'))+1)/12 phone_count ,u.username ,
DATE_FORMAT(m.date_time2, '%Y-%m-%d') date_time2,a.c_name from
(select * from mt_sms union all select * from mt_sms_200801) m , #《==这里
users u , boss_customer c ,boss_agent a
where u.user_id=m.user_id and c.user_id=u.user_id and c.agent_id=a.id
and substring(m.date_time2,1,10) >='2008-06-01' and
substring(m.date_time2,1,10) <='2008-06-05'
group by u.username,DATE_FORMAT(m.date_time2, '%Y-%m-%d') limit 0,20报错:ERROR 126 Incorrect key file for table '#sql_bcb_7.MYI';try to repair it如果我把第三行改为:
(select * from mt_sms) m ,
运行正常,但如果不改就有可能出错,偶尔也不出错。
DATE_FORMAT(m.date_time2, '%Y-%m-%d') date_time2,a.c_name from
(select * from mt_sms union all select * from mt_sms_200801) m , #《==这里
users u , boss_customer c ,boss_agent a
where u.user_id=m.user_id and c.user_id=u.user_id and c.agent_id=a.id
and substring(m.date_time2,1,10) >='2008-06-01' and
substring(m.date_time2,1,10) <='2008-06-05'
group by u.username,DATE_FORMAT(m.date_time2, '%Y-%m-%d') limit 0,20报错:ERROR 126 Incorrect key file for table '#sql_bcb_7.MYI';try to repair it如果我把第三行改为:
(select * from mt_sms) m ,
运行正常,但如果不改就有可能出错,偶尔也不出错。
ps.这个帖子我会按时结帖,希望大家帮忙,不用担心分数和结帖的问题,分数不够可以加!
2、
这是一个BUG吧,
Your server is running out of diskspace where MySQL stores temporary tables,
增加MYSQL临时表的SIZE
3、表损坏
CHECK TABLE statement语句来检查MyISAM表的健康,并用REPAIR TABLE修复一个损坏的MyISAM表。
[root@localhost mysql]# df -k
Îļþϵͳ 1K-¿é 已用 可用 已用% ¹ÒÔصã
/dev/sdb1 141383156 131693604 2507696 99% /
/dev/sda1 101089 15115 80755 16% /boot
none 1027436 0 1027436 0% /dev/shm
1和3没问题。
请问是临时表空间不够,还是硬盘空间不够了??