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

Aaron Zeckoski aaronz at vt.edu
Mon Mar 30 15:45:27 PDT 2009


Isn't the -- syntax also compatible with both? Like so:
-- this is a comment

I am not familiar with all DBs but this is ok for mysql and oracle.
http://dev.mysql.com/doc/refman/5.0/en/comments.html
http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28370/comment.htm

I think the use of -- for full line or rest of line commenting is
pretty standard.

Or are we talking about inline comments only?
-AZ


On Mon, Mar 30, 2009 at 8:12 PM, May, Megan Marie <mmmay at indiana.edu> wrote:
> 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
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org
> with a subject of "unsubscribe"
>
>



-- 
Aaron Zeckoski (aaronz at vt.edu)
Senior Research Engineer - CARET - Cambridge University
[http://bugs.sakaiproject.org/confluence/display/~aaronz/]
Sakai Fellow - [http://aaronz-sakai.blogspot.com/]


More information about the sakai-dev mailing list