Disk full (/var/tmp/#sql_2f3c_2); waiting for someone to free some space...
query=SELECT c1.cat_id as c1_cat_id, c1.cat_discount as c1_cat_discount, c1.discount_limit as c1_discount_limit, c1.discount_qty as c1_discount_qty, c2.cat_id as c2_cat_id, c2.cat_discount as c2_cat_discount, c2.discount_limit as c2_discount_limit, c2.discount_qty as c2_discount_qty, c3.cat_id as c3_cat_id, c3.cat_discount as c3_cat_discount, c3.discount_limit as c3_discount_limit, c3.discount_qty as c3_discount_qty, c4.cat_id as c4_cat_id, c4.cat_discount as c4_cat_discount, c4.discount_limit as c4_discount_limit, c4.discount_qty as c4_discount_qty, c5.cat_id as c5_cat_id, c5.cat_discount as c5_cat_discount, c5.discount_limit as c5_discount_limit, c5.discount_qty as c5_discount_qty, c6.cat_id as c6_cat_id, c6.cat_discount as c6_cat_discount, c6.discount_limit as c6_discount_limit, c6.discount_qty as c6_discount_qty from categories as c1 LEFT JOIN categories AS c2 ON c2.cat_father_id = c1.cat_id LEFT JOIN categories AS c3 ON c3.cat_father_id = c2.cat_id LEFT JOIN categories AS c4 ON c4.cat_father_id = c3.cat_id LEFT JOIN categories AS c5 ON c5.cat_father_id = c4.cat_id LEFT JOIN categories AS c6 ON c6.cat_father_id = c5.cat_id where c1.cat_father_id=0 order by c1.cat_id, c2.cat_id, c3.cat_id, c4.cat_id, c5.cat_id, c6.cat_id asc