Error writing file '/tmp/MYHkGI7E' (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 (258,1104,1106,1160,1206,1229,1694,1760,2400,2483,3419,5076,5096,5098,5104,147,148,151,152,178,179,188,190,191,192,194,256,258,454,457,459,461,621,1104,1106,1213,1465,1823,1824,1826,1879,1959,1962,1963,1988,1990,1991,2016,2024,2026,2031,2043,2044,2064,2065,2066,2080,2138,2139,2140,2158,2160,2336,2338,2339,2396,2418,2424,2500,2501,2513,2514,2577,2639,2673,2679,2707,2762,2818,2837,2841,2843,2844,2845,2846,3446,3447,3472,3473,3474,3475,3698,3699,3700,3701,3702,3711,3838,3839,3840,3841,3842,3843,3844,3957,3977,3978,3979,3980,3981,3982,4107,4108,4110,4111,4169,4170,4171,4181,4193,4345,4383,4391,4392,4393,4401,4402,4403,4404,4409,4410,4411,4414,4415,4416,4417,4418,4430,4432,4433,4434,4436,4437,4438,4589,4597,4598,4599,4603,4604,4695,4789,4790,4791,4792,4849,4852,4853,4854,4855,4869,4870,4871,4872,4873,4889,4959,4960,4961,4962,4985,5108,5113,5157,5221,5225,5227,5230,5235,5236,5237,5238,5239,5240,5241,5242,5243,5249,5250,5252,5253,5400,5401,5406,5604,5644,5647,5649,5650,5651,5652,5653,5654,6099,6207,6210,6226,6244,6245,6317,6318,6337,6338,6339,6340,6341,6342,6360,6362,6540,6586,6587,6588,6649,6668,6669,6700,6717,6718,6719,6728,6729,6730,6731,6784,6788,6792,6793,6794,6795,6796,6799,6871,6899,6900,6901,6934,6935,6937,7007,7008,7015,7036,7050,7051,7209,7210,7211,7212,7221,7225,7226,7227,7228,7229,7230,7238,7407,7408,7409,7599,7601,7615,7616,7621,7729,7802,7803,7838,7839,7840,7842,7843,7855,7856,7858,7859,7860,7861,7862,7871,7872,7887,7888,7893,7898,7899,7902,7955,7964,7978,7979,8154,8165,8299,8313,8317,8318,8319,8321,8322,8559,8560,8561,8718,8720,8721,8757,8758,8759,8794,8946,8947,8948,8949,8950,8985,8987,8988,9019,9020,9056,9064,9067,9449,9451,9453,9454,9456,9530,9531,9532,9543,9549,9578,9671,9672,9673,9791,9792,9906,9907,9977,10300,10301,10492,10932,10933,10934,10959,10960,10961,10962,10963,10964,10965,10966,10967,10971,11109,11110,11111,11163,11250,11251,11252,11400,11401,11402,11403,11513,11514,11515,11516,11517,11518,11519,11520,11521,11524,11526,11528,11529,11530,11532,11533,11534,11535,11536,11537,11538,11540,11541,11778,11780,11786,11793,12537,12538,12539,12540,12650,12652,12653,12654,12655,12656,12800,12801,12802,13313,1160,1228,1229,1248,1379,1405,1409,1414,1415,1735,1736,1755,1756,1757,1758,1759,1908,1912,1917,1918,1919,1920,1922,1938,1976,1989,2124,2125,2281,2282,2283,2318,2344,2345,2569,2659,2663,2664,2665,2666,2679,2849,2850,2851,2852,2855,2858,2874,2875,2876,3032,3033,3034,3035,3036,3037,3038,3040,3041,3046,3047,3048,3049,3050,3064,3065,3066,3067,3068,3069,3070,3071,3072,3073,3074,3075,3076,3077,3078,3079,3080,3411,3419,3434,3444,3445,3698,3699,3700,3701,3702,3711,3723,3724,3929,3977,3978,4226,4244,4291,4292,4293,4294,4304,4305,4306,4458,4589,4603,4604,4835,4939,4940,4941,4942,4954,4955,4956,4959,4981,4983,5177,5178,5181,5194,5196,5197,5201,5202,5312,5401,5408,5427,5429,5430,5432,5461,5462,5593,5594,5595,5596,5597,5598,5599,5600,5601,5602,5619,5620,5621,5627,5628,5629,5630,5631,5644,5647,5649,5650,5651,5652,5653,5654,5665,6024,6025,6026,6027,6030,6033,6034,6035,6099,6361,6435,6436,6439,6440,6558,6559,6602,6691,6692,6693,6694,6701,6702,6764,6847,6848,6849,6882,6883,6884,6893,6894,6895,6896,6898,6900,6901,6902,6916,6918,6938,7028,7029,7030,7031,7032,7035,7046,7127,7172,7173,7209,7210,7211,7212,7213,7214,7215,7221,7225,7226,7227,7228,7229,7238,7499,7522,7544,7545,7546,7547,7548,7549,7550,7798,7823,7855,7856,7858,7885,7887,7888,7937,7940,7941,7942,7943,8105,8108,8109,8110,8111,8112,8154,8155,8222,8223,8225,8243,8244,8304,8316,8317,8318,8320,8321,8322,8324,8325,8327,8423,8432,8433,8434,8448,8449,8450,8451,8452,8456,8457,8500,8539,8541,8543,8561,8562,8566,8567,8573,8574,8580,8664,8665,8704,8773,8774,8775,8781,8885,8886,8909,8910,8911,8912,8913,8914,8947,8948,8949,8950,8979,8987,8988,8990,8991,9019,9020,9021,9044,9045,9046,9163,9240,9322,9370,9373,9374,9377,9381,9540,9541,9542,9671,9672,9673,9837,9906,9907,9915,9916,9918,9919,9920,9921,9922,10727,10728,10959,10960,10961,10962,10963,10964,10965,10966,10967,10968,10970,10971,11105,11163,11267,11268,11339,11340,11341,11645,11689,11696,11697,11698,11699,11703,11704,11705,11706,11707,11726,11727,11792,11880,11890,11972,12081,12082,12425,12430,12475,12476,12477,12654,12655,12656,12745,12746,12748,12749,12960,12961,12962,12963,12964,12969,12970,12977,12978,13071,13072,13314,13315,13388,13389,13390,13391,13451,13452,13453,13454,13455,13456,13457,13458,13500,13505,13511,13512,13513,13564,178,179,192,457,459,1415,1962,1963,1988,1992,2031,2043,2044,2064,2065,2066,2080,2138,2139,2140,2158,2160,2208,2209,2211,2212,2234,2281,2336,2338,2396,2418,2419,2659,2707,3032,3033,3034,3037,3038,3046,3047,3048,3049,3050,3064,3065,3066,3072,3073,3074,3075,3080,3434,3444,3723,3724,3743,3744,4239,4240,4243,4244,4345,4393,4840,4869,4870,4871,4872,4941,4942,4944,4952,4955,4956,4983,4985,5177,5178,5194,5311,5312,5431,6308,6435,6891,6892,6895,6896,6917,7127,7467,7468,7469,7941,7978,7979,8243,8244,8266,8267,8268,8426,8541,8579,8665,8775,8909,8910,8911,9371,9532,9791,9792,10518,11038,11039,11069,11070,11073,11076,11077,11080,11084,11085,11528,11529,11530,11532,11533,11534,11535,11536,11537,11538,11540,11541,12425,12430,12431,13056,13071,13072,13115,13147,13153,13154,13176,13236,13237,13238,13239,13240,13541,13542,5929,5930,5943,5953,6210,6252,6253,6259,6276,6295,6297,6488,6489,7015,7055,7057,7066,7109,7111,7112,7118,7613,7798,7819,7820,7833,7834,7864,7865,7867,7871,7872,7882,7883,7884,7885,7886,7919,7930,7931,7932,8145,8146,8207,8211,8212,8221,8304,8562,8566,8567,8795,11525,11527,11665,11666,11689,11693,11701,11702,11792,11740,11741,5427,5429,5630,6297,6701,6702,7031,7032,7592,7593,7594,7595,7942,7943,8111,8112,8243,8244,8539,8573,8574,8838,8839,8840,8841,8853,9044,9045,9046,9163,9322,11237,11238,11247,11340,11699,11703,12638,12647,12648,12745,12920,12977,12978,13564,1778,6280,6898,7046,7613,7615,7616,7894,7895,7936,8572,8766,8767,8997,8998,10659,11524,11525,11526,11527,12389,12417,12418,13079,13080,4400,4401,4411,7015,7057,7884,7885,7919,7930,7931,11649,11665,11666,11701,11702,12523,13313,6279,6288,6289,6295,7415,7604,7605,7606,7815,7816,7817,7818,7867,8148,8149,8167,5919,6277,6278,6295,7340,7372,7403,7801,7867,5940,5941,5942,5943,5944,6274,6275,6276,6293,6294,6488,6489,7109,7111,7112,7114,7115,7807,7808,7809,7811,7812,7819,7820,7833,7834,7864,7865,8207,8211,8217,8218,8221,8795,11259,11260,11261,11262,11263,11761,11762,11763,11767,11768,11769,11770,11771,11773,11796,11825,11826,12050,12051,12052,12053,12106,12127,12128,12129,12823,12932,13046,13047,7878,7879,7880,7881,7882,7883,6259,6500,6501,8315,8337,8355,8702,8703,8796,9292,9293,10344,10345,11235,11827,6848,6849,7172,7173,7423,7879,8225,11341,11689,2064,2065,2066,5773,6210,6649,6684,6799,7898,7899,8559,8560,8757,8758,8759,9056,11504,11505,4402,4409,4417,4418,6244,6245,6540,6586,6588,6719,9549,9578,10930,178,179,459,6900,6901,7855,7856,7978,7979,8987,8988,9532,9792,10545,11528,11529,11530,11532,11533,11534,11535,4889,7860,7861,9556,4400,4873,5225,5238,5243,5401,6361,6938,6939,7406,7600,7602,7729,7841,8155,8316,8320,8719,8721,9020,9021,9548,9550,9979,10968,10970,11781,11784)) OR (categoryID IN (197,198,230,321,333,433,581,582,583,584,588,423,437,438,439,440,441,442,448,172)) ) AND ( enabled=1) ORDER BY sort_order , _name_sort LIMIT 120,40