Hi!
On Mar 14, tim@stripped wrote:
> ChangeSet@stripped, 2008-03-14 14:35:17-06:00, tsmith@stripped +1 -0
> Bug #20748: Configuration files should not be read more than once
>
> Normalize directory names before adding them to default_directories.
>
> mysys/default.c@stripped, 2008-03-14 14:35:16-06:00, tsmith@stripped +129
> -155
> Normalize directory names with unpack_dirname() before adding them
> to default_directories. This way, /etc/ and /etc will not count as
> duplicates.
>
> Because this entails allocating memory to store the normalized names,
> add error handling and ensure that it doesn't leak memory in case
> both my_print_defaults() and load_defaults() are called.
>
> Clean up the Windows code that finds the exe's parent directory, and
> pull it out into a separate function.
>
> Reorganize the code into a single init_default_directories() function,
> with internal #ifdefs, instead of init_default_directories_<system>()
> functions which were accessed via a function pointer. This is more in
> line with normal MySQL coding style, and easier to read for some.
ok to push
although it was very difficult to understand what you've done, as a
trivial change (adding unpack_dirname()) was combined in one commit
with a massive (although good) redesign :(
Regards / Mit vielen Grüssen,
Sergei
--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik <serg@stripped>
/ /|_/ / // /\ \/ /_/ / /__ Principal Software Engineer/Server Architect
/_/ /_/\_, /___/\___\_\___/ Sun Microsystems GmbH, HRB München 161028
<___/ Sonnenallee 1, 85551 Kirchheim-Heimstetten
Geschäftsführer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
Vorsitzender des Aufsichtsrates: Martin Häring