From eaf6b053b83d2a46250834e8367477bd3d85d38f Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Wed, 4 Jan 2017 22:41:43 +0100 Subject: [PATCH] MDEV-11087 Search path for my.ini is wrong for default installation Add /data/my.ini to the search path - this my.ini location is used since MariaDB 5.2 --- mysys/my_default.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mysys/my_default.c b/mysys/my_default.c index 0f9b70ca326..03cfa973b2c 100644 --- a/mysys/my_default.c +++ b/mysys/my_default.c @@ -90,7 +90,7 @@ static my_bool defaults_already_read= FALSE; /* Which directories are searched for options (and in which order) */ -#define MAX_DEFAULT_DIRS 6 +#define MAX_DEFAULT_DIRS 7 #define DEFAULT_DIRS_SIZE (MAX_DEFAULT_DIRS + 1) /* Terminate with NULL */ static const char **default_directories = NULL; @@ -1219,7 +1219,12 @@ static const char **init_default_directories(MEM_ROOT *alloc) errors += add_directory(alloc, "C:/", dirs); if (my_get_module_parent(fname_buffer, sizeof(fname_buffer)) != NULL) + { errors += add_directory(alloc, fname_buffer, dirs); + + strncat(fname_buffer, "/data", sizeof(fname_buffer)); + errors += add_directory(alloc, fname_buffer, dirs); + } } #else