Bug #326 Optional service with --defaults-file=conf_file_path doesn't works
Submitted: 25 Apr 2003 20:16 Modified: 26 May 2003 12:05
Reporter: Miguel Solorzano Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:ALL OS:Microsoft Windows (Windows NT\XP\Win2k)
Assigned to: Miguel Solorzano CPU Architecture:Any

[25 Apr 2003 20:16] Miguel Solorzano
Description:
The optional service installed with:

mysqld --install-manual mysqldopt --defaults-file=c:\path\my.ini

doesn't start adequately due to use 3 parameters in argc.

How to repeat:
install the optional service with:

mysqld --install-manual mysqldopt --defaults-file=d:\custom_path\my.ini

start the server with:

net start mysqldopt

and the service fails to start.

Suggested fix:
*** d:\mysql-dev\mysql\sql\mysqld.cc	Thu Apr 17 18:09:34 2003
--- c:\fix\mysqld.cc	Fri Apr 25 23:53:34 2003
***************
*** 2223,2231 ****
  	return 0;
        if (Service.IsService(argv[2]))
        {
! 	/* start an optional service */
  	use_opt_args=1;
! 	opt_argc=argc;
  	opt_argv=argv;
  	start_mode= 1;
  	Service.Init(argv[2], mysql_service);
--- 2223,2231 ----
  	return 0;
        if (Service.IsService(argv[2]))
        {
! 	/* start an optional service with --defaults-file=my_path\my.ini */
  	use_opt_args=1;
! 	opt_argc=2; /* for to exclude the service name */
  	opt_argv=argv;
  	start_mode= 1;
  	Service.Init(argv[2], mysql_service);
[26 May 2003 12:05] Miguel Solorzano
This bug is already fixed: Changeset: 1.1378 03/05/26 20:09:53