ERROR 126 Incorrect key file for table
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 ,
运行正常,但如果不改就有可能出错,偶尔也不出错。