aboutsummaryrefslogtreecommitdiff
path: root/sql/base
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2017-04-11 23:57:29 -0300
committerfunjoker <funjoker109@gmail.com>2020-04-27 12:25:52 +0200
commit7dcc185a151745c8a12e23708bb5d457e5796032 (patch)
tree846690eec6d891fd501542f236b929f9de8f9d98 /sql/base
parenta2ee35d9a3c390e32ddbe758ec9b2cdc14569970 (diff)
Core/Instance: stop updating the instance resettimes based on creature respawns
- Rather update normal instance reset time to 2 hours after last creature kill - This fixes yet another integer overflow due to the possibility of having time_t max showing up - Also change respawntime and resettime fields to bigint on respawn/instance related tables - Start using prepared statements on the InstanceSaveMgr (cherry picked from commit 4c593f12caa162c1bfb831bdbed934bb39155ddb)
Diffstat (limited to 'sql/base')
-rw-r--r--sql/base/characters_database.sql11
1 files changed, 6 insertions, 5 deletions
diff --git a/sql/base/characters_database.sql b/sql/base/characters_database.sql
index b23013bc0d1..625ad4ef783 100644
--- a/sql/base/characters_database.sql
+++ b/sql/base/characters_database.sql
@@ -1895,7 +1895,7 @@ DROP TABLE IF EXISTS `creature_respawn`;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `creature_respawn` (
`guid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier',
- `respawnTime` int(10) unsigned NOT NULL DEFAULT '0',
+ `respawnTime` bigint(20) unsigned NOT NULL DEFAULT '0',
`mapId` smallint(10) unsigned NOT NULL DEFAULT '0',
`instanceId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Instance Identifier',
PRIMARY KEY (`guid`,`instanceId`),
@@ -1969,7 +1969,7 @@ DROP TABLE IF EXISTS `gameobject_respawn`;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `gameobject_respawn` (
`guid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier',
- `respawnTime` int(10) unsigned NOT NULL DEFAULT '0',
+ `respawnTime` bigint(20) unsigned NOT NULL DEFAULT '0',
`mapId` smallint(10) unsigned NOT NULL DEFAULT '0',
`instanceId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Instance Identifier',
PRIMARY KEY (`guid`,`instanceId`),
@@ -2616,7 +2616,7 @@ DROP TABLE IF EXISTS `instance`;
CREATE TABLE `instance` (
`id` int(10) unsigned NOT NULL DEFAULT '0',
`map` smallint(5) unsigned NOT NULL DEFAULT '0',
- `resettime` int(10) unsigned NOT NULL DEFAULT '0',
+ `resettime` bigint(20) unsigned NOT NULL DEFAULT '0',
`difficulty` tinyint(3) unsigned NOT NULL DEFAULT '0',
`completedEncounters` int(10) unsigned NOT NULL DEFAULT '0',
`data` tinytext NOT NULL,
@@ -2647,7 +2647,7 @@ DROP TABLE IF EXISTS `instance_reset`;
CREATE TABLE `instance_reset` (
`mapid` smallint(5) unsigned NOT NULL DEFAULT '0',
`difficulty` tinyint(3) unsigned NOT NULL DEFAULT '0',
- `resettime` int(10) unsigned NOT NULL DEFAULT '0',
+ `resettime` bigint(20) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`mapid`,`difficulty`),
KEY `difficulty` (`difficulty`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@@ -3773,7 +3773,8 @@ INSERT INTO `updates` VALUES
('2020_04_20_00_characters.sql','977B5E0C894E0A7E80B2A9626F17CA636A69BD22','RELEASED','2020-04-20 19:08:18',0),
('2020_04_24_00_characters.sql','85E2E0395A9457A53D73A9E0A7BB39B7E4C429BF','RELEASED','2020-04-24 22:04:59',0),
('2020_04_25_00_characters_2017_04_03_00_characters.sql','00FA3EFADAF807AC96619A3FE47216E21C3FCB19','RELEASED','2020-04-25 00:00:00',0),
-('2020_04_26_00_characters_2017_04_12_00_characters.sql','86AA94DA9B1EA283101100886C10F648C0CE6494','RELEASED','2020-04-26 00:00:00',0);
+('2020_04_26_00_characters_2017_04_12_00_characters.sql','86AA94DA9B1EA283101100886C10F648C0CE6494','RELEASED','2020-04-26 00:00:00',0),
+('2020_04_26_01_characters_2017_04_12_01_characters.sql','5A8A1215E3A2356722F52CD7A64BBE03D21FBEA3','RELEASED','2020-04-26 00:00:00',0);
/*!40000 ALTER TABLE `updates` ENABLE KEYS */;
UNLOCK TABLES;