Error writing file '/tmp/MYIedffl' (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 (136,137,138,139,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,159,168,169,170,172,174,175,192,195,239,242,256,263,270,852,854,856,857,858,1118,1119,1121,1122,1123,1731,1732,1775,1776,1777,1778,1779,1780,1797,1906,2022,2073,2074,2380,2381,2382,2649,2650,2652,2701,2702,2704,2705,2728,2733,2737,2742,2744,2745,2748,2749,2756,2757,2758,2760,3514,3515,3607,3608,3609,3957,4026,4169,4170,4171,4200,4222,4223,4224,4225,4515,4719,4865,4906,5406,5418,5819,6075,6076,6078,6079,6080,6081,6082,6084,6085,6086,6214,6215,6216,6217,6218,6349,6352,6353,6354,6355,6356,6357,6457,6640,6841,6850,6851,6852,6853,6855,6856,6857,6858,6859,6860,6861,6862,6863,6864,6865,6866,6867,6868,6869,6870,6871,7543,8291,8298,8319,8386,8387,8388,8389,8766,8767,8784,9411,9412,9413,9414,9415,9416,9417,9418,9419,9420,9421,9422,9424,9425,9426,9427,9428,9429,9430,9433,9434,9437,9438,9439,9440,9441,9442,9445,9446,9447,9448,9449,9450,9451,9452,9453,9454,9455,9456,9457,9458,9460,9461,9463,9464,9465,9466,9467,9468,9469,9470,9471,9472,9473,9474,9475,9476,9477,9480,9481,9482,9483,9487,9531,9532,9623,9624,9626,9627,9629,9630,9631,9632,9633,9634,9635,9636,9638,9639,9644,9645,9646,9647,9652,9653,9654,9655,9656,9658,9659,9661,9662,9709,9710,9711,9793,9794,10072,10073,10074,10075,10076,10077,10078,10079,10080,10081,10086,10087,10091,10092,10093,10095,10096,10545,10587,10588,10589,10590,10591,10592,10593,10658,10659,10660,10661,10662,10663,10664,10665,10666,10667,10668,10669,10670,10671,10672,10673,10674,10675,10676,10677,10679,11099,11176,11418,11419,11420,11421,11422,11423,11424,11427,11428,11429,11430,11431,11432,11434,11435,11478,11479,11480,11481,11482,11483,11484,11485,11487,11488,11490,11491,11492,11493,11494,11513,11515,11516,11532,11534,11535,11536,11537,11540,11541,11542,11546,11547,11548,11549,11550,11551,11552,11553,11554,11555,11556,11557,11558,11559,11560,11568,11570,11571,11670,11671,11672,11673,11674,11675,11676,11677,11678,11679,11680,11681,11682,11683,11684,11685,11687,11688,12296,12297,12298,12299,12300,12301,12302,12303,12304,12305,12306,12389,12417,12418,12694,12696,12697,12698,12699,12924,12925,12926,12927,12928,12929,12934,12935,12936,12937,12938,12939,12940,12941,12942,12943,12944,12945,12946,12947,12948,12949,12950,12951,12974,12975,12976,13010,13011,13012,13013,13014,13015,13020,13021,13022,13057,13195,8396,13229,13230,13231,11862,12296,12909,12910,12911,12912,12921,12922,12923,12924,12925,12926,12927,12928,12929,12934,12935,12936,12937,12938,12939,12940,12941,12942,12943,12944,12945,12946,12947,12948,12949,12950,12951,13182,13183,13185,13186,13187,13188,13189,13190,13191,13192,13197,13198,13199,13200,13201,13202,13203,13204,13205,13206,13207,13208,13209,13210,13213,13216,13217,13218,13219,13220,13221,13222,13223,13224,13225,13226,13227,13228,13229,13230,13231,13241,13258,13259,13260,13261,13262,13263,13272,176,177,178,179,190,191,459,2064,2065,2066,4169,4170,4171,9531,9792,10081,10545,11513,11514,11515,11516,11517,11528,11529,11530,11533,2380,3023,3025,3691,3693,3715,3716,5255,5522,5523,5524,5526,6067,6068,6071,6072,6073,6074,6343,6345,6346,6347,6348,6351,6454,7511,7513,7514,7515,7536,7538,7540,7541,7787,7788,7790,7791,7792,8084,8085,8086,8087,8257,8295,8296,8297,8298,8301,8302,8303,8371,8372,8373,8374,8589,8590,8591,8763,8764,8765,9398,9399,9400,9401,9402,9404,9405,10651,10652,10653,10654,10655,10656,10657,10750,10751,10752,10753,10754,10755,10756,10757,10758,10759,10760,11169,11171,11172,11173,11413,11417,11476,11477,11509,11510,11511,11561,11562,11563,12253,12254,12255,12282,12283,12286,12287,12288,12289,12290,12291,12292,12293,12294,12295,12379,12380,12381,12382,12383,12384,12385,12386,12909,12910,12911,12912,12921,12922,12923,12972,12973,12700,12701,7511,7984,8032,8033,10080,10587,10588,10589,10590,10591,10592,10593,10653,10658,10760,11099,11169,11171,11172,11173,12379,12380,12381,12382,12383,12384,12385,12386,12694,4865,8766,8767,10659,12389,12417,12418)) OR (categoryID IN (84,362,364,374,375,380,425,464,508,522,601,618,619,620,630,641,2)) ) AND ( enabled=1) ORDER BY sort_order , _name_sort LIMIT 120,40