Commit Graph

139 Commits

Author SHA1 Message Date
Machiavelli
6fa05cfa3e Core/DBLayer: Last of the QueryResult related warnings on linux
--HG--
branch : trunk
2010-09-11 22:27:56 +02:00
Machiavelli
d1174be1fd Core/DBLayer: Fix gcc warnings related to changes added to QueryResult.h/cpp recently
--HG--
branch : trunk
2010-09-11 22:20:57 +02:00
Machiavelli
1de7e5bed1 Core/DBLayer:
* Example implementation of prepared statements with resultset in RealmList and AuthSocket code (selectively)
* Also correct a few bobo´s from previous commit.

--HG--
branch : trunk
2010-09-11 21:22:15 +02:00
Machiavelli
a41e99223e Core/DBLayer:
* Rename QueryResult class to ResultSet
* Rename QueryResult_AutoPtr to QueryResult
* Declare ACE refcounted auto pointer for PreparedResultSet class

--HG--
branch : trunk
2010-09-11 21:10:54 +02:00
Shauren
a52982195f Fixed compile
--HG--
branch : trunk
2010-09-11 12:15:34 +02:00
Machiavelli
1dce5b78d5 Core/DBLayer: Implement lower level classes for prepared statements with resultsets. (Implementation in upper level code not yet possible)
--HG--
branch : trunk
2010-09-11 09:17:14 +02:00
Machiavelli
d54225189e Core/DBLayer: Fix a warning
--HG--
branch : trunk
2010-09-06 17:55:12 +02:00
Spp
cdef980af4 Core: Fix some warnings
--HG--
branch : trunk
2010-09-06 15:23:08 +02:00
Machiavelli
1608ebf7bf Core/DBLayer: Move some syncrhonisation error prone methods into the guarded scope in MySQLConnection:Execute(PreparedStatement*)
--HG--
branch : trunk
2010-09-05 10:34:46 +02:00
Machiavelli
27c00a8cbb Core/DBLayer:
- Allow transactions to contain both raw ad-hoc queries and prepared statement elements
* When coding on high level code, just make sure you use the right argument type for Transaction::Append and the proper execution will be done automagically

--HG--
branch : trunk
2010-09-04 16:49:23 +02:00
Machiavelli
fd1c6c5440 Core/DBLayer: Add an assert in TransactionTask::Execute to make sure valid queries are held
Core/Logging: Tiny cleanup in sLog.outSQLDriver

--HG--
branch : trunk
2010-09-04 16:06:04 +02:00
silinoron
5179d3149a Core/Game: Fix remaining warnings on windows (and most likely almost all of the ones on *nix)
--HG--
branch : trunk
2010-09-03 21:55:57 -07:00
Machiavelli
5469af3775 Core/DBLayer: Add an assert to detetct calls to invalid prepared statements.
--HG--
branch : trunk
2010-09-03 17:30:23 +02:00
Machiavelli
273679c5ba Core/DBLayer
- Store threadbundlemask internally per database pool and prevent direct access to config file post startup
- Fix threadbundlemask flag checking for ReactorRunnable, WorldRunnable
- Remove CLI threadbundlemask flag, CLI doesn´t need a seperate mysql connection nor thread
- Remove unused Character Database connection from WorldSocketMgr / ReactorRunnable
- Add proper LoginDatabase connection to RA Runnable (soon to be overhauled)

Note: still experimental and not tested for live use

--HG--
branch : trunk
2010-09-03 10:52:32 +02:00
Machiavelli
387ee751a9 Core/DBLayer
- Add some small documentation on prepared statement defines naming contention (placed in the 3 database implementation header files so it can´t be missed)
- Remove obsolete mutex declaration in DatabaseWorkerPool (was unused as of recently)

--HG--
branch : trunk
2010-09-03 09:21:28 +02:00
runningnak3d
a15c45808c Core/Build: Fix non-PCH compile for Linux (don't know about Windows)
--HG--
branch : trunk
2010-09-02 17:55:55 -06:00
runningnak3d
7433768a55 Core/Build: Partial work of fixing non-PCH Linux compile
--HG--
branch : trunk
2010-09-02 17:19:53 -06:00
Machiavelli
7982cc0f7d Core/DBLayer:
- A few prepared statement implementations in authsocket as example.
- Add an ASSERT in MySQLConnection::Execute(PreparedStatement*) to catch faulty created statements

--HG--
branch : trunk
2010-09-03 01:00:49 +02:00
Machiavelli
2c1c391597 Core/DBLayer:
- Example implementation of prepared statement in ObjectMgr::SaveCreatureRespawntime
- #include "MYSQLThreading.h" -> #include "MySQLThreading.h" (*really* fixes Linux build)

--HG--
branch : trunk
2010-09-03 00:44:27 +02:00
Machiavelli
1e8a294659 Missing include from previous rev.
--HG--
branch : trunk
2010-09-03 00:08:20 +02:00
Machiavelli
39027133e4 Fix Linux build
--HG--
branch : trunk
2010-09-03 00:04:14 +02:00
Machiavelli
1198591bac Core/DBLayer:
- Add basic prepared statement interface (without implementation and thus without testing, without resultset support).
- Based on raczman/Albator´s work on TrinityCore3

Build:
- Add sLog define ¨hack¨ in DatbaseWorkerPool.h to fix some more sLog errors temporarily

FYI: Builds on windows

--HG--
branch : trunk
2010-09-02 20:54:43 +02:00
Shauren
cd182a1e8f Fixed build
Fixed wrong header includes in new database files, thx Thyros

--HG--
branch : trunk
2010-09-02 20:22:19 +02:00
Machiavelli
c47f45694f Core/DBLayer: Add Login-/Characters-/Worlddatabase class implementations
--HG--
branch : trunk
2010-09-02 17:56:49 +02:00
Machiavelli
5ef738c16e Core/DBLayer:
- Better way to shutdown worker thread, prevents a crash. Fixes issue #3696
- Delete missing file from previous rev

--HG--
branch : trunk
2010-09-02 17:55:03 +02:00
Machiavelli
0117af4c37 Core/DBLayer:
- Implement deriviate classes of MySQLConnection for every database type (world, realm, characters)
- Make DatabaseWorkerPool templatized and use the above mentioned classes as parameter
- Implementation of the new types in code
(This is in preparation of prepared statement interface)

--HG--
branch : trunk
2010-09-02 17:47:50 +02:00
Machiavelli
d2edf39feb Core/DBLayer: Remove as of recent redundant DatabaseWorkerPoolEnd operation
--HG--
branch : trunk
2010-09-02 16:45:33 +02:00
Spp
b9e19572c4 Core: Fix more warnings (very few left under linux 32)
--HG--
branch : trunk
2010-08-31 11:39:51 +02:00
Spp
e252b8abe7 Core: Fix more warnings
--HG--
branch : trunk
2010-08-30 23:07:14 +02:00
click
511d571d25 Buildsystem: Clean up target link-definitions a bit
--HG--
branch : trunk
2010-08-30 22:58:37 +02:00
click
2930c02198 Buildsystem: Update CMakeLists to use the proper check, not the old one...
--HG--
branch : trunk
2010-08-28 19:24:50 +02:00
Machiavelli
175fece073 Core/Logging:
- Implement sLog.outSQLDriver that will log SQL driver related events (non-content related).
- Queries will now be logged into this file as well instead of normal log file (requires debug build).
- Don´t forget to update your authserver.conf and worldserver.conf
Core/build:
- Fix non-PCH build

--HG--
branch : trunk
2010-08-26 21:50:54 +02:00
Machiavelli
082592034f Core/DBLayer:
- Add a better way to shutdown async threads in the threadpool (with thanks to Derex)
- Move mysql_library_end() to DatabaseWorkerPool destructor to prevent a crash accessing mysql context from other pools after closing one pool.
- Add some debug output to Init/End_MySQL_Connection functions

--HG--
branch : trunk
2010-08-26 20:55:09 +02:00
click
3c027962ba Buildsystem/Core: Adjust MySQL headers on relevant files to use simplified #include <mysql.h> instead of <mysql/mysql.h>
+ add support for compiling under MacOSX (thanks to elegos for the research)
NOTE: G3D requires a redefinition-hack under OSX, please see wiki for this info (dep-sources will not be changed)

--HG--
branch : trunk
2010-08-26 16:40:28 +02:00
azazel
5fa14f58dc Core/Cleanup:
* move repeating code into separate method for storing locale strings in ObjectMgr (copy/paste sucks, you know)
* fix 'signed/unsigned' warnings (at least in VS)
* fix some other warnings and cleanup relative code

--HG--
branch : trunk
2010-08-26 15:54:56 +06:00
Machiavelli
4185bb3181 DBLayer:
- Implement QueryCallback_2 template for ACE_Future callbacks using 2 parameters for the callback function
- Make MSG_LIST_STABLED_PETS´s handler use async query instead of blocking query

--HG--
branch : trunk
2010-08-24 19:04:25 +02:00
Spp
16d95d3115 Core: Fix some warnings
--HG--
branch : trunk
2010-08-23 07:51:19 +02:00
azazel
399e35f8f5 Core:
* fix "warning C4305: 'initializing' : truncation from 'double' to 'float'" warnings
* fix some other warnings here and there

--HG--
branch : trunk
2010-08-22 23:46:40 +06:00
click
d38135d1fd Core: Remove function-redefinitions for Windows (for now) - we'll sort this out later
--HG--
branch : trunk
2010-08-22 19:40:43 +02:00
click
5739c2efa9 Core: replace redirectional outStaticDebug with a copy of debug for future use and rewrite
--HG--
branch : trunk
2010-08-22 16:33:43 +02:00
click
670964803f Core: Fix more warnings, add new function sLog.outStaticDebug() that replaces DEBUG_LOG
--HG--
branch : trunk
2010-08-22 01:57:04 +02:00
Spp
572f7bbd1d Core: Remove "may be used uninitialized in this function", "unused parameter ‘xxx’" and "'xxx' defined but not used" warnings
--HG--
branch : trunk
2010-08-21 23:08:54 +02:00
Spp
c3343638cb Core: Remove lots warnings:
- All "'xxx' will be initialized after 'yyy' when initialized here"
- Some "unused variable"
- Some "enumeration value 'xxx' not handled in switch"

--HG--
branch : trunk
2010-08-21 20:08:47 +02:00
click
3febdd7884 Core: Remove warning-ignores from Common.h, and fix a shitload of retarded warnings that was hidden by it - NO MORE HIDING IN CORE THANKYOU!
--HG--
branch : trunk
2010-08-21 19:40:05 +02:00
click
50789b0461 Core: Remove already defined FD_SETSIZE (picked up from Common.h)
--HG--
branch : trunk
2010-08-21 16:37:30 +02:00
click
f7ad5b2624 Core/Build: Clean up more nonPCH-issues + fix a warning in Timer.h (unsigned/signed cast)
--HG--
branch : trunk
2010-08-21 09:53:04 +02:00
click
6939c92a76 Buildsystem/PCH: Remove DatabaseEnv.h from PCH-list, due to the insane amounts of times it seems to be "forgotten" in main sources
--HG--
branch : trunk
2010-08-21 08:23:53 +02:00
click
71b48cadc2 Core: Make shared build happily without PCH (there are still issues with game ++)
--HG--
branch : trunk
2010-08-21 08:08:49 +02:00
Machiavelli
994186f267 DB Layer:
- Make SQL Transactions actual objects used in code. (Thanks to Derex for the idea)
* Uncommitted transactions will be automatically rolled back and cleaned up using ACE_Refcounted_Auto_Ptr, so no need to call Rollback() in the code.
* Prevents recursive transactions and makes developers aware of transactions going on.
* Gets rid of unneccesary overhead iterating over a concurrent map.
- Some cleanups in affected code, including better usage of transaction control in AH / mail related code to prevent data loss.

*** Experimental, use at own risk, recommended to backup your DBs. ***

--HG--
branch : trunk
2010-08-21 03:19:25 +02:00
click
a7498d2f56 Core/Includes: Include ACE as an external dependency, not local (#include "ace/something.h" -> #include <ace/something.h>)
--HG--
branch : trunk
2010-08-21 02:27:12 +02:00