#326 [NEW]: Optional service with --defaults-file=conf_file_path doesn"t works

#326 [NEW]: Optional service with --defaults-file=conf_file_path doesn"t works

am 27.04.2003 19:38:31 von Michael Widenius

Hi!

>>>>> "Bug" == Bug Database writes:

Bug> From: Miguel Solorzano
Bug> Priority: Medium
Bug> Status: Assigned
Bug> Severity: Serious
Bug> Category: Server
Bug> Reported by: Developer
Bug> Reported at: General
Bug> Email subject: Optional service with --defaults-file=conf_file_path doesn't works
Bug> Email date:
Bug> Release: ALL
Bug> Operating system: Windows NT\XP\Win2k
Bug> Assigned to: miguel@mysql.com

Bug> Bug description: Optional service with --defaults-file=conf_file_path doesn't works

Bug> Description:
Bug> The optional service installed with:

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

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

I tested this with MySQL 4.0 and didn't have any problems with the above.



Bug> Suggested fix:
Bug> *** d:\mysql-dev\mysql\sql\mysqld.cc Thu Apr 17 18:09:34 2003
Bug> --- c:\fix\mysqld.cc Fri Apr 25 23:53:34 2003
Bug> ***************
Bug> *** 2223,2231 ****
Bug> return 0;
Bug> if (Service.IsService(argv[2]))
Bug> {
Bug> ! /* start an optional service */
Bug> use_opt_args=1;
Bug> ! opt_argc=argc;
Bug> opt_argv=argv;
Bug> start_mode= 1;
Bug> Service.Init(argv[2], mysql_service);
Bug> --- 2223,2231 ----
Bug> return 0;
Bug> if (Service.IsService(argv[2]))
Bug> {
Bug> ! /* start an optional service with --defaults-file=my_path\my.ini */
Bug> use_opt_args=1;
Bug> ! opt_argc=2; /* for to exclude the service name */
Bug> opt_argv=argv;
Bug> start_mode= 1;
Bug> Service.Init(argv[2], mysql_service);

Can you please explain in detail what the above patch does.

- When is the above code used ?
(It's not used for
mysqld --install-manual mysqldopt --defaults-file=c:\path\my.ini
as this is 4 arguments)

- Why do you change argc but not argv ?
(If you want to exclude the service name, you need to change argv too)

- When is opt_argc and opt_argv used and what are they supposed to
contain ?

Regards,
Monty

--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org