Skip to content

Commit

Permalink
Merge pull request #54 from linuxmaniac/vseva/mysql_8_fix
Browse files Browse the repository at this point in the history
[mysql] remove use of my_bool
  • Loading branch information
mwild1 authored Jan 14, 2019
2 parents 6c380e5 + 20c3e31 commit 73a234c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions dbd/mysql/statement.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ static int statement_execute(lua_State *L) {
switch(type) {
case LUA_TNIL:
bind[i].buffer_type = MYSQL_TYPE_NULL;
bind[i].is_null = (my_bool*)1;
bind[i].is_null = (int*)1;
break;

case LUA_TBOOLEAN:
Expand All @@ -227,7 +227,7 @@ static int statement_execute(lua_State *L) {
*boolean = lua_toboolean(L, p);

bind[i].buffer_type = MYSQL_TYPE_LONG;
bind[i].is_null = (my_bool*)0;
bind[i].is_null = (int*)0;
bind[i].buffer = (char *)boolean;
bind[i].length = 0;
break;
Expand All @@ -242,7 +242,7 @@ static int statement_execute(lua_State *L) {
*num = lua_tonumber(L, p);

bind[i].buffer_type = MYSQL_TYPE_DOUBLE;
bind[i].is_null = (my_bool*)0;
bind[i].is_null = (int*)0;
bind[i].buffer = (char *)num;
bind[i].length = 0;
break;
Expand All @@ -253,7 +253,7 @@ static int statement_execute(lua_State *L) {
str = lua_tolstring(L, p, str_len);

bind[i].buffer_type = MYSQL_TYPE_STRING;
bind[i].is_null = (my_bool*)0;
bind[i].is_null = (int*)0;
bind[i].buffer = (char *)str;
bind[i].length = str_len;
break;
Expand Down Expand Up @@ -593,7 +593,7 @@ int dbd_mysql_statement_create(lua_State *L, connection_t *conn, const char *sql
statement->lengths = NULL;

/*
mysql_stmt_attr_set(stmt, STMT_ATTR_UPDATE_MAX_LENGTH, (my_bool*)0);
mysql_stmt_attr_set(stmt, STMT_ATTR_UPDATE_MAX_LENGTH, (int*)0);
*/

luaL_getmetatable(L, DBD_MYSQL_STATEMENT);
Expand Down

0 comments on commit 73a234c

Please sign in to comment.