A Database Error Occurred

Error Number: 2013

Lost connection to MySQL server during query

select m.id,m.date_created,m.alias,m.mat_cat_id,m.mat_type,m.title,m.teaser,m.author_id,m.author_txt,m.author_city,m.status,m.date,m.date_txt,m.tags_reserve,m.is_major,m.pic,m.cmnts_qty,m.cmnts_closed,m.views_cnt,m.lng, mc.title mc_title, mt.single_url, mt.multiple_url, mt.single_ru single, mt.multiple_ru multiple, d.status d_status, d.id d_id, group_concat(distinct t.tag, '|', t.id) t_tags, ifnull(avg(rv.rate),0) rating, count(distinct rv.user_id) rating_votes_cnt, group_concat(distinct '{"id":"', mc.id, '","title":"', mc.title, '","type":"', mc.type, '","mc.pos":"', mc.pos, '","alias":"', mc.alias, '"}') mc_cats, group_concat(distinct b.id) b_ids, u.name u_name, u.alias u_alias , 1 is_rated from base_mat m left join base_user u on u.id=m.author_id left join base_rating_vote rv on rv.entity_id=m.id and rv.entity='mat' left join base_mat_type mt on m.mat_type is not null and mt.alias = m.mat_type left join base_tag_entity te on te.entity='mat' and te.entity_id=m.id left join base_tag_entity te2 on te2.entity='mat' and te2.entity_id=m.id left join base_tag t on t.id=te.tag_id left join base_mat_mat_cat mmc on mmc.mat_id=m.id left join base_mat_cat mc on mc.id=mmc.mat_cat_id left join base_mat_mat_cat mmc2 on mmc2.mat_id=m.id left join base_mat_cat mc2 on mc2.id=mmc2.mat_cat_id left join base_blog b on b.mat_id=m.id left join base_delivery d on d.entity='mat' and d.entity_id=m.id where 1 and m.status="active" and m.id in (4621,4630,4629,4672,4766) and m.status != 'deleted' group by m.id order by m.is_major desc, m.date desc