Failed to execute the SQL query

select cid, count(*) from  ipo__item  where unread & 1 and not(unread & 8) group by cid

Error 2013: Lost connection to server during query