错误代码1146表&#39; <table_name>&#39;不存在MySql错误</table_name>

时间:2015-01-30 00:20:57

标签: mysql

我正在尝试运行这个查询,该查询工作了3-4次,但突然之间它的执行会抛出错误 -

Error Code: 1146
Table 'bugs.PROFILES' doesn't exist

突然之间可能出现什么问题?

我也RESET QUERY CACHE但没有运气。

以下是查询 -

SELECT b.bug_id                           AS Bug_Id, 
       b.bug_status                       AS STATUS, 
       b.resolution                       AS Resolution, 
       q.realname                         AS Reporter, 
       p.realname                         AS Assigned_To, 
       b.short_desc                       AS Summary, 
       DATE_FORMAT(b.deadline, '%m/%d/%Y')AS Deadline 
FROM   bugs b 
       INNER JOIN PROFILES p 
               ON b.assigned_to = p.userid 
       INNER JOIN PROFILES q 
               ON b.reporter = q.userid 
WHERE  ( bug_status IN ( 'RESOLVED', 'VERIFIED', 'INTEST', 'REOPENED' ) 
         AND short_desc NOT LIKE '%Program:%' 
         AND deadline BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL 30 DAY) 
       ) 
        OR ( bug_status IN ( 'RESOLVED', 'VERIFIED', 'INTEST' ) 
             AND short_desc NOT LIKE '%Program:%' 
             AND deadline BETWEEN DATE_SUB(CURDATE(), INTERVAL 30 DAY) AND 
                                  CURDATE() ) 
ORDER  BY bug_status ASC 

有任何建议吗?

表bugs.profiles确实存在。

bugs.profiles

b.reporter column

2 个答案:

答案 0 :(得分:2)

它告诉你bugs.PROFILES表不存在。在bugs数据库PROFILES表中手动检查。或者使用SHOW TABLES

将数据库移动到新位置或更新mysql服务器时,可能会丢失表。

答案 1 :(得分:1)

这应该给你答案

SHOW TABLES LIKE 'bugs.PROFILES'