我收到此错误:
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"