Age | Commit message (Collapse) | Author |
|
|
|
new and edited sql updates through file lists and hashing. Detects renames, deletes and is able to create and auto import full databases. * cleanups in main.cpp of world & bnetserver * refactoring in DatabaseWorkerPool.h & MySQLConnection.cpp
Make sure you re-run cmake, because boost::iostreams was added as dependency.
Maybe you need to install libboost-iostreams1.55-dev on unix as well.
Import every update manual until (included) those INSERT IGNORE updates for each database.
Thanks DDuarte and Shauren for your amazing ideas, help and advises.
In hope that nobody gets a "Your database structure is not up to date..." anymore ,-)
Signed-off-by: Naios <naios-dev@live.de>
Signed-off-by: Nayd <dnpd.dd@gmail.com>
|
|
Fix transactions not being recommitted on dead-lock error (error code 1213) because of calling http://dev.mysql.com/doc/refman/5.0/en/mysql-errno.html after sending the ROLLBACK command. This way the returned error code was related to the ROLLBACK command, not the failed transaction.
(cherry picked from commit d4db0c15c7e59f7139619720be3c26a48e6ff259)
|
|
Happy new year
|
|
Replaced ACE base AutoPtr class with shared_ptr
Note: worldserver currently broken due to MapUpdater threading failure (ACE ofc, what else could it be)
|
|
Note: Not exactly sure how shutdown should be handled, currently the queue clears itself out before shutting down
This might need to be changed if the queue should be fully processed before being deleted
|
|
OVERRIDE, FINAL, DELETE_MEMBER
|
|
|
|
Happy new year.
|
|
Also added missing copyright to some files.
|
|
- added support for setting NULL column values to MySQL wrapper in core
- replaced nonstandard strdup function and manual memory management with std::string
- fixed bug in MySQLPreparedStatement::getQueryString method, it failed when string parameter contained embedded '?' symbols
- fixed memory leak in MySQLPreparedStatement::setString method
|
|
Happy new year.
|
|
|
|
it to Tokenizer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
allow core to output all the errors in prepared statements instead of aborting on first error.
|
|
|
|
asynchronous indexes at query logging or error output
- Add values to prepared statement query log messages
- Killed a bit Engrish and trailing white whitespaces
|
|
- Implement DatabaseWorkerPool::DirectCommitTransaction for synchronous transaction execution (as opposed to asynchronous/enqueued).
- Add MySQL errno 1213 "Deadlock found when trying to get lock; try restarting transaction" handler. If 1213 is called the core will retry to directly execute the transaction a maximum of 5 times.
|
|
explicit calls to MySQL::PrepareStatement. Now the core will show the raw query (without bound arguments) in related log entries instead of PreparedStatement id: X on database Y.
|
|
Happy new year.
|
|
- 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
|
|
connections and vice versa. Prevents allocating RAM that will never be used.
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
- 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
|
|
- Mainly affects item loading performance
- Reduces guild loading time a lot
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
const struct. This fixes the compile error.
--HG--
branch : trunk
|
|
and use relevant data in logging messages in its methods
--HG--
branch : trunk
|
|
culprits.
--HG--
branch : trunk
|
|
data in sql driver messages
--HG--
branch : trunk
|
|
Thanks to Spp for pointing out.
--HG--
branch : trunk
|
|
- DB Threading model update
* Get rid of ThreadBundleMask and bundled connection
* Implement configurable amount of Synch threads for databasepools
* Use modulus based algorithm to check for free synchronous connections instead of previous ¨get connection by thread key or bundlemask¨ feature
* Locks on mysql context objects are now managed outside the mysql query methods
Fixes issue #4058
Fixes issue #4059
Introduces a ton of more issues. Use at own risk. You were warned. Really.
Don´t forget to update your worldserver.conf
--HG--
branch : trunk
|
|
- Rewrite KeepAlive method for DatabaseWorkerPool. Use mysql_ping instead of explicit select queries, and also schedule KeepAlives for asynchronous threads.
NOTE: While the function is implemented and previous keepalive calls were transformed, it´s possible the keepalive call will need to be placed in several other locations in the code. Please leave feedback on whether or not this fixes your timeout issues.
Update issue #4062
--HG--
branch : trunk
|
|
- Rewrite Field class to be able to store both binary prepared statement data and data from adhoc query resultsets
- Buffer the data of prepared statements using ResultSet and Field classes and let go of mysql c api structures after PreparedResultSet constructor. Fixes a race condition and thus a possible crash/data corruption (issue pointed out to Derex, basic suggestion by raczman)
- Conform PreparedResultSet and ResultSet to the same design standards, and using Field class as data buffer class for both
* NOTE: This means the fetching methods are uniform again, using ¨Field* fields = result->Fetch();¨ and access to elements trough fields[x].
* NOTE: for access to the correct row in prepared statements, ¨Field* fields = result->Fetch();¨ must ALWAYS be called inside the do { }while(result->NextRow()) loop.
* NOTE: This means that Field::GetString() returns std::string object and Field::GetCString() returns const char* pointer.
Still experimental and all that jazz, not recommended for production servers until feedback is given.
--HG--
branch : trunk
|
|
- Declare the datatypes used to determine transaction element data (prepared statement/adhoc query string) on a generic level in SQLOperation.h
- Implement variable SQL element data for SQLQueryHolder class so it can execute both prepared statements and adhoc queries
- Make MySQLConnection::Query for adhoc queries return pointer to type instead of an autopointer, the autopointer is now applied on higher level code just like the function for querying prepared statements
--HG--
branch : trunk
|
|
* Rename QueryResult class to ResultSet
* Rename QueryResult_AutoPtr to QueryResult
* Declare ACE refcounted auto pointer for PreparedResultSet class
--HG--
branch : trunk
|
|
resultsets. (Implementation in upper level code not yet possible)
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
- Example implementation of prepared statement in ObjectMgr::SaveCreatureRespawntime
- #include "MYSQLThreading.h" -> #include "MySQLThreading.h" (*really* fixes Linux build)
--HG--
branch : trunk
|
|
- 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
|
|
- 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
|
|
Database Layer:
- Implement connection pooling: Instead of 1 delay thread per database, you can configure between 1 and 32 worker threads that have a seperate thread in the core and have a seperate connection to the MySQL server (based on raczman/Albator´s database layer for Trinitycore3)
- Implement a configurable thread bundle for synchroneous requests from seperate core threads (see worldserver.conf.dist for more info)
- Every mapupdate thread now has its seperate MySQL connection to the world and characters database
- Drop inconsistent PExecuteLog function - query logging will be implemented CONSISTENTLY later
- Drop current prepared statement interface - this will be done *properly* later
- You´ll need to update your worldserver.conf and authserver.conf
- You´re recommended to make a backup of your databases before using this.
* HIGHLY EXPERIMENTAL - USE AT OWN RISK *
* HIGHLY EXPERIMENTAL - USE AT OWN RISK *
etc.
--HG--
branch : trunk
|