Bug #44417 installing ndb_mgmd as a service needs forward slashes /
Submitted: 23 Apr 2009 4:36 Modified: 5 Feb 2010 1:51
Reporter: jack andrews Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:mysql-5.1-telco-7.0 OS:Windows
Assigned to: jack andrews CPU Architecture:Any

[23 Apr 2009 4:36] jack andrews
Description:
installing a service using forward slashes in the -f argument fails to start as a service.  strangely, doesn't ming back slashes as nodaemon

C:\w\repo\70>storage\ndb\src\mgmsrv\debug\ndb_mgmd.exe --install=mgmd2 -f c:\ndb
\twondbd.ini
Installing service 'mgmd2' as '"C:\w\repo\70\storage\ndb\src\mgmsrv\debug\ndb_mg
md.exe" "--service=mgmd2" "-f" "c:\ndb\twondbd.ini"'
Service successfully installed.

C:\w\repo\70>net start mgmd2
The mgmd2 service is starting.
The mgmd2 service could not be started.

The service did not report an error.

More help is available by typing NET HELPMSG 3534.

C:\w\repo\70>storage\ndb\src\mgmsrv\debug\ndb_mgmd.exe --remove=mgmd2
Removing service 'mgmd2'
Service successfully removed.

C:\w\repo\70>storage\ndb\src\mgmsrv\debug\ndb_mgmd.exe --install=mgmd2 -f c:/ndb
/twondbd.ini --reload
Installing service 'mgmd2' as '"C:\w\repo\70\storage\ndb\src\mgmsrv\debug\ndb_mg
md.exe" "--service=mgmd2" "-f" "c:/ndb/twondbd.ini" "--reload"'
Service successfully installed.

C:\w\repo\70>net start mgmd2
The mgmd2 service is starting.
The mgmd2 service was started successfully.

How to repeat:
.
[3 Feb 2010 6:40] jack andrews
> Try with "ndb_mgmd --install -f c:\\path\\" and then close the bug :)

mysys option handling code uses '\\' [backslash] as an escape char.
the 'policy' is to use '/' as the path separator in all cases.

unfortunately, it makes...

> storage\ndb\src\mgmsrv\debug\ndb_mgmd.exe --install=mgmd2 \
 -f c:/ndb/twondbd.ini --reload

...look silly where cmd.exe uses its style, then we use mysys style.

i'm happy to close the bug, but it's not a pretty sight.
[3 Feb 2010 10:16] Magnus BlÄudd
Ok, so what is the fix?
[4 Feb 2010 10:30] jack andrews
i think it is not a bug -- mysys 'handle options' code needs "/" or "\\\\" path separators.  so i don't think this is a bug -- ndb_mgmd /should/ behave as this bug says.