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.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, mt.single_url, mt.multiple_url, mt.single_ru single, mt.multiple_ru multiple, ifnull(avg(rv.rate),0) rating, count(distinct rv.user_id) rating_votes_cnt, 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 where 1 and m.mat_type="question" and m.status='active' and !m.cmnts_closed and m.status != 'deleted' group by m.id order by m.is_major desc, m.date desc