A Database Error Occurred

Error Number: 2013

Lost connection to MySQL server during query

select count(distinct m.id) qty 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.mat_type='news' and m.status='active' and m.status != 'deleted'