Commit d5977e4c authored by Timothy Smith's avatar Timothy Smith

Bug #20748: Configuration files should not be read more than once

Normalize directory names before adding them to default_directories.


mysys/default.c:
  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.
parent 07350a6c
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment