[Building Sakai] SAK-15801: Commenting syntax for conversion scripts

May, Megan Marie mmmay at indiana.edu
Mon Mar 30 12:12:09 PDT 2009


Hi everyone,
    It's been raised that the DB upgrade scripts in /reference/conversion contain incorrect comment syntax that can break the script (ie manual intervention/resolution is necessary).
The offending lines are those like:
----------------
This is invalid for MySQL which requires a space, whitespace or control character after the first two dashes.
ie
-- this is a comment
--this is an invalid comment
------------------ is just a bunch of dashes that will break

MySQL syntax notation: http://dev.mysql.com/doc/refman/5.1/en/comments.html

Note that the interpretation of the standard is different in MySQL and Oracle.

Oracle DOES NOT support the # character and will execute anything inside it.
Oracle DOES support ----------------- as a comment line

The only consistent comment syntax between the two is:

/* this is a comment */

This can also be used as multiline comments:

/* this is
 a
multiline
comment
*/

Steve Swinsburg has proposed that all upgrade scripts from the 2.4 series onwards be updated to this cross vendor syntax, /* */ to save possible upgrade headaches.  This proposal was well received at the last QA / Release WG meeting.  Before making the plunge, I'd like to gather wider support and or comments for the practice.
This JIRA tracking this proposal is http://bugs.sakaiproject.org/jira/browse/SAK-15801

+1, -1, 0?

Megan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20090330/5f79d3dd/attachment.html 


More information about the sakai-dev mailing list