SQL ERROR FOUND in SELECT SQL_CALC_FOUND_ROWS STRAIGHT_JOIN r.id AS rid, r.link_attributes, rp.record, rp.title, rp.annotation, rp.text, ri.code, ri.price, IF(ri.retail_price > ri.common_price, ri.retail_price * v.value, ri.common_price) AS common_price, ri.store_status_eshop AS store_status, ri.store_status AS real_store_status, ri.extra_delivery, IF(dp.price IS NOT NULL, 0, IF(dd.discount > ri.discount, dd.discount, ri.discount)) AS discount, v.value AS vat, fi.img AS thumb, av_1.value AS producer FROM records AS r JOIN records_pages AS rp ON r.id = rp.parent JOIN records_items AS ri ON r.id = ri.parent LEFT JOIN dealers_discounts AS dd ON dd.class_id = 0 AND dd.group_id = ri.discount_group LEFT JOIN dealers_pricelists AS dp ON dp.class_id = 0 AND dp.ean = ri.ean JOIN shop_vats AS v ON v.id = ri.vat LEFT JOIN files_images fi ON rp.thumb = fi.id LEFT JOIN items_parameters AS ip_1 ON ip_1.parent_id = r.id AND ip_1.attribute_id = 1 LEFT JOIN attributes_values AS av_1 ON av_1.id = ip_1.value_id WHERE r.id IN (SELECT record_id FROM catalog_items WHERE category_id IN (1697,1698,12591,12592,12593,12594,12595,12596,12597,12598,12652)) AND rp.visible = "1" AND r.cms_hidden = "0" AND r.cms_readable = "1" AND ri.price > 0 ORDER BY ri.bestseller DESC, ri.sales_amount DESC, rp.title ASC LIMIT 9 OFFSET 0 [nativecode=1030 ** Got error 28 from storage engine]