diff --git a/src/server/shared/Database/QueryResult.cpp b/src/server/shared/Database/QueryResult.cpp index 25e94c84a8..8bd6b2cdea 100644 --- a/src/server/shared/Database/QueryResult.cpp +++ b/src/server/shared/Database/QueryResult.cpp @@ -36,10 +36,10 @@ m_length(NULL) } m_rBind = new MYSQL_BIND[m_fieldCount]; - m_isNull = new bool[m_fieldCount]; + m_isNull = new sql_bool[m_fieldCount]; m_length = new unsigned long[m_fieldCount]; - memset(m_isNull, 0, sizeof(bool) * m_fieldCount); + memset(m_isNull, 0, sizeof(m_isNull[0]) * m_fieldCount); memset(m_rBind, 0, sizeof(MYSQL_BIND) * m_fieldCount); memset(m_length, 0, sizeof(unsigned long) * m_fieldCount); diff --git a/src/server/shared/Database/QueryResult.h b/src/server/shared/Database/QueryResult.h index 620d3a7165..89a02072d7 100644 --- a/src/server/shared/Database/QueryResult.h +++ b/src/server/shared/Database/QueryResult.h @@ -15,6 +15,7 @@ #include #endif #include +using sql_bool = typename std::remove_pointer().is_null)>::type; class ResultSet { @@ -82,7 +83,7 @@ class PreparedResultSet MYSQL_STMT* m_stmt; MYSQL_RES* m_res; - bool* m_isNull; + sql_bool* m_isNull; unsigned long* m_length; void FreeBindBuffer();