Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-14926 2.6 Conversion Script
  3. SAK-15801

DB upgrade scripts contain incorrect comment syntax

    Details

      Description

      The DB upgrade scripts in /reference/conversion contain incorrect comment syntax which can break the script meaning manual intervention/resolution is necessary. This is a major headache when half the script has run.

      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
      */

      I propose that all upgrade scripts from the 2.4 series onwards be updated to this cross vendor syntax, /* */ to save possible upgrade headaches.

      NOTE: The "-- " syntax is also consistent between both and many others as well. It is also more common and probably a better idea to use in general. -AZ

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  Assignee:
                  mmmay Megan May
                  Reporter:
                  steve.swinsburg Steve Swinsburg
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved:

                      Git Integration