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

Stephen Swinsburg s.swinsburg at lancaster.ac.uk
Mon Mar 30 23:51:52 PDT 2009


Yes that is fine, so long as it has a space after it and before the  
comment.
ie
--<space>COMMENT
but not
--COMMENT

The main reason I raised this is that in the conversion scripts there  
is the tendency to separate blocks of SQL with full lines of dashes, ie
----------------------
which is invalid and will stop execution of the SQL.


cheers,
Steve



On 30/03/2009, at 11:45 PM, Aaron Zeckoski wrote:

> 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/]
> _______________________________________________
> 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"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2437 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20090331/f7dab075/attachment.bin 


More information about the sakai-dev mailing list