2013 - Lost connection to MySQL server during query

select distinct p.products_id, pd.products_name, IF(pg.customers_group_price IS NOT NULL,pg.customers_group_price, p.products_price) as products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from products p left join products_groups pg on p.products_id = pg.products_id and pg.customers_group_id like '%G%', products_description pd, specials s where p.products_status = '1' and p.products_id = s.products_id and pd.products_id = s.products_id and pd.language_id = '1' and s.status = '1' and p.products_group_access like '%G%' order by rand(), s.specials_date_added desc limit 10

TEP_DB_ERRORR

 Advance Search
 
Enter search keywords or item here
 Beads Catalogs
 Decorations
 Gemstone Beads
 Gemstone Beads (Agate)
 Gemstone Beads (Jade)
 Gemstone Beads (Jasper)
 Gemstone Beads (Quartz)
 Coral Beads
 Turquoise Beads
 Crystal Beads
 Glass Beads
 Lampwork Beads
 Pearl Beads
 Porcelain Beads
 Shell Beads
 Wood Beads
 Indonesia Beads
 Finished Jewelry
 Jewelry Supplies & Findings