Consider the following script (quartz tables_mysql_innodb.sql):
## In your Quartz properties file, you'll need to set# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate### By: Ron Cordell - roncordell# I didn't see this anywhere, so I thought I'd post it here. This is the script from Quartz to create the tables in a MySQL database, modified to use INNODB instead of MYISAM.DROPTABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
DROPTABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 'DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS; DROP TABLE IF EXISTS QRTZ_SCHEDUL' at line 9
If I remove the comments from the script then everything works fine as expected. I suspect that parsing of apostrophe in comment doesn't work as intended.
As per spring-projects/spring-boot#13041, isn't this primarily a question of which comment prefix is configured here? Our default is "--"; this would have to be explicitly set to "#" for the above comments to be properly ignored.
Looks like the same problem. But - considering the various SQL scripts of the quartz library - they use different comment styles. E.g. derby has '–' whereas mysql has '#'. Now if I would change the comment prefix to one of them, the other isn't working, right? So I couldn't make it work for all database quartz supports?