Core/DBLayer: Proper core-side handling of MySQL errno 1213 to prevent a snowballeffect (until innodb_lock_wait_timeout)
This commit is contained in:
@@ -256,12 +256,8 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
|
||||
pl->MoveItemFromInventory(items[i]->GetBagSlot(), item->GetSlot(), true);
|
||||
|
||||
item->DeleteFromInventoryDB(trans); // deletes item from character's inventory
|
||||
item->SetOwnerGUID(rc);
|
||||
item->SaveToDB(trans); // recursive and not have transaction guard into self, item not in inventory and can be save standalone
|
||||
// owner in data will set at mail receive and item extracting
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SET_ITEM_OWNER);
|
||||
stmt->setUInt32(0, GUID_LOPART(rc));
|
||||
stmt->setUInt32(1, item->GetGUIDLow());
|
||||
trans->Append(stmt);
|
||||
|
||||
draft.AddItem(item);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user