Core/DBLayer: make use of return result of Connection::Open method and allow core to output all the errors in prepared statements instead of aborting on first error.

This commit is contained in:
Azazel
2011-04-07 15:30:38 +06:00
parent 770c8a950e
commit 4db04b63dd
9 changed files with 39 additions and 57 deletions

View File

@@ -121,10 +121,14 @@ class MySQLConnection
MySQLPreparedStatement* GetPreparedStatement(uint32 index);
void PrepareStatement(uint32 index, const char* sql, ConnectionFlags flags);
bool PrepareStatements();
virtual void DoPrepareStatements() = 0;
protected:
std::vector<MySQLPreparedStatement*> m_stmts; //! PreparedStatements storage
PreparedStatementMap m_queries; //! Query storage
bool m_reconnecting; //! Are we reconnecting?
bool m_prepareError; //! Was there any error while preparing statements?
private:
bool _HandleMySQLErrno(uint32 errNo);