YoushouldhavereceivedacopyoftheGNUGeneralPublicLicense alongwiththisprogram;ifnot,writetotheFreeSoftware
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
if(wcsicmp(file_part, L"mysqld.exe") != 0 &&
wcsicmp(file_part, L"mysqld-debug.exe") != 0 &&
wcsicmp(file_part, L"mysqld-nt.exe") != 0 &&
wcsicmp(file_part, L"mariadbd.exe") != 0)
{ /* The service executable is not mysqld. */ goto end;
}
wcstombs(props->mysqld_exe, mysqld_path, MAX_PATH); /* If mysqld.exe exists, try to get its version from executable */ if (GetFileAttributes(props->mysqld_exe) != INVALID_FILE_ATTRIBUTES)
{
get_file_version(props->mysqld_exe, &props->version_major,
&props->version_minor, &props->version_patch);
}
if (have_inifile)
{ /* We have --defaults-file in service definition. */
wcstombs(props->inifile, args[1]+16, MAX_PATH);
normalize_path(props->inifile, MAX_PATH); if (GetFileAttributes(props->inifile) != INVALID_FILE_ATTRIBUTES)
{
get_datadir_from_ini(props->inifile, service_name, props->datadir, sizeof(props->datadir));
} else
{ /* Servicewillstartevenwithinvalid.inifile,usinglookupfor datadirrelativetomysqld.exe.Thisisequivalenttothecasenoini fileused.
*/
props->inifile[0]= 0;
have_inifile= FALSE;
}
}
if (!have_inifile)
{ /* 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 */
get_datadir_from_ini(props->inifile, service_name, props->datadir, sizeof(props->datadir));
} else
{ /* No ini file */
props->inifile[0]= 0;
}
}
/* Try datadir in install directory.*/ if (props->datadir[0] == 0)
{
sprintf_s(props->datadir, MAX_PATH, "%s\\data", install_root);
}
}
if (props->datadir[0] == 0 || fix_and_check_datadir(props))
{ /* There is no datadir in ini file, or non-existing dir, bail out.*/ goto end;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.