Skip to content

Commit

Permalink
db_mysql: replaced my_bool with bool
Browse files Browse the repository at this point in the history
- mysql 8.0.1 removed my_bool and suggests use of bool:
  * https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-1.html
- use stdbool.h, it defines bool in C99, which should be old enough to
be everywhere, otherwise it may require some ifdefs to get it for older
but still alive systems
- reported by GH #1602
  • Loading branch information
miconda committed Aug 2, 2018
1 parent 89d1bc3 commit 1736723
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/modules/db_mysql/km_my_con.c
Expand Up @@ -29,6 +29,7 @@
#include "km_my_con.h"
#include "km_db_mysql.h"
#include <mysql.h>
#include <stdbool.h>
#include "../../core/mem/mem.h"
#include "../../core/dprint.h"
#include "../../core/ut.h"
Expand All @@ -44,7 +45,7 @@ struct my_con* db_mysql_new_connection(const struct db_id* id)
char *host, *grp, *egrp;
unsigned int connection_flag = 0;
#if MYSQL_VERSION_ID > 50012
my_bool rec;
bool rec;
#endif

if (!id) {
Expand Down
3 changes: 2 additions & 1 deletion src/modules/db_mysql/my_fld.h
Expand Up @@ -29,12 +29,13 @@
#include "../../lib/srdb2/db_drv.h"
#include "../../lib/srdb2/db_fld.h"
#include <mysql.h>
#include <stdbool.h>

struct my_fld {
db_drv_t gen;

char* name;
my_bool is_null;
bool is_null;
MYSQL_TIME time;
unsigned long length;
str buf;
Expand Down

0 comments on commit 1736723

Please sign in to comment.