Skip to content

Commit d9b854a

Browse files
committed
Core/Datastores: backported hotfix system implementation
1 parent 4bc9c07 commit d9b854a

File tree

87 files changed

+2224
-2248
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+2224
-2248
lines changed

revision_data.h.in.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
#define _BUILD_DIRECTORY R"(@BUILDDIR@)"
1111
#define _MYSQL_EXECUTABLE R"(@MYSQL_EXECUTABLE@)"
1212
#define _FULL_DATABASE "TDB_full_world_434.34_2018_09_15.sql"
13+
#define _HOTFIXES_DATABASE "TDB_full_hotfixes_434.01_2020_02_21.sql"
1314
#define VER_COMPANYNAME_STR "TrinityCore Developers"
14-
#define VER_LEGALCOPYRIGHT_STR "(c)2008-2018 TrinityCore"
15+
#define VER_LEGALCOPYRIGHT_STR "(c)2008-2020 TrinityCore"
1516
#define VER_FILEVERSION 0,0,0
1617
#define VER_FILEVERSION_STR "@rev_hash@ @rev_date@ (@rev_branch@ branch)"
1718
#define VER_PRODUCTVERSION VER_FILEVERSION

sql/create/create_mysql.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@ CREATE DATABASE `characters` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
66

77
CREATE DATABASE `auth` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
88

9+
CREATE DATABASE `hotfixes` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
10+
911
GRANT ALL PRIVILEGES ON `world` . * TO 'trinity'@'localhost' WITH GRANT OPTION;
1012

1113
GRANT ALL PRIVILEGES ON `characters` . * TO 'trinity'@'localhost' WITH GRANT OPTION;
1214

1315
GRANT ALL PRIVILEGES ON `auth` . * TO 'trinity'@'localhost' WITH GRANT OPTION;
16+
17+
GRANT ALL PRIVILEGES ON `hotfixes` . * TO 'trinity'@'localhost' WITH GRANT OPTION;

sql/create/drop_mysql.sql

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,16 @@ REVOKE ALL PRIVILEGES ON `auth` . * FROM 'trinity'@'localhost';
1212

1313
REVOKE GRANT OPTION ON `auth` . * FROM 'trinity'@'localhost';
1414

15+
REVOKE ALL PRIVILEGES ON `hotfixes` . * FROM 'trinity'@'localhost';
16+
17+
REVOKE GRANT OPTION ON `hotfixes` . * FROM 'trinity'@'localhost';
18+
1519
DROP USER 'trinity'@'localhost';
1620

1721
DROP DATABASE IF EXISTS `world`;
1822

1923
DROP DATABASE IF EXISTS `characters`;
2024

2125
DROP DATABASE IF EXISTS `auth`;
26+
27+
DROP DATABASE IF EXISTS `hotfixes`;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
DROP TABLE IF EXISTS `hotfix_data`;
2+
DROP TABLE IF EXISTS `keychain_db2`;
3+
DROP TABLE IF EXISTS `item_template`;
4+
DROP TABLE IF EXISTS `item_template_locale`;

src/common/GitRevision.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ char const* GitRevision::GetFullDatabase()
6868
return _FULL_DATABASE;
6969
}
7070

71+
char const* GitRevision::GetHotfixesDatabase()
72+
{
73+
return _HOTFIXES_DATABASE;
74+
}
75+
7176
#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS
7277
# ifdef _WIN64
7378
# define TRINITY_PLATFORM_STR "Win64"

src/common/GitRevision.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ namespace GitRevision
3232
TC_COMMON_API char const* GetSourceDirectory();
3333
TC_COMMON_API char const* GetMySQLExecutable();
3434
TC_COMMON_API char const* GetFullDatabase();
35+
TC_COMMON_API char const* GetHotfixesDatabase();
3536
TC_COMMON_API char const* GetFullVersion();
3637
TC_COMMON_API char const* GetCompanyNameStr();
3738
TC_COMMON_API char const* GetLegalCopyrightStr();

src/server/database/Database/DatabaseEnv.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@
2020
DatabaseWorkerPool<WorldDatabaseConnection> WorldDatabase;
2121
DatabaseWorkerPool<CharacterDatabaseConnection> CharacterDatabase;
2222
DatabaseWorkerPool<LoginDatabaseConnection> LoginDatabase;
23+
DatabaseWorkerPool<HotfixDatabaseConnection> HotfixDatabase;

src/server/database/Database/DatabaseEnv.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "Implementation/LoginDatabase.h"
2525
#include "Implementation/CharacterDatabase.h"
2626
#include "Implementation/WorldDatabase.h"
27+
#include "Implementation/HotfixDatabase.h"
2728

2829
#include "Field.h"
2930
#include "PreparedStatement.h"
@@ -37,5 +38,7 @@ TC_DATABASE_API extern DatabaseWorkerPool<WorldDatabaseConnection> WorldDatabase
3738
TC_DATABASE_API extern DatabaseWorkerPool<CharacterDatabaseConnection> CharacterDatabase;
3839
/// Accessor to the realm/login database
3940
TC_DATABASE_API extern DatabaseWorkerPool<LoginDatabaseConnection> LoginDatabase;
41+
/// Accessor to the hotfix database
42+
TC_DATABASE_API extern DatabaseWorkerPool<HotfixDatabaseConnection> HotfixDatabase;
4043

4144
#endif

src/server/database/Database/DatabaseLoader.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,3 +184,5 @@ template TC_DATABASE_API
184184
DatabaseLoader& DatabaseLoader::AddDatabase<CharacterDatabaseConnection>(DatabaseWorkerPool<CharacterDatabaseConnection>&, std::string const&);
185185
template TC_DATABASE_API
186186
DatabaseLoader& DatabaseLoader::AddDatabase<WorldDatabaseConnection>(DatabaseWorkerPool<WorldDatabaseConnection>&, std::string const&);
187+
template TC_DATABASE_API
188+
DatabaseLoader& DatabaseLoader::AddDatabase<HotfixDatabaseConnection>(DatabaseWorkerPool<HotfixDatabaseConnection>&, std::string const&);

src/server/database/Database/DatabaseLoader.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ class TC_DATABASE_API DatabaseLoader
4848
DATABASE_LOGIN = 1,
4949
DATABASE_CHARACTER = 2,
5050
DATABASE_WORLD = 4,
51+
DATABASE_HOTFIX = 5,
5152

52-
DATABASE_MASK_ALL = DATABASE_LOGIN | DATABASE_CHARACTER | DATABASE_WORLD
53+
DATABASE_MASK_ALL = DATABASE_LOGIN | DATABASE_CHARACTER | DATABASE_WORLD | DATABASE_HOTFIX
5354
};
5455

5556
private:

0 commit comments

Comments
 (0)