SQL syntax in mysql_engine_7.4_to_7.5.sql line 215

I am updating the database tables (mysql 5.6.22) from 7.4 to 7.5 using the update script contained in the Tomcat distribution. But the execution stops at line 215 with the following error:

Script line: 215    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '--- BATCH ---

-- remove not null from job definition table --
alter table AC' at line 1

The line 215 is the only comment with a triple-dash instead of a double-dash. But MySQL only allows comments in the double-dash syntax, i.e “-- ” [1]

[1] http://dev.mysql.com/doc/refman/5.6/en/comments.html

Hi Mathias,

thanks for reporting this issue. I created a Bug Report CAM-6246 for it. We actually test these upgrade scripts on all databases so it will be interesting to see why this didn’t failed in our CI.

Cheers,
Sebastian

Hi Mathias,

thanks again for reporting. It seems we found the cause why we didn’t detected this error in our CI. We use the SQL Maven Plugin to execute the scripts in our test suite. Per default this plugin strips SQL comments before execution SQL statements. So the comments never hit the database.

Cheers,
Sebastian