Commit 7a632134 authored by unknown's avatar unknown

Merge bk-internal.mysql.com:/home/bk/mysql-5.0

into mysql.com:/home/my/mysql-5.0


sql/mysqld.cc:
  Auto merged
parents dab2e46a 1cbf4056
......@@ -3302,12 +3302,14 @@ default_service_handling(char **argv,
if (Service.got_service_option(argv, "install"))
{
Service.Install(1, servicename, displayname, path_and_service, account_name);
Service.Install(1, servicename, displayname, path_and_service,
account_name);
return 0;
}
if (Service.got_service_option(argv, "install-manual"))
{
Service.Install(0, servicename, displayname, path_and_service, account_name);
Service.Install(0, servicename, displayname, path_and_service,
account_name);
return 0;
}
if (Service.got_service_option(argv, "remove"))
......@@ -3361,7 +3363,8 @@ int main(int argc, char **argv)
}
else if (argc == 3) /* install or remove any optional service */
{
if (!default_service_handling(argv, argv[2], argv[2], file_path, "", NULL))
if (!default_service_handling(argv, argv[2], argv[2], file_path, "",
NULL))
return 0;
if (Service.IsService(argv[2]))
{
......@@ -3388,24 +3391,20 @@ int main(int argc, char **argv)
--defaults-file=file, but that was not enforced in 4.1, so we don't
enforce it here.)
*/
char *extra_opt= NULL;
char *account_name = NULL;
const char *extra_opt= NullS;
const char *account_name = NullS;
int index;
for (index = 3; index < argc; index++)
{
if (strncmp(argv[index], "--local-service", 15) == 0)
{
account_name=(char*)malloc(27);
strmov(account_name, "NT AUTHORITY\\LocalService\0");
}
if (!strcmp(argv[index], "--local-service"))
account_name= "NT AUTHORITY\\LocalService";
else
{
extra_opt= argv[index];
}
}
if (argc != 5 || account_name)
if (!default_service_handling(argv, argv[2], argv[2], file_path, extra_opt, account_name))
if (argc == 4 || account_name)
if (!default_service_handling(argv, argv[2], argv[2], file_path,
extra_opt, account_name))
return 0;
}
else if (argc == 1 && Service.IsService(MYSQL_SERVICENAME))
......
......@@ -48,8 +48,9 @@ class NTService
//service install / un-install
BOOL Install(int startType,LPCSTR szInternName,LPCSTR szDisplayName,LPCSTR szFullPath,
LPCSTR szAccountName=NULL,LPCSTR szPassword=NULL);
BOOL Install(int startType,LPCSTR szInternName,LPCSTR szDisplayName,
LPCSTR szFullPath, LPCSTR szAccountName=NULL,
LPCSTR szPassword=NULL);
BOOL SeekStatus(LPCSTR szInternName, int OperationType);
BOOL Remove(LPCSTR szInternName);
BOOL IsService(LPCSTR ServiceName);
......
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