diff options
author | Machiavelli <none@none> | 2010-09-12 11:02:58 +0200 |
---|---|---|
committer | Machiavelli <none@none> | 2010-09-12 11:02:58 +0200 |
commit | 0612359f4b1db405cb82708f4efa1a6eb8c3f9d5 (patch) | |
tree | 240ac9e5549089243480c76e31b9d66bde96b106 /src/server/shared/Database/QueryResult.h | |
parent | 1f7064efeee4773271ad649f5bc29af93423d502 (diff) |
Core/DBLayer:
- Fix a crash related to prepared resultset bind buffering. Fixes issue #3975
- Implement 64bit int fetching functions for preparedresultset
NOTE: *Still* experimental, use at own risk.
--HG--
branch : trunk
Diffstat (limited to 'src/server/shared/Database/QueryResult.h')
-rwxr-xr-x | src/server/shared/Database/QueryResult.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/server/shared/Database/QueryResult.h b/src/server/shared/Database/QueryResult.h index 7a503869cb1..bb1a4684acc 100755 --- a/src/server/shared/Database/QueryResult.h +++ b/src/server/shared/Database/QueryResult.h @@ -101,15 +101,17 @@ class ResultBind friend class PreparedResultSet; public: - ResultBind(MYSQL_STMT* stmt) : m_rBind(NULL), m_stmt(stmt), m_isNull(NULL), m_length(NULL), m_fieldCount(0) {} + ResultBind(MYSQL_STMT* stmt) : m_rBind(NULL), m_stmt(stmt), m_isNull(NULL), m_length(NULL), m_res(NULL), m_fieldCount(0) {} ~ResultBind() { + if (m_res) + mysql_free_result(m_res); // metadata + if (!m_fieldCount) return; CleanUp(); // Clean up buffer - mysql_stmt_free_result(m_stmt); } void BindResult(uint32& num_rows); @@ -205,6 +207,8 @@ class PreparedResultSet int16 GetInt16(uint32 index); uint32 GetUInt32(uint32 index); int32 GetInt32(uint32 index); + uint64 GetUInt64(uint32 index); + int64 GetInt64(uint32 index); float GetFloat(uint32 index); std::string GetString(uint32 index); |