Core/DBLayer: Define prepared statements in an array per database instead of 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.
This commit is contained in:
1 parent
04d7476087
commit
c4cac049b4
8 files changed
+322
-288
No files matched your search
@@ -60,6 +60,13 @@ struct MySQLConnectionInfo
|
||||
std::string port_or_socket;
|
||||
};
|
||||
|
||||
struct PreparedStatementTable
|
||||
{
|
||||
uint32 index;
|
||||
const char* query;
|
||||
ConnectionFlags type;
|
||||
};
|
||||
|
||||
class MySQLConnection
|
||||
{
|
||||
template <class T> friend class DatabaseWorkerPool;
|
||||
@@ -104,10 +111,11 @@ class MySQLConnection
|
||||
|
||||
MYSQL* GetHandle() { return m_Mysql; }
|
||||
MySQLPreparedStatement* GetPreparedStatement(uint32 index);
|
||||
void PrepareStatement(uint32 index, const char* sql, bool async = false);
|
||||
void PrepareStatement(uint32 index, const char* sql, ConnectionFlags flags);
|
||||
|
||||
protected:
|
||||
std::vector<MySQLPreparedStatement*> m_stmts; //! PreparedStatements storage
|
||||
PreparedStatementTable const * m_statementTable; //! Static index/query pairs
|
||||
bool m_reconnecting; //! Are we reconnecting?
|
||||
|
||||
private:
|
||||
|
||||
Reference in new issue
Block a user