Failed to load routine esmykoland_esmykoland.pl_calculateProductPriceForUser. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
SELECT SQL_CALC_FOUND_ROWS `products`.*, `new_comments`.`iNewCommentsCount`, `products`.`fPrice` AS `fCatalogPrice`, pl_calculateProductPriceForUser( NULL, `iProduct`, 1 ) AS `fPrice`, `products_canbuy`.`iCanBuyProduct` AS `iCanBuy`, `products_canbuy`.`iVariantCount` FROM `pl_products` AS `products` LEFT JOIN `pl_products_canbuy_client` AS `products_canbuy` USING ( `iProduct` ) LEFT JOIN ( SELECT `iLink` AS `iProduct`, COUNT( `iComment` ) AS `iNewCommentsCount` FROM `pl_products_comments` WHERE `iAccepted` = 0 GROUP BY `iProduct` ) AS `new_comments` USING( `iProduct` ) WHERE 1 AND `products`.`iProduct` IN ( '5367', '5366', '5365', '5364', '5363' ) AND EXISTS ( SELECT 1 FROM `pl_products_pages` AS `products_pages` WHERE `products`.`iProduct` = `products_pages`.`iProduct` AND `products_pages`.`iPage` IN ( '4', '72', '46', '11', '35', '16', '94', '101', '172', '160', '169', '170', '171', '147', '115', '156', '164', '178', '180', '182', '185', '152', '98', '138', '174', '176', '155', '161', '173', '179', '181', '183', '107', '132', '146', '93', '157', '118', '100', '125', '109', '110', '154', '126', '95', '167', '188', '165', '175', '150', '133', '129', '124', '108', '139', '128', '121', '189', '159', '142', '145', '119', '123', '113', '130', '186', '103', '120', '131', '114', '144', '187', '151', '184', '148', '137', '117', '158', '177', '104', '105', '153', '162', '136', '168', '99', '106', '149', '116', '80', '97', '141', '112', '111', '135', '68', '33', '57', '71', '61', '70', '75', '59', '58', '74', '73', '64', '65', '62', '63', '67', '17', '5', '6', '7', '8', '78', '77', '90', '91', '2', '9', '20', '22', '19', '32', '21', '18', '92' ) LIMIT 1 ) AND `products`.`iStatus` >= 1 ORDER BY `iTime` DESC LIMIT 0,5