Commit 9c99d6b2 authored by unknown's avatar unknown

Merge mysql.com:/home/jimw/my/mysql-5.0-7856

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


sql/mysqld.cc:
  Auto merged
parents 39e8e248 ba315223
......@@ -3376,37 +3376,32 @@ int main(int argc, char **argv)
return 0;
}
}
else if (argc >= 4)
else if (argc == 4 || argc == 5)
{
const char *defaults_file = "--defaults-file";
const char *service = "--local-service";
char extra_opt[FN_REFLEN] = "";
/*
This may seem strange, because we handle --local-service while
preserving 4.1's behavior of allowing any one other argument that is
passed to the service on startup. (The assumption is that this is
--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;
char *option;
int index;
for (index = 3; index < argc; index++)
{
option= argv[index];
/*
Install an optional service with optional config file
mysqld --install-manual mysqldopt --defaults-file=c:\miguel\my.ini
*/
if (strncmp(option, defaults_file, strlen(defaults_file)) == 0)
if (strncmp(argv[index], "--local-service", 15) == 0)
{
strmov(extra_opt, option);
account_name=(char*)malloc(27);
strmov(account_name, "NT AUTHORITY\\LocalService\0");
}
else
/*
Install an optional service as local service
mysqld --install-manual mysqldopt --local-service
*/
if (strncmp(option, service, strlen(service)) == 0)
{
account_name=(char*)malloc(27);
strmov(account_name, "NT AUTHORITY\\LocalService\0");
extra_opt= argv[index];
}
}
if (argc != 5 || account_name)
if (!default_service_handling(argv, argv[2], argv[2], file_path, extra_opt, account_name))
return 0;
}
......
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