Failed to execute the SQL query

select fid, count(*) as cnt from  metatag  m inner join  tag  t on t.id = m.tid  where ( t.tag='homeentertainment' or t.tag='1.3' or 1=0)  and m.ttype = 'item' group by fid order by 2 desc

Error 2013: Lost connection to MySQL server during query