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
Gemstone Beads (Quartz)
  Black Quartz Beads
  Blue Sponge Quartz Beads
  Cherry Quartz Beads
  Clear Quartz Beads
Cloudy Quartz Beads
  Crackle Quartz Beads
  Diopside Quartz Beads
  Gold Sand Quartz Beads
  Green Quartz Beads
  Lemon Quartz Beads
  Lodolite Quartz Beads
  Mica Quartz Beads
  Moss Quartz Beads
  Multi-colored Quartz Beads
  Olive Quartz Beads
  Opal Quartz Beads
  Phantom Quartz Beads
  Pink Quartz Beads
  Pyrite Quartz Beads
  Rabbit Hair Quartz Beads
  Red Quartz Beads
  Rose Quartz Beads
  Rutilated Quartz Beads
  Scenic Quartz Beads
  Seaweed Quartz Beads
  Smoky Quartz Beads
  Strawberry Quartz Beads
  Tanzanite Quartz Beads
  Topaz Quartz Beads
 Decorations
 Gemstone Beads
 Gemstone Beads (Agate)
 Gemstone Beads (Jade)
 Gemstone Beads (Jasper)
 Your Current Location
 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