~ubuntu-branches/ubuntu/hardy/lighttpd/hardy

« back to all changes in this revision

Viewing changes to src/mod_mysql_vhost.c

  • Committer: Bazaar Package Importer
  • Author(s): Soren Hansen
  • Date: 2007-09-05 09:30:15 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20070905093015-pm98jekbu9ylcd3w
Tags: 1.4.17-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Update maintainer field in debian/control.
  - Build against libgamin-dev rather than libfam-dev (fixes a warning
    during startup)
  - Make sure that upgrades succeed, even if we can't restart lighttpd.
  - Clean environment in init.d script.

Show diffs side-by-side

added added

removed removed

Lines of Context:
244
244
                /* all have to be set */
245
245
                if (!(buffer_is_empty(s->myuser) ||
246
246
                      buffer_is_empty(s->mydb))) {
247
 
 
 
247
                        my_bool reconnect = 1;
248
248
                        int fd;
249
249
 
250
250
                        if (NULL == (s->mysql = mysql_init(NULL))) {
252
252
 
253
253
                                return HANDLER_ERROR;
254
254
                        }
 
255
 
 
256
#if MYSQL_VERSION_ID >= 50013
 
257
                        /* in mysql versions above 5.0.3 the reconnect flag is off by default */
 
258
                        mysql_options(s->mysql, MYSQL_OPT_RECONNECT, &reconnect);
 
259
#endif
 
260
 
255
261
#define FOO(x) (s->x->used ? s->x->ptr : NULL)
256
262
 
257
263
                        if (!mysql_real_connect(s->mysql, FOO(hostname), FOO(myuser), FOO(mypass),