Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ------------------------
- LATEST DETECTED DEADLOCK
- ------------------------
- 2021-09-21 18:29:53 0x7f7cacdba700
- *** (1) TRANSACTION:
- TRANSACTION 83328696162, ACTIVE 12 sec starting index read
- mysql tables in use 10, locked 10
- LOCK WAIT 7 lock struct(s), heap size 1136, 4 row lock(s), undo log entries 1
- MySQL thread id 110531904, OS thread handle 140263243085568, query id 3999163464 localhost 127.0.0.1 yii_doc Sending data
- UPDATE fin.fin_in
- LEFT JOIN yii_doc.supplier_storage ON NEW.storage_id = yii_doc.supplier_storage.id
- LEFT JOIN yii_doc.supplier ON yii_doc.supplier_storage.supplierID = yii_doc.supplier.id
- SET
- fin.fin_in.kol = NEW.count,
- fin.fin_in.cost_price = NEW.in_price_for_1,
- fin.fin_in.active_product = NEW.active,
- fin.fin_in.postavshik = yii_doc.supplier.short_name,
- fin.fin_in.supplier_id = yii_doc.supplier.id,
- fin.fin_in.PAY_way = IF (yii_doc.supplier.payment IS NULL, "расчет", "отсрочка"),
- fin.fin_in.storage_id = NEW.storage_id,
- fin.fin_in.storage_name = IFNULL(yii_doc.supplier_storage.`name`, 'не выбран')
- WHERE fin.fin_in.product_id = NEW.id
- *** (1) WAITING FOR THIS LOCK TO BE GRANTED:
- RECORD LOCKS space id 64685 page no 7 n bits 232 index PRIMARY of table `yii_doc`.`supplier_storage` trx id 83328696162 lock_mode X locks rec but not gap waiting
- *** (2) TRANSACTION:
- TRANSACTION 421746628952560, ACTIVE 15 sec fetching rows, thread declared inside InnoDB 1673
- mysql tables in use 67, locked 67
- 199556 lock struct(s), heap size 22847696, 3414401 row lock(s)
- MySQL thread id 110531627, OS thread handle 140173452748544, query id 3999157929 localhost 127.0.0.1 yii_doc Sending data
- INSERT INTO ppc.recommended
- (SELECT
- x.prices_all_id,
- x.GA_ID,
- x.dok_razdel_id,
- x.avg_orders,
- x.stars,
- x.qnt,
- if(x.dok_razdel_id<>y.dok_razdel_id or y.dok_razdel_id is null, @p_num3:=1, @p_num3:=@p_num3+1) product_rank,
- x.razdel_avg_orders,
- x.razdel_products,
- x.razdel_rank
- FROM
- (SELECT *, (@p_num1:=@p_num1 + 1) AS row_num
- FROM
- (SELECT
- y.prices_all_id,
- GA_ID,
- y.dok_razdel_id,
- y.avg_orders,
- if(avg( pr.star )>=4,1,0) star,
- avg( pr.star ) stars,
- y.kyiv_5,
- y.qnt,
- r.razdel_avg_orders,
- r.razdel_products,
- r.razdel_rank
- FROM
- (
- SELECT
- prices_all_id,
- GA_ID,
- dok_razdel_id,
- if(sum(if(isKyiv=1,avalaible,null))>5,1,null) kyiv_5,
- sum( avalaible ) qnt,
- avg_orders
- FROM
- (
- SELECT
- pa.id prices_all_id,
- dg.GA_ID GA_ID,
- max( dr.id ) dok_razdel_id,
- spa.id,
- ss.isKyiv,
- spa.avalaible,
- count(
- DISTINCT
- IF
- (
- *** (2) HOLDS THE LOCK(S):
- RECORD LOCKS space id 64685 page no 7 n bits 232 index PRIMARY of table `yii_doc`.`supplier_storage` trx id 421746628952560 lock mode S locks rec but not gap
- *** (2) WAITING FOR THIS LOCK TO BE GRANTED:
- RECORD LOCKS space id 70016 page no 34725 n bits 264 index PRIMARY of table `yii_doc`.`order_product` trx id 421746628952560 lock mode S locks rec but not gap waiting
- *** WE ROLL BACK TRANSACTION (1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement