diff options
author | Jan Kneschke <jan@kneschke.de> | 2007-08-23 12:02:20 +0000 |
---|---|---|
committer | Jan Kneschke <jan@kneschke.de> | 2007-08-23 12:02:20 +0000 |
commit | f7df9a9ecdb3a07cbc519fa52e65205c8d15cc45 (patch) | |
tree | 1e95c3ab2fc8c8dfba40d92ba31c4d43bdb7a52f /src/mod_mysql_vhost.c | |
parent | 1e1a8e5907b64e6d0186ad82a647328e29b71511 (diff) | |
download | lighttpd-git-f7df9a9ecdb3a07cbc519fa52e65205c8d15cc45.tar.gz |
MYSQL_OPT_RECONNECT is available from 5.0.13 on (fixes #1309)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1965 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'src/mod_mysql_vhost.c')
-rw-r--r-- | src/mod_mysql_vhost.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mod_mysql_vhost.c b/src/mod_mysql_vhost.c index f0922ef6..65e7ce96 100644 --- a/src/mod_mysql_vhost.c +++ b/src/mod_mysql_vhost.c @@ -244,7 +244,7 @@ SERVER_FUNC(mod_mysql_vhost_set_defaults) { /* all have to be set */ if (!(buffer_is_empty(s->myuser) || buffer_is_empty(s->mydb))) { - + my_bool reconnect = 1; int fd; if (NULL == (s->mysql = mysql_init(NULL))) { @@ -253,9 +253,10 @@ SERVER_FUNC(mod_mysql_vhost_set_defaults) { return HANDLER_ERROR; } +#if MYSQL_VERSION_ID >= 50013 /* 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); +#endif #define FOO(x) (s->x->used ? s->x->ptr : NULL) |