Commit Graph

253 Commits

Author SHA1 Message Date
Shauren
928443d899 Core: Removed more operator workarounds for ACE_Singleton (missed previously because of inconsistent naming)
--HG--
branch : trunk
2010-12-23 23:25:44 +01:00
click
a90aeb7657 Core: Adjust precompiled headers: Remove a few already defined/included headers in the shared PCH-file (already included from Common.h)
--HG--
branch : trunk
2010-12-23 17:20:56 +01:00
Machiavelli
76e111fa07 Core/DBLayer: Allow asynchronous queries with callbacks to be executed in prepared statement format as well.
+ Cleanup and documentation

--HG--
branch : trunk
2010-12-23 16:05:43 +01:00
linencloth
b89994fc3f Core/AuthServer: Little more query tuning. Missed by leak.
--HG--
branch : trunk
2010-12-23 08:03:57 +01:00
leak
2ee9a528ca Core/AuthServer: Little query tuning. Query by linencloth.
--HG--
branch : trunk
2010-12-23 06:15:53 +01:00
Xanadu
cfa26522ad Core: Fixed occasional wrong order of async operations at respawn time saving. Closes issue #5239.
DB schema: Sorted out a discrepancy in respawn time column format.

--HG--
branch : trunk
2010-12-23 05:49:23 +01:00
leak
3252836f91 Memory leak fixed
--HG--
branch : trunk
2010-12-22 21:53:24 +01:00
leak
6115b0bd5f Removing ProgressBars as they are performing badly on startup.
[**************************************************] 100%
R.I.P

--HG--
branch : trunk
2010-12-22 00:12:03 +01:00
click
2f80f1b2f8 Core/AuthServer: Allow reauthentication to the authserver on realm logout. Thanks to .. someone (webmaster?)
Fixes issue 4191.

--HG--
branch : trunk
2010-12-21 05:50:19 +01:00
Shauren
89f2870b97 Core/Auras: Save cast item guids for auras to db
--HG--
branch : trunk
2010-12-20 14:55:36 +01:00
leak
4c9cfa6739 Core/Buildsystem: Resolved quoting problem that caused gcc to spam warnings. Patch by click.
--HG--
branch : trunk
2010-12-20 02:23:55 +01:00
Machiavelli
60ce3fdbd2 Core/DBLayer: Add MySQL errno´s 1058 and 1062 (related to query-correctness) to handled errno´s (=doesn´t require further actions from the core)
--HG--
branch : trunk
2010-12-19 18:01:06 +01:00
Machiavelli
cbbcfa03f3 Core/DBLayer: Minor padding/alignment optimization in struct Field::data (16b->10b)
--HG--
branch : trunk
2010-12-19 17:48:47 +01:00
leak
fd694cd232 Streamlining loading functions for server startup
- Added a couple of timer outputs
- Improved code consistency between loading functions
- Progess bars should look and behave similar on all OS now (sLog.outString() is not needed anymore to replace the progress bar in log files)

--HG--
branch : trunk
2010-12-19 17:06:33 +01:00
click
9c35e10444 Core:DBLayer: Fix warning on GCC
--HG--
branch : trunk
2010-12-19 16:29:51 +01:00
Machiavelli
dfd82c2fad Core/DBLayer: Use mysql_set_character_set in MySQLConnection::Open instead of explicit string queries
Also possibly fix an absolutely useless warning on GCC

--HG--
branch : trunk
2010-12-19 16:13:45 +01:00
Machiavelli
e2a8dfffbe Core/DBLayer:
- Add generic HandleMySQLErrno() method.
- Add the ability to re-execute a certain statement if errorhandler resolved the situation succesfuly.
- Add support for MySQL errno´s 2006, 2013, 2048, 2055 - fixes automatic reconnection behaviour.
- Cleanup in affected code

NOTE: You should still be smart enough to configure your worldserver and authserver´s MaxPingTime to be lower than your MySQL´s wait_time.

--HG--
branch : trunk
2010-12-19 15:48:55 +01:00
Machiavelli
a093408360 Core/Player: Convert _SaveAuras to prepared statement format
--HG--
branch : trunk
2010-12-18 23:25:03 +01:00
Machiavelli
1cdeb4d057 Core/Player: Change equipmentset saving to use prepared statements.
Update issue #4550
Please try to re-reproduce

--HG--
branch : trunk
2010-12-17 17:29:16 +01:00
Machiavelli
d38b171391 Core/DBLayer: CharacterDB query CHAR_LOAD_PLAYER_ACTIONS_SPEC should be synchronous. Fixes a crash introduced in bd30ad7bd3
--HG--
branch : trunk
2010-12-17 16:54:38 +01:00
Machiavelli
04e5be6276 Core/DBLayer: Add some garbage collection on DatabaseWorkerPool shutdown (deleting SQLOperation objects)
--HG--
branch : trunk
2010-12-17 16:02:09 +01:00
Machiavelli
cb08ec0d74 Core/DBLayer: Don´t prepare asynchronous statements on synchronous connections and vice versa. Prevents allocating RAM that will never be used.
--HG--
branch : trunk
2010-12-17 15:55:16 +01:00
azazel
b39b8fdd0d DB Schema/Characters: removed columns auctionhouse.item_template, character_inventory.item_template, guild_bank_item.item_entry and mail_items.item_template and created item_instance.itemEntry column instead of them.
As a side effect moved related queries to prepared statements.
As one more side effect fixed not shown and lost mail items in returned expired mail (patch by Quriq14).

--HG--
branch : trunk
2010-12-15 14:08:12 +06:00
Machiavelli
80494d8f64 Core/DBLayer: Fix a possible crash in ProcessQueryCallback functions.
Closes issue #5095

--HG--
branch : trunk
2010-12-14 20:16:09 +01:00
click
2642894342 Core: Add new system for parallelizing client packet processing. Handle WorldSession updates in Map::Update() where we are safe to proceed. Patch by Ambal.
(And clean up tabs and whitespace while rummaging around in there)
Closes issue 5084.

--HG--
branch : trunk
2010-12-13 22:37:56 +01:00
Machiavelli
d5f5fa59ab Add missing declarations as of recent merge
--HG--
branch : trunk
2010-12-13 17:34:27 +01:00
Machiavelli
451159cac4 Fix possible compile error under linux
--HG--
branch : trunk
2010-12-13 17:21:06 +01:00
Machiavelli
bd77fb6d47 Fix a typo, thanks to sss.nevan
--HG--
branch : trunk
2010-12-13 17:05:01 +01:00
Machiavelli
976225a9dd Core/DBLayer: Implement global ExecuteOrAppend methods to DatabaseWorkerPool for executing queries in a diverse context (transaction or non transaction) - instead of local to Guild.cpp
--HG--
branch : trunk
2010-12-13 16:27:14 +01:00
Machiavelli
426b28e344 Fix wrong vsprintf parameter added in merge.
--HG--
branch : trunk
2010-12-13 16:18:07 +01:00
Machiavelli
f1a73e89b8 Merge
--HG--
branch : trunk
2010-12-13 16:13:32 +01:00
Machiavelli
ea29d87dcc Backed out changeset: 8326a2411148
--HG--
branch : trunk
2010-12-13 09:18:49 +01:00
azazel
d2d62eab50 Cleanup: implemented helper methods for manipulating percentage calculation and used it where appropriate (plus fixed some other warnings).
NOTE: Initially I just wanted to fix some warnings, but noticed that there is no common method for percentage calculation and various formulas are used many time in the code making it difficult to read and understand what the code actually does. So, I introduced several template methods for calculating percent values and adding those values to the original base. I replaced all the raw calculations throughout the code where found, but I could have missed something or could have made a mistake. So, please report any strange behaviour after this commit.
If you ask me why I did it: for the sake of consistency and exact understanding what code means. If you see CalculatePct method, you clearly understand, that it find the value of x percent of y. And you can easily express, for example, spell behviour "reduces smth by x%" by the means of a method instead of recalling school maths.

--HG--
branch : trunk
2010-12-11 20:37:38 +06:00
click
7e0dee8cb1 Fix build
--HG--
branch : trunk
2010-12-10 01:44:34 +01:00
Machiavelli
cac0664150 Fix linux compile.
Closes issue #5044

--HG--
branch : trunk
2010-12-06 20:06:31 +01:00
Machiavelli
f35c85acbe Core/DBLayer: Optimization in transaction code, and prevent a crash and memleak on shutdown.
--HG--
branch : trunk
2010-12-06 19:52:37 +01:00
Machiavelli
988a6f5c93 Core/DBLayer: Simplify template usage for DatabaseWorker
--HG--
branch : trunk
2010-12-06 19:28:05 +01:00
Spp
408fce1de6 Core: Some optimizations
- Declare some functions const
- Fix some mem leak
- Fix some resource leak
- Remove unused variables and functions
- Remove duplicate functions
- Reduce the scope of some variables
- Remove unused file

--HG--
branch : trunk
2010-12-06 02:07:53 +01:00
Machiavelli
b845b9d0fd Core/DBLayer:
- Make time format of MaxPingTime consistent between authserver and worldserver. Note that the value is in minutes, update your config files accordingly if needed.
- Remove obsolete atomic uint32 and prevent concurrent calls to vector::size() in DatabaseWorkerPool

--HG--
branch : trunk
2010-12-05 16:48:47 +01:00
Machiavelli
82ccfa9830 Really fix nonPCH build. With thanks to Aokromes
--HG--
branch : trunk
2010-12-04 23:42:23 +01:00
Machiavelli
533f27e732 Core: Fix non-PCH build (sorry)
--HG--
branch : trunk
2010-12-04 23:14:37 +01:00
Machiavelli
f5d6319d4d Core/DBLayer:
- Make the mysql connectionpool shared for async and syncrhonous connections.
- Allow configurable amount of connections for the pool
- Allow configurable amount of delaythreads
Note that delaythreads now only represent in-core threads. Whenever they execute a task they will pick a free connection from the pool instead of using their previously unique assigned connection.
The purpose of this design change is better distribution of SQL requests (no bottlenecks paired with idling) among available resources.
This also prevents a ¨memory waste¨ of preparing async prepared statements on synchronous connections (that were never called) - and vice versa. Now, connections aren´t explicitly async or synchronous, they serve both purposes.

Use at own risk, might cause instabilities.
Don´t forget to update your config files and clear your cmake cache.

--HG--
branch : trunk
2010-12-04 21:50:36 +01:00
click
bc098658c6 Core/Chat: Configure automatic owner declaration for custom chat channels (patch by leak)
Closes issue 4974.

--HG--
branch : trunk
2010-12-02 03:54:52 +01:00
Spp
6b5ff1ca25 Core: Fix some warnings
--HG--
branch : trunk
2010-11-22 10:10:46 +01:00
Machiavelli
733b72d29c Core/DBLayer: Add method DirectExecute for synchronous execution of prepared statements (without resultset)
Author: [M]axx

--HG--
branch : trunk
2010-11-21 18:50:11 +01:00
click
5cd3904059 Core/DBLayer: Move tables reserved_name, gameobject_respawn and creature_respawn from WORLD database to CHARACTER database as it's content is realm-specific and should be preserved (thanks to leak for the cleanup)
*** TO PRESERVE (COPY) THE DATA CONTAINED IN THE OLD TABLES, YOU MUST FOLLOW THE FOLLOWING SQL-RECIPE (REPLACE DATABASENAMES WHERE NEEDED!) ***

-- Move creature_respawn from world to characters db
INSERT INTO `characters`.`creature_respawn` (`guid`, `respawntime`, `instance`)
SELECT `guid, `respawntime` `instance` * FROM `world`.`creature_respawn`;
-- Remove creature_respawn table from world db
DROP TABLE `world`.`creature_respawn`;

-- Move gameobject_respawn from world to characters db
INSERT INTO `characters`.`gameobject_respawn` (`guid`, `respawntime`, `instance`)
SELECT `guid`, `respawntime`, `instance` FROM `world`.`gameobject_respawn`;
-- Remove creature_respawn table from world db
DROP TABLE `world`.`gameobject_respawn`;

-- Move reserved names from world to characters db
INSERT INTO `characters`.`reserved_name` (`name`)
SELECT `name` FROM `world`.`reserved_name`;
-- Remove reserved_names table from world db
DROP TABLE `world`.`reserved_name`;

*** THE ABOVE MUST BE DONE, OR EXISTING INSTANCES WILL BE FULLY RESPAWNED - YOU HAVE BEEN WARNED ***
Closes issue 4842. Closes issue 4849.

--HG--
branch : trunk
2010-11-19 15:53:14 +01:00
click
67fade84d3 Core/Commands: Enable SQL query logging by config and command )patch by leak)
Closes issue 4853.

--HG--
branch : trunk
2010-11-19 13:13:07 +01:00
click
67cd8d18e1 Core/Utilities: Fix ACE gettimeofday(); issue whe compiling without PCH on Windows platforms (thanks to leak)
--HG--
branch : trunk
2010-11-18 23:37:49 +01:00
click
b2f3b3d329 Core: Use portable ACE-methods to do millisec time-value calculation (patch by SilverIce)
(also avoids some unsafe code on non-Windows platforms)

--HG--
branch : trunk
2010-11-08 17:24:16 +01:00
Rat
57661c6d54 Core/SmartAI: swap menuid/actionid params in GOSSIP_SELECT event
- use proper sql ORDER to order script lines

--HG--
branch : trunk
2010-11-04 22:08:15 +01:00