fix(Core/DatabseWorkerPool): implement DatabaseIncompatibleVersion to better support MariaDB (#18201)

* fix(Core): Rework Database Version Check for MariaDB support

* incorporate "smarter" version comparison

* rename function to be more accurate

* Factor magic numbers into defines. Revise comments

* clean up triple newline

* Doxygenify the docs

* remove blankspace

---------

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
This commit is contained in:
Mike Delago
2024-01-21 08:48:57 -05:00
committed by GitHub
parent e447351b0f
commit d0eae390b6
4 changed files with 96 additions and 11 deletions

View File

@@ -27,8 +27,8 @@
#include "Timer.h"
#include "Tokenize.h"
#include "Transaction.h"
#include "Util.h"
#include <errmsg.h>
#include <mysql.h>
#include <mysqld_error.h>
MySQLConnectionInfo::MySQLConnectionInfo(std::string_view infoString)
@@ -486,6 +486,11 @@ uint32 MySQLConnection::GetServerVersion() const
return mysql_get_server_version(m_Mysql);
}
std::string MySQLConnection::GetServerInfo() const
{
return mysql_get_server_info(m_Mysql);
}
MySQLPreparedStatement* MySQLConnection::GetPreparedStatement(uint32 index)
{
ASSERT(index < m_stmts.size(), "Tried to access invalid prepared statement index {} (max index {}) on database `{}`, connection type: {}",