diff --git a/src/mod_mysql_vhost.c b/src/mod_mysql_vhost.c index 725550f4..4739a184 100644 --- a/src/mod_mysql_vhost.c +++ b/src/mod_mysql_vhost.c @@ -193,7 +193,6 @@ SERVER_FUNC(mod_mysql_vhost_set_defaults) { /* all have to be set */ if (!(buffer_string_is_empty(s->myuser) || buffer_string_is_empty(s->mydb))) { - my_bool reconnect = 1; if (NULL == (s->mysql = mysql_init(NULL))) { log_error_write(srv, __FILE__, __LINE__, "s", "mysql_init() failed, exiting..."); @@ -202,7 +201,10 @@ SERVER_FUNC(mod_mysql_vhost_set_defaults) { #if MYSQL_VERSION_ID >= 50013 /* in mysql versions above 5.0.3 the reconnect flag is off by default */ - mysql_options(s->mysql, MYSQL_OPT_RECONNECT, &reconnect); + { + char reconnect = 1; + mysql_options(s->mysql, MYSQL_OPT_RECONNECT, &reconnect); + } #endif #define FOO(x) (buffer_string_is_empty(s->x) ? NULL : s->x->ptr) diff --git a/src/mod_vhostdb_mysql.c b/src/mod_vhostdb_mysql.c index 4b2877c5..6f53ca8d 100644 --- a/src/mod_vhostdb_mysql.c +++ b/src/mod_vhostdb_mysql.c @@ -91,7 +91,7 @@ static int mod_vhostdb_dbconf_setup (server *srv, array *opts, void **vdata) #if MYSQL_VERSION_ID >= 50013 /* in mysql versions above 5.0.3 the reconnect flag is off by default */ { - my_bool reconnect = 1; + char reconnect = 1; mysql_options(dbconn, MYSQL_OPT_RECONNECT, &reconnect); } #endif