Got error -1 from storage engine
SELECT SQL_CALC_FOUND_ROWS `products`.*, `promoted`.`iPromotedMin`, `producers`.`sName` AS `prodsName`, `producers`.`sLogoUrl` AS `prodsLogoUrl`, `prodgroups`.`sName` AS `prodsGroupName`, `prodgroups`.`sLogoUrl` AS `prodsGroupLogoUrl`, `producers`.`sType` AS `sProducersClass`, `products`.`TiAvailable` AS `iAvailable`, `ai`.*, `ai`.`iVal7` `iSezon`, `rating`.`fRatingAvg`, `rating`.`iCommentsCount`, `products`.`fPrice` AS `fCatalogPrice`, `vat`.`fVatValue`, ss11_pl_calculateProductPriceForUser( NULL, `products`.`iProduct`, 0 ) AS `fPrice`, LEAST( `products`.`TiCanBuy`, ss11_pl_getProductCanBuyForUser ( NULL, `products`.`iProduct` ) ) AS `iCanBuy`, `products`.`TiVariantsCount` AS `iVariantCount`, ss11_pl_getProductVisiblePriceForUser ( NULL, `products`.`iProduct` ) AS `iVisiblePrice` FROM `ss11_pl_products` AS `products` LEFT JOIN `opony_sklep`.`ss11_pl_products_attributes_flat` AS `ai` USING( `iProduct` ) LEFT JOIN ( SELECT MIN( `iPromoted` ) `iPromotedMin`, `iProduct` FROM `ss11_pl_products_promoted` GROUP BY `iProduct` ) `promoted` USING( `iProduct` ) INNER JOIN `ss11_vat` AS `vat` USING( `iVat` ) LEFT JOIN `ss11_pl_producers` AS `producers` USING( `iProducer` ) LEFT JOIN `ss11_pl_producers` AS `prodgroups` ON( prodgroups.`iProducer` = `producers`.`iProducersGroup` ) INNER JOIN `ss11_pl_products_variants` AS `pv` USING( `iProduct` ) LEFT JOIN `ss11_pl_products_attributes` AS `pa` ON( `pv`.`iProductVariant` = `pa`.`iProductVariant` AND `iAttributeValue` IN( 4, 5, 6 ) ) LEFT JOIN `rating` ON( `rating`.`iProducer` = `products`.`iProducer` AND `rating`.`iModel` = `iVal18` ) WHERE 1 AND `products`.`TiStock` >= 1 AND `products`.`TiCanBuy` >= 1 AND `products`.`iMainCategory` IN( 66, 67, 100, 1160, 3, 154, 155, 152 ) AND `products`.`TiStock` >= 4 AND `products`.`iProduct` IN ( '81645', '71800', '159466', '87827', '2255', '71527', '161375', '162358' ) AND EXISTS ( SELECT 1 FROM `ss11_pl_products_pages` AS `products_pages` WHERE `products`.`iProduct` = `products_pages`.`iProduct` AND `products_pages`.`iPage` IN ( '202', '117', '96', '98', '119', '1200', '1239', '182', '1238', '137', '1177', '237', '1', '118', '136', '230', '140', '219', '92', '142', '143', '144', '145', '138', '226', '169', '150', '177', '224', '97', '225', '151', '239', '173', '101', '175', '115', '238', '231', '1264', '1225', '1227', '1229', '1272', '1245', '1267', '95', '1269', '1265', '181', '1235', '1201', '1249', '1228', '1222', '1226', '1224', '1263', '69', '1236', '1202', '1266', '75', '1250', '199', '1216', '1244', '1232', '1241', '70', '148', '149', '1262', '1268', '1211', '1221', '1246', '1273', '120', '121', '1203', '1219', '1199', '1240', '1233', '1237', '1255', '1247', '1243', '93', '1254', '1253', '1192', '1274', '1152', '1159', '245', '1218', '1271', '1242', '1234', '1270', '1248', '1204', '1261', '1252', '1217', '1154', '191', '1275', '1251', '94', '1205', '1197', '1256', '30', '1163', '1257', '1196', '1206', '1223', '193', '1258', '1207', '1195', '210', '1212', '159', '1259', '205', '1193', '1208', '1198', '1230', '114', '1186', '1209', '172', '1210', '1162', '1231', '1220', '141', '1214', '1190', '1173', '1194', '91', '1165', '240', '1191', '146', '1167', '234', '180', '1168', '221', '164', '1166', '227', '1169', '233', '1187', '147', '209', '167', '1172', '192', '166', '1185', '1188', '183', '99', '241', '1171', '1161', '1182', '1176', '158', '218', '1156', '1178', '1158', '1174', '1175', '1179', '1183', '1157', '1189', '1184', '176', '161', '171', '139', '217', '157', '160', '1215', '165', '163', '116', '174', '168', '156', '170', '179', '1155', '66', '100', '67', '152', '1160', '154', '155', '81', '48', '49', '110', '103', '104', '1100', '113', '109', '107', '122', '123', '124', '106', '162', '125', '126', '105', '186', '127', '242', '108', '178', '3', '4', '5', '6', '7', '8', '17', '18', '19', '20', '190', '2', '9', '1181', '133', '189', '1153', '10', '11', '22', '12', '1260', '188', '129', '13', '14', '15', '16', '21', '59', '60', '61', '53', '55', '57', '56', '54', '62', '63', '64', '65', '58' ) LIMIT 1 ) AND ss11_pl_getProductVisibleForUser ( NULL, `products`.`iProduct` ) >= 1 AND `products`.`iStatus` >= 1 GROUP BY `products`.`iProduct` ORDER BY RAND() LIMIT 0,8