Skip to content

Commit

Permalink
Revert "Fix build with MySQL 8"
Browse files Browse the repository at this point in the history
This reverts commit c7ab092.
  • Loading branch information
loonycyborg committed Oct 24, 2019
1 parent c7ab092 commit ebe169e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/server/mysql_prepared_statement.ipp
Expand Up @@ -39,7 +39,7 @@ struct sql_error : public game::error
// MYSQL_BIND structure returned. It's caller's responsibility
// to ensure that argument's lifetime doesn't end before mysql
// is done with those MYSQL_BINDs
static MYSQL_BIND make_bind(const std::string& str, bool* is_null = 0)
static MYSQL_BIND make_bind(const std::string& str, my_bool* is_null = 0)
{
MYSQL_BIND result;
memset(&result, 0, sizeof (MYSQL_BIND));
Expand All @@ -52,7 +52,7 @@ static MYSQL_BIND make_bind(const std::string& str, bool* is_null = 0)
return result;
}

static MYSQL_BIND make_bind(char* str, std::size_t* len, bool* is_null = 0)
static MYSQL_BIND make_bind(char* str, std::size_t* len, my_bool* is_null = 0)
{
MYSQL_BIND result;
memset(&result, 0, sizeof (MYSQL_BIND));
Expand All @@ -65,7 +65,7 @@ static MYSQL_BIND make_bind(char* str, std::size_t* len, bool* is_null = 0)
return result;
}

static MYSQL_BIND make_bind(int& i, bool* is_null = 0)
static MYSQL_BIND make_bind(int& i, my_bool* is_null = 0)
{
MYSQL_BIND result;
memset(&result, 0, sizeof (MYSQL_BIND));
Expand All @@ -76,7 +76,7 @@ static MYSQL_BIND make_bind(int& i, bool* is_null = 0)
return result;
}

static MYSQL_BIND make_bind(unsigned int& i, bool* is_null = 0)
static MYSQL_BIND make_bind(unsigned int& i, my_bool* is_null = 0)
{
MYSQL_BIND result;
memset(&result, 0, sizeof (MYSQL_BIND));
Expand All @@ -99,7 +99,7 @@ template<> std::string fetch_result<std::string>(MYSQL_STMT* stmt, const std::st
char* buf = nullptr;
std::string result;
std::size_t len = 0;
bool is_null;
my_bool is_null;
MYSQL_BIND result_bind[1] = { make_bind(buf, &len, &is_null) };

if(mysql_stmt_bind_result(stmt, result_bind) != 0)
Expand Down Expand Up @@ -136,7 +136,7 @@ template<> std::string fetch_result<std::string>(MYSQL_STMT* stmt, const std::st
template<typename T> T fetch_result_long_internal_(MYSQL_STMT* stmt, const std::string& sql)
{
T result;
bool is_null;
my_bool is_null;
MYSQL_BIND result_bind[1] = { make_bind(result, &is_null) };

if(mysql_stmt_bind_result(stmt, result_bind) != 0)
Expand Down Expand Up @@ -169,7 +169,7 @@ template<> unsigned int fetch_result<unsigned int>(MYSQL_STMT* stmt, const std::
template<> bool fetch_result<bool>(MYSQL_STMT* stmt, const std::string& sql)
{
int result;
bool is_null;
my_bool is_null;
MYSQL_BIND result_bind[1] = { make_bind(result, &is_null) };

if(mysql_stmt_bind_result(stmt, result_bind) != 0)
Expand Down

0 comments on commit ebe169e

Please sign in to comment.