SQL Query Error (SELECT ads.*, apos.name as position , at.pos as pos, at.id as ads_type_id FROM ads AS ads, ads_positions as apos , ads_types at WHERE ads.ref_position=apos.id and ads.ref_position = 6 AND at.ref_type = 1 AND ads.id = at.ref_ads AND at.pos = 1 ORDER BY RAND() LIMIT 1 ) : Got error -1 from storage engine