Bug #51992 Newline in set command from batch file gives error
Submitted: 12 Mar 2010 13:13 Modified: 7 Nov 2014 22:52
Reporter: Erlend Dahl Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster Manager: CLI Severity:S3 (Non-critical)
Version:1.1.0r1466, 1.0.2 r1242 OS:Any
Assigned to: CPU Architecture:Any

[12 Mar 2010 13:13] Erlend Dahl
Description:
Create a *file* containing the following commands:

create site --hosts=atum05 mysite;
add package  --basedir=/home/ed136777/Cluster/7.0.10  mypackage;
create cluster --package=mypackage 
--processhosts=ndb_mgmd@atum05,ndbd@atum05,ndbd@atum05,mysqld@atum05,mysqld@atum05 
mycluster;
set Datadir:ndbd=/home/ed136777/data1/mysqlcluster/,
Datadir:ndb_mgmd=/home/ed136777/data1/mysqlcluster/ mycluster;

(with the newline) and run it using the "source" command in the mysql client.

Then the set command reports "ERROR 6 (00MGR): Illegal number of operands".

However, if you replace the two last lines by

set Datadir:ndbd=/home/ed136777/data1/mysqlcluster/,Datadir:ndb_mgmd=/home/ed136777/data1/mysqlcluster/ mycluster;

(no newline) it works.

How to repeat:
As above
[16 Mar 2010 13:19] Kari Juul Wedde
Same happens if you issue the command from the mysql client

mcm>set datadir:mysqld=/export/home/tmp/kw136773/,
    -> datadir:ndb_mgmd=/export/home/tmp/kw136773 k;
ERROR 6 (00MGR): Illegal number of operands

Repeating the last command shows that NEWLINE is replaced by a space.
mcm>set datadir:mysqld=/export/home/tmp/kw136773/, datadir:ndb_mgmd=/export/home/tmp/kw136773 k;
[20 Aug 2010 11:50] Kari Juul Wedde
Reproduced on MCM 1.1
[7 Nov 2014 22:52] Daniel So
Added the following entry to the MySQL Cluster Manager 1.3.3 changelog:

"A newline contained inside a multi-line set command caused mcm to throw an error."