Commit Graph

28 Commits

Author SHA1 Message Date
Treeston
9f97fdd31a Core/Common: Tokenizer -> Trinity::Tokenize (PR: #25327)
(cherry picked from commit 534a2388b7)
2022-02-04 00:27:14 +01:00
Peter Keresztes Schmidt
ad340466d0 Misc: Use [[fallthrough]] attribute instead of comment to mark intentional fallthroughs (#25054)
Related: #25006
(cherry picked from commit 85b5b842ca)
2022-01-23 22:02:03 +01:00
Shauren
3b4a2a0a94 Core/DBLayer: Fix compilation with mysql 8
(cherry picked from commit 579d41acc5)
2022-01-01 01:10:25 +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
9d060d23c1 DB: Convert databases to utf8mb4 2021-12-31 13:59:55 +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
58fb2ef631 Core/DB: Improved terrible assertion message
(cherry picked from commit eed9267685)
2021-12-16 00:54:53 +01:00
Giacomo Pozzoni
d37a8ea038 Core/Database: Close the MySQL connection only after getting the last error code
(cherry picked from commit 3230ca74d2)
2021-11-27 01:25:47 +01:00
jackpoz
43a41caafb Core/Misc: Fix GCC 8 warnings
(cherry picked from commit 1d04a3b216)
2021-11-24 23:40:15 +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
Shauren
1c52d5fff7 Core/Misc: Replace NULL with nullptr 2020-08-14 17:06:03 +02:00
Peter Keresztes Schmidt
bab5fd87a3 Core/Misc: Replace Trinity::make_unique with std (#24869) 2020-06-23 08:54:12 +02:00
Shauren
4d69cc1c56 Core/Misc: GCC build and warning fixes 2020-05-21 22:15:58 +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
r00ty-tc
75efb5d431 Core/Database: Correction for later MariaDB version
- Removed unused define CR_INVALID_CONN_HANDLE which was removed entirely in more modern MariaDB versions

(cherry picked from commit 2a7a1b27d5)
2019-07-15 15:08:19 +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
ae5696ef2b Build fix for mysql 5.6 and older 2017-05-13 21:02:37 +02:00
Shauren
7e538980a2 Core/Database: Include cleanup 2017-05-12 18:50:27 +02:00
vincent-michael
86b98686a9 Update copyright note for 2017
Happy new year
2017-01-01 16:23:13 +01:00
jackpoz
555ac389e2 Server/Database: Reduce differences between 3.3.5 and 6.x branches
Code functionality shouldn't have been modified.
2016-08-10 17:06:16 +02: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