Error writing file '/tmp/MYPhUCzf' (Errcode: 28 - No space left on device)
SELECT SQL_CALC_FOUND_ROWS IF (in_stock = 0,2,1) AS ss, 1 AS ord, p.*, x.giftID, y.stock, case when y.stock > 0 then ROUND(p.Price*(1-y.stock/100)) else Price end stock_price, name_ru AS _name_sort FROM SC_products p LEFT JOIN ( SELECT SUBSTR(p.id, INSTR(p.id, '-')+1) giftID, it.productID FROM SC_product_list as p INNER JOIN SC_product_list_item as it ON p.id = it.list_id WHERE id LIKE 'gift-%' AND now() BETWEEN date_begin AND date_end ) x ON p.productID = x.productID LEFT JOIN ( SELECT SUBSTR(p.id, INSTR(p.id, '-')+1, 2) stock, it.productID FROM SC_product_list as p INNER JOIN SC_product_list_item as it ON p.id = it.list_id WHERE id LIKE 'stock-%' AND now() BETWEEN date_begin AND date_end ) y ON p.productID = y.productID WHERE ( (p.productID IN (13411,13412,13413,13414,13415,13416,13417,13418,13419,13420,13421,13422,13423,13424,13425,13426,13427,13428,13429,13430,13431,13432,13433,13434,13435,13436,13438,13442,13443,13444,13445,13446,13447,13448,13449,13450,13451,13452,13453,13454,13455,13456,13457,13458,13459,13460,13461,13463,13464,13465,13466,13467,13468,13469,13470,13471,13472,13473,13474,13475,13476,13477,13478,13479,13480,13481,13482,13483,13484,13485,13486,13487,13488,13489,13490,13491,13492,13493,13494,13495,13496,13497,13498,13499,13500,13505,13506,13507,13508,13509,13510,13511,13512,13513,13514,13515,13517,13518,13519,13520,13521,13523,13524,13525,13526,13527,13528,13529,13530,13531,13532,13533,13534,13535,13536,13537,13538,13539,13540,13541,13542,13543,13546,13547,13548,13549,13550,13551,13552,13553,13554,13555,13556,13557,13558,13559,13560,13561,13562,13563,13564,13565,13566,13567,13571,13572,13573,13574,13575,13576,13577,13578,13579,13580,13581,13582,13583,13584,13585,13586,13587,13588,13592,13593,13595,13597,13598,13599,13600,13601,13602,13603,13604,13605,13606,13607,13608,13609,13610)) OR (categoryID IN (164)) ) AND ( enabled=1) ORDER BY sort_order , _name_sort LIMIT 200,40