24 Commits

Author SHA1 Message Date
Shauren
11a832fa8b Core/Database: Change database async thread shutdown to fix some corner cases leading to servers being stuck on shutdown (for example with exit() call) 2024-09-19 13:38:49 +02:00
Shauren
7fcb126fcb Core/Database: Remove future/promise typedefs from a public header (these are internal to database project) 2024-06-12 21:41:29 +02:00
Shauren
d958bfd0f3 Core/Database: Replace DatabaseWorker with asio io_context 2023-12-15 12:06:59 +01:00
Shauren
5c59e2a248 Core/Database: Refactor MySQLConnection constructors and async thread creation 2023-12-14 17:00:58 +01:00
Shauren
43584b4d1d Core/Misc: Fixed doxygen docs being attached to wrong fields 2023-08-27 01:58:50 +02:00
Shauren
7b31080258 Core/Misc: Modernize code a bit by replacing std::tie with either structured bindings or operator<=> 2023-04-06 17:46:58 +02:00
Shauren
439b027d48 Core/Misc: Cleanup unused includes 2022-02-13 15:07:00 +01:00
myuzhobcplidtkieno
de5f7edede Added the ability to use TLS when connecting to a database. (#24348)
* Added the ability to use TLS when connecting to a database.

* Trying to kickstart CI checks

* Revert the kickstart change

Co-authored-by: myuzhobcplidtkieno <myuzhobcplidtkieno@github.com>
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
(cherry picked from commit ae553f8966)
2022-01-01 01:07:52 +01:00
Shauren
ce9c7b477c Core/DBLayer: Refactor PreparedStatement class to not depend on MySQLPreparedStatement
(cherry picked from commit 5b0a32d164)
2021-12-22 20:59:50 +01:00
Shauren
b231903932 Core/Misc: Port all the refactors sneaked in master to 3.3.5 include cleanup port 2020-09-04 13:38:24 +02:00
Aokromes
b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
Shauren
c3a9d56b56 Core/DBLayer: Support using mysql 8 2019-11-01 16:21:14 +01:00
ariel-
d131bd1da0 Core/Database: Prepared statement parameter preallocation (#18999)
- Pass prepared statement size to the helper class to prevent runtime resizing.
- Rename CheckValidIndex -> AssertValidIndex
- Cached prepared size on the worker pool as it's shared among all connections
- Cached query data only for each connection, done lookup in map instead of possibly creating a new element
- Kill the prepared statement map, and store raw sql string on the MySQLPreparedStatement class
(This info is only used for logging, and there is no need of keeping a second container just for it)

(cherrypicked from affee140c6)
2019-08-17 20:04:14 +02:00
Shauren
f6e2b8cdc1 Core/DBLayer: Prevent committing transactions started on a different database 2019-07-27 10:52:33 +02:00
Shauren
e8e89f58fb Core/DBLayer: Prevent using prepared statements on wrong database 2019-07-27 01:00:37 +02:00
vincent-michael
5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
vincent-michael
7d00ae4045 Update copyright note for 2018
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
Shauren
7e538980a2 Core/Database: Include cleanup 2017-05-12 18:50:27 +02:00
Shauren
3a418a0bbc Core/Common: Include cleanup 2017-05-11 22:29:51 +02:00
vincent-michael
86b98686a9 Update copyright note for 2017
Happy new year
2017-01-01 16:23:13 +01:00
Naios
6cfea2d8f7 Core/Database: Converted the database library to a shared library.
* There is still the possibility to static link against database.
2016-03-24 01:28:59 +01:00
Naios
d0263c03fd Core/Database: Use RAII for resource management in MySQLConnection
* Prevents double deletion of MySQLConnection after errors
* The object stays valid after an error and will wait for a reconnect
* Also crash the server if 5 reconnects fail
* Corrects an issue where the server was crashed after one reconnect
  because mysql_thread_id was invoked with an invalid handle

(cherry picked from commit 62815c6e1c)
2016-03-03 01:51:50 +01:00
Vincent-Michael
478cc756eb Update copyright note for 2016
Happy new year (Again new year with idiots ...)
2016-01-01 00:34:25 +01:00
StormBytePP
1d2aafd39b Core/Build: Merge common library and move database out of shared 2015-08-21 17:52:42 +02:00