Changeset 1995

Show
Ignore:
Timestamp:
09/09/2007 11:59:22 AM (12 months ago)
Author:
jan
Message:

fixed #1341

- use strchr*( instead of index() to be POSIX compliant
- MYSQL_OPT_RECONNECT is 5.0.3+ only

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/mod_mysql_vhost.c

    r1920 r1995  
    140140                buffer_copy_string_buffer(sel, s->core->select_vhost); 
    141141 
    142                 if (sel->used && (qmark = index(sel->ptr, '?'))) { 
     142                if (sel->used && (qmark = strchr(sel->ptr, '?'))) { 
    143143                        *qmark = '\0'; 
    144144                        buffer_copy_string(s->mysql_pre, sel->ptr); 
     
    172172                        } 
    173173 
     174#if MYSQL_VERSION_ID >= 50003 
    174175                        /* in mysql versions above 5.0.3 the reconnect flag is off by default */ 
    175176                        my_bool reconnect = 1; 
    176177                        mysql_options(s->mysql, MYSQL_OPT_RECONNECT, &reconnect); 
     178#endif 
    177179 
    178180#define FOO(x) (s->core->x->used ? s->core->x->ptr : NULL)