[Database] Fix multi-statement error reporting (#3425)

This commit is contained in:
Chris Miles
2023-06-19 11:55:32 -05:00
committed by GitHub
parent 66e377fd4a
commit 6d7beb1796
4 changed files with 83 additions and 12 deletions
+21
View File
@@ -51,6 +51,7 @@ void MySQLRequestResult::ZeroOut()
m_RowCount = 0;
m_RowsAffected = 0;
m_LastInsertedID = 0;
m_error_message = "";
}
MySQLRequestResult::~MySQLRequestResult()
@@ -137,3 +138,23 @@ MySQLRequestResult& MySQLRequestResult::operator=(MySQLRequestResult&& other)
other.ZeroOut();
return *this;
}
uint32 MySQLRequestResult::GetErrorNumber() const
{
return m_ErrorNumber;
}
void MySQLRequestResult::SetErrorNumber(uint32 m_error_number)
{
m_ErrorNumber = m_error_number;
}
const std::string &MySQLRequestResult::GetErrorMessage() const
{
return m_error_message;
}
void MySQLRequestResult::SetErrorMessage(const std::string &m_error_message)
{
MySQLRequestResult::m_error_message = m_error_message;
}