diff options
author | Vladislav Vaintroub <wlad@montyprogram.com> | 2011-02-08 13:07:31 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@montyprogram.com> | 2011-02-08 13:07:31 +0100 |
commit | 577d02b17d0a9c6df7f9b943c69c246519362d88 (patch) | |
tree | 26e1bb791f1921b25c335fe264515e6514283364 /sql/winservice.c | |
parent | 47c776bc4cac416b677c2b4588c7a7dc54278a79 (diff) | |
download | mariadb-git-577d02b17d0a9c6df7f9b943c69c246519362d88.tar.gz |
MWL#55: look for my.cnf in addition to my.ini trying to figure out defaults file for the service
Diffstat (limited to 'sql/winservice.c')
-rw-r--r-- | sql/winservice.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/winservice.c b/sql/winservice.c index ee29d3556d8..1cbe5e906e8 100644 --- a/sql/winservice.c +++ b/sql/winservice.c @@ -164,8 +164,12 @@ int get_mysql_service_properties(const wchar_t *bin_path, *p= 0; } - /* Look for my.ini in the install root */ + /* Look for my.ini, my.cnf in the install root */ sprintf_s(props->inifile, MAX_PATH, "%s\\my.ini", install_root); + if (GetFileAttributes(props->inifile) == INVALID_FILE_ATTRIBUTES) + { + sprintf_s(props->inifile, MAX_PATH, "%s\\my.cnf", install_root); + } if (GetFileAttributes(props->inifile) != INVALID_FILE_ATTRIBUTES) { /* Ini file found, get datadir from there */ @@ -174,7 +178,7 @@ int get_mysql_service_properties(const wchar_t *bin_path, } else { - /* Ini file was not found */ + /* No ini file */ props->inifile[0]= 0; } |