Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

build fix for libmariadb #1193

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/server/shared/Database/QueryResult.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
3 changes: 2 additions & 1 deletion src/server/shared/Database/QueryResult.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <winsock2.h>
#endif
#include <mysql.h>
using sql_bool = typename std::remove_pointer<decltype(std::declval<MYSQL_BIND>().is_null)>::type;

class ResultSet
{
Expand Down Expand Up @@ -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();
Expand Down
Loading