- set mysql reconnect to on. resolves #1240

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1919 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.17
Elan Ruusamäe 15 years ago
parent e8abdbf94e
commit 6eccc7abd6
  1. 5
      src/mod_mysql_vhost.c

@ -252,6 +252,11 @@ SERVER_FUNC(mod_mysql_vhost_set_defaults) {
return HANDLER_ERROR;
}
/* in mysql versions above 5.0.3 the reconnect flag is off by default */
my_bool reconnect = 1;
mysql_options(s->mysql, MYSQL_OPT_RECONNECT, &reconnect);
#define FOO(x) (s->x->used ? s->x->ptr : NULL)
if (!mysql_real_connect(s->mysql, FOO(hostname), FOO(myuser), FOO(mypass),

Loading…
Cancel
Save