[PrestaShopDatabaseException]

Incorrect key file for table '/var/tmp/#sql_246_0.MYI'; try to repair it SELECT p.*, product_shop.*, product_shop.id_category_default, pl.*, i.id_image, il.legend, m.name manufacturer_name, DATEDIFF(product_shop.`date_add`, DATE_SUB(NOW(), INTERVAL 20 DAY)) > 0 AS new FROM `eh_category_product` cp LEFT JOIN eh_category c ON (c.id_category = cp.id_category) LEFT JOIN `eh_product` p ON p.`id_product` = cp.`id_product` INNER JOIN eh_product_shop product_shop ON (product_shop.id_product = p.id_product AND product_shop.id_shop = 1) LEFT JOIN eh_product_lang pl ON (pl.id_product = p.id_product) LEFT JOIN eh_image i ON (i.id_product = p.id_product AND i.cover = 1) LEFT JOIN eh_image_lang il ON (i.id_image = il.id_image AND il.id_lang = 7) LEFT JOIN eh_manufacturer m ON (m.id_manufacturer = p.id_manufacturer) WHERE product_shop.`active` = 1 AND c.nleft >= 13 AND c.nright
at line 605 in file classes/db/Db.php

599. 			WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
600. 		}
601. 		else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))
602. 		{
603. 			if ($sql)
604. 				throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
605. 			throw new PrestaShopDatabaseException($this->getMsgError());
606. 		}
607. 	}
608. 
609. 	/**