server/sql/updates/11704_01_characters_auction.sql
VladimirMangos 0f0fa22607 [11704] Resolve possible crash in auction code for paiment pending state.
Source of crash in sharing item object for sent mail to new owner
and in same time use it in still existed auction for show pending paiment.
Crash possible if new onwer get mail in less hour delay and will drop item
at receive.

Solution: Added fields in memory auction object and table `auction` for
store item stack size and random property id. This let not use auction item
except points where item send to owner at expire and new owner at
buyout/timeout auction with bid.
2011-07-02 04:23:24 +04:00

10 lines
542 B
SQL

ALTER TABLE character_db_version CHANGE COLUMN required_11620_01_characters_character_equipmentsets required_11704_01_characters_auction bit;
ALTER TABLE `auction`
DROP KEY `item_guid`,
ADD COLUMN `item_count` int(11) unsigned NOT NULL default '0' AFTER `item_template`,
ADD COLUMN `item_randompropertyid` int(11) NOT NULL default '0' AFTER `item_count`;
UPDATE auction, item_instance
SET auction.item_count = SUBSTRING_INDEX(SUBSTRING_INDEX(item_instance.data, ' ', 14 + 1), ' ', -1)
WHERE auction.itemguid = item_instance.guid;