LP952607: Do not show MySQL services preinstalled by Dell in the upgrade wizard
This commit is contained in:
parent
8c08349882
commit
3886fdf009
@ -58,6 +58,41 @@ void normalize_path(char *path, size_t size)
|
|||||||
strcpy_s(path, size, buf);
|
strcpy_s(path, size, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Exclusion rules.
|
||||||
|
|
||||||
|
Some hardware manufacturers deliver systems with own preinstalled MySQL copy
|
||||||
|
and services. We do not want to mess up with these installations. We will
|
||||||
|
just ignore such services, pretending it is not MySQL.
|
||||||
|
|
||||||
|
´@return
|
||||||
|
TRUE, if this service should be excluded from UI lists etc (OEM install)
|
||||||
|
FALSE otherwise.
|
||||||
|
*/
|
||||||
|
BOOL exclude_service(mysqld_service_properties *props)
|
||||||
|
{
|
||||||
|
static const char* exclude_patterns[] =
|
||||||
|
{
|
||||||
|
"common files\\dell\\mysql\\bin\\", /* Dell's private installation */
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
int i;
|
||||||
|
char buf[MAX_PATH];
|
||||||
|
|
||||||
|
/* Convert mysqld path to lower case, rules for paths are case-insensitive. */
|
||||||
|
memcpy(buf, props->mysqld_exe, sizeof(props->mysqld_exe));
|
||||||
|
_strlwr(buf);
|
||||||
|
|
||||||
|
for(i= 0; exclude_patterns[i]; i++)
|
||||||
|
{
|
||||||
|
if (strstr(buf, exclude_patterns[i]))
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Retrieve some properties from windows mysqld service binary path.
|
Retrieve some properties from windows mysqld service binary path.
|
||||||
We're interested in ini file location and datadir, and also in version of
|
We're interested in ini file location and datadir, and also in version of
|
||||||
@ -240,7 +275,9 @@ int get_mysql_service_properties(const wchar_t *bin_path,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
retval = 0;
|
|
||||||
|
if (!exclude_service(props))
|
||||||
|
retval = 0;
|
||||||
end:
|
end:
|
||||||
LocalFree((HLOCAL)args);
|
LocalFree((HLOCAL)args);
|
||||||
return retval;
|
return retval;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user