• tsmith@ramayana.hindu.god's avatar
    Bug #20748: Configuration files should not be read more than once · ef59ca3d
    tsmith@ramayana.hindu.god authored
    A user could not override system-wide settings in their ~/.my.cnf,
    because the DEFAULT_SYSCONFDIR was being searched last.  Also, in
    some configurations (especially when the --sysconfdir compile-time
    option is set to /etc or /etc/mysql), the system-wide my.cnf file
    was read multiple times, causing confusion and potential problems.
    
    Rearrange default directories to conform to the manual and logic.
    Move --sysconfdir=<path> (DEFAULT_SYSCONFDIR) from the last default
    directory to the middle of the list.  $HOME/.my.cnf should be last,
    so the user is able to override the system-wide settings.
    
    Change init_default_directories() to remove duplicates from the
    list.
    ef59ca3d
mf_arr_appstr.c 1.79 KB