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 (Agate)
  AB-Color Agate Beads
  Agate With Rhinestone
  Bamboo Leaf Agate Beads
  Black & White Agate Beads
  Black Agate Beads
  Blue Agate Beads
  Blue Lace Agate Beads
Botswana Agate Beads
  Brazilian Agate Beads
  Carnelian Beads
  Chrysanthemum Agate Beads
  Crazy Lace Agate Beads
  Dendrite Agate Beads
  Dragon Veins Agate Beads
  Druzy Geode Agate Beads
  Fire Crackle Agate Beads
  Flower Agate Beads
  Fossil Wood Agate Beads
  Frosted Agate Beads
  Gold Mountain Agate Beads
  Grass Agate Beads
  Green Agate Beads
  Green Magic Agate Beads
  Grey Agate Beads
  Indian Agate Beads
  Leopard Skin Agate Beads
  Line Agate Beads
  Madagascar Agate Beads
  Mexican Agate Beads
  Montana Agate Beads
  Morocco Agate Beads
  Moss Agate Beads
  Natural Fire Agate Beads
  Ocean Agate Beads
  Onyx Beads
  Peafowl Agate Beads
  Portuguese Agate Beads
  Purple Agate Beads
  Rainbow Agate Beads
  Rainforest Agate Beads
  Red Agate Beads
  Red Lightning Agate Beads
  Sakura agate Beads
  Silver Needle Agate Beads
  Tibetan Agate Dzi Beads
  Tree Agate Beads
  Turritella Agate Beads
  White Agate Beads
  Yellow Agate Beads
  Zebra Agate Beads
  Other Agate Beads
 Decorations
 Gemstone Beads
 Your Current Location
 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