Первые дедлоки

*** (1) TRANSACTION:
UPDATE b_sale_product2product p2p, b_sale_basket b, b_sale_basket b1
  SET  p2p.CNT = p2p.CNT + 1
  WHERE b.ORDER_ID = b1.ORDER_ID AND
          b.ID <> b1.ID AND
          b.ORDER_ID = 33989 AND
          p2p.PRODUCT_ID = b.PRODUCT_ID AND
          p2p.PARENT_PRODUCT_ID = b1.PRODUCT_ID
 
*** (2) TRANSACTION:
UPDATE b_sale_product2product p2p, b_sale_basket b, b_sale_basket b1
  SET  p2p.CNT = p2p.CNT + 1
  WHERE b.ORDER_ID = b1.ORDER_ID AND
          b.ID <> b1.ID AND
          b.ORDER_ID = 33990 AND
          p2p.PRODUCT_ID = b.PRODUCT_ID AND
          p2p.PARENT_PRODUCT_ID = b1.PRODUCT_ID
Печать/экспорт