导致“MySQL服务器已经消失”的查询错误

时间:2013-04-03 02:56:22

标签: mysql

我收到此错误:

Error Number: 2006
MySQL server has gone away

造成这种错误的确切错误是什么? 我尝试了一些像max_allowed_packet这样的建议以及论坛中讨论的其他一些建议,但没有一个是我案例的解决方案。 这个查询有什么不标准甚至是错的吗?

SELECT
    `st`.`stid`, 
    `st`.`shift`, 
    `start_date`, 
    `end_date`, 
    `off_date`, 
    `actual_off_date`, 
    `leave_type`, 
    `sd`.`off_day` 
FROM (`staff` as st) 
LEFT JOIN `staff_leave_period` as slp 
    ON `st`.`stid` = `slp`.`stid` 
    and start_date <= '2013-04-03' 
    and end_date >= '2013-04-03' 
LEFT JOIN `staff_off_dates` as sod 
    ON `st`.`stid` = `sod`.`stid` 
    and off_date = '2013-04-03' 
LEFT JOIN `staff_off_day` as sd 
    ON `st`.`stid` = `sd`.`stid` 
    and sd.off_day = 'Wed' 
JOIN `staff_leave_status` as sls 
    ON `sls`.`stid` = `st`.`stid` 
WHERE `st`.`stid` NOT IN (SELECT stid 
        FROM attendance 
        WHERE att_date = "2013-04-03"

0 个答案:

没有答案