mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-17 13:39:46 -04:00
Core/DataStores: Speedup loading hotfix database and change hotfix database character set to utf8mb4
This commit is contained in:
@@ -67,10 +67,10 @@ char* DB2DatabaseLoader::Load(uint32& records, char**& indexTable, char*& string
|
||||
stringHolders = nullptr;
|
||||
|
||||
// Resize index table
|
||||
// database query *MUST* contain ORDER BY `index_field` DESC clause
|
||||
uint32 indexTableSize = (*result)[indexField].GetUInt32() + 1;
|
||||
if (indexTableSize < records)
|
||||
indexTableSize = records;
|
||||
uint32 indexTableSize = records;
|
||||
if (PreparedQueryResult maxIdResult = HotfixDatabase.Query(HotfixDatabase.GetPreparedStatement(HotfixDatabaseStatements(_loadInfo->Statement + 1))))
|
||||
if ((*maxIdResult)[0].GetUInt32() > records)
|
||||
indexTableSize = (*maxIdResult)[0].GetUInt32();
|
||||
|
||||
if (indexTableSize > records)
|
||||
{
|
||||
@@ -202,7 +202,7 @@ char* DB2DatabaseLoader::Load(uint32& records, char**& indexTable, char*& string
|
||||
|
||||
void DB2DatabaseLoader::LoadStrings(uint32 locale, uint32 records, char** indexTable, std::vector<char*>& stringPool)
|
||||
{
|
||||
HotfixDatabasePreparedStatement* stmt = HotfixDatabase.GetPreparedStatement(HotfixDatabaseStatements(_loadInfo->Statement + 1));
|
||||
HotfixDatabasePreparedStatement* stmt = HotfixDatabase.GetPreparedStatement(HotfixDatabaseStatements(_loadInfo->Statement + 2));
|
||||
stmt->setString(0, localeNames[locale]);
|
||||
PreparedQueryResult result = HotfixDatabase.Query(stmt);
|
||||
if (!result)
|
||||
|
||||
Reference in New Issue
Block a user