Commit Graph

156 Commits

Author SHA1 Message Date
Machiavelli
27dd112c97 Core/DBLayer: Add an assert to trace down when a prepared statement creation has failed (99% it will be because of a bad query) - to prevent crashes at a later stage
--HG--
branch : trunk
2010-09-19 10:36:48 +02:00
silinoron
65a50ed3a2 Core/DBLayer: Some more prepared statements in ObjectMgr.
Core/ObjectMgr: Some additional cleanup.

--HG--
branch : trunk
2010-09-18 19:49:17 -07:00
silinoron
1e127eef73 Core/DBLayer: Change some regular statements to prepared statements.
Patch by thyros82@gmx.de.
Fixes issue #3774

--HG--
branch : trunk
2010-09-18 19:21:03 -07:00
linencloth
ae13e7354a Core/DBLayer: Fix a typo. Author: 41782992@qq.com
Fixes issue 4071.

--HG--
branch : trunk
2010-09-18 15:34:01 +02:00
Machiavelli
49dc1e55de Core/Utils: Fix a crash in vutf8printf. Author: Vladimir
--HG--
branch : trunk
2010-09-18 11:29:09 +02:00
Shauren
6ba1aec80c Core/Pools: Converted quest-related pool queries into prepared statements
--HG--
branch : trunk
2010-09-17 21:01:58 +02:00
click
726e5cf466 Buildsystem/Core: Add new build-flag WITH_SQLDEBUG - adds support for enabling/disabling SQL-query logging
--HG--
branch : trunk
2010-09-17 20:36:29 +02:00
linencloth
d8a854d6e0 Core: Cleanup locale handling.
It also fixes the recent problem of strange strings.

--HG--
branch : trunk
2010-09-17 07:04:29 +02:00
Shauren
102e51d620 Core/Pools: Implemented quest pooling
Core/DBLayer: Added GetNumRows() method to PreparedResultSet

--HG--
branch : trunk
2010-09-14 13:56:27 +02:00
Machiavelli
88f378e7ae Core/DBLayer: Fix a memory leak in prepared statement parameter/result binds. Original author: raczman
--HG--
branch : trunk
2010-09-13 17:07:27 +02:00
Shauren
e0ffae436c Core/Quests: Fixed remaining issues with quest crediting (note: previous commits did not introduce issues, only revealed them)
Core/DBLayer: Fixed more compile warnings
Core/Spells: Corrected code style from revision 634af79146

Closes issue #3956.

--HG--
branch : trunk
2010-09-12 19:17:58 +02:00
click
976cc3f8c4 Core/DBLayer: Make GCC happy (initialize variables in the correct order in ResultBind()
--HG--
branch : trunk
2010-09-12 18:52:06 +02:00
Machiavelli
123163dc41 Core/DBLayer: Check for potential mysql client/server version mismatch. Version mismatch may lead to undefined behaviour with prepared statements.
--HG--
branch : trunk
2010-09-12 15:57:36 +02:00
Machiavelli
bb8438c09b Core/DBLayer: Add GetCString method for PreparedResultSet (dynamic copy is responsibility of the high level code)
--HG--
branch : trunk
2010-09-12 15:11:08 +02:00
Machiavelli
6a4c798867 Core/DBLayer: Replace all ad-hoc queries in AuthSocket with prepared statements
--HG--
branch : trunk
2010-09-12 11:06:26 +02:00
Machiavelli
0612359f4b Core/DBLayer:
- Fix a crash related to prepared resultset bind buffering. Fixes issue #3975
- Implement 64bit int fetching functions for preparedresultset
NOTE: *Still* experimental, use at own risk.

--HG--
branch : trunk
2010-09-12 11:02:58 +02:00
click
bf664b7a44 Cleanup/Core: Remove whitespace and tabs
--HG--
branch : trunk
2010-09-12 01:40:27 +02:00
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