1041: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space
select DISTINCTROW cat_brands.name as bname, cat_brands.id from cat_goods, cat_brands where cat_goods.pid="56031" and cat_goods.bid=cat_brands.id order by bname asc