Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

Re : endDelimiter issues Mysql

$
0
0
Hi Ronak,
Sorry about the delay.

The "every 2 minutes starts" part is fine.

The issue (I think) is just that it's missing a "DELIMITER /" statement ahead of the "CREATE" statement. I can fix the SQL by adding "DELIMITER /" manually. So this code below succeeds, I've only added the "DELIMITER /" line.

  1. DELIMITER /
    CREATE DEFINER=`root`@`%` EVENT `dev_segment_budget_tracking_sum_updater`
        ON SCHEDULE
            EVERY 2 MINUTE STARTS '2019-05-27 13:48:28'
        ON COMPLETION NOT PRESERVE
        ENABLE
        COMMENT 'DEV ONLY!'
        DO BEGIN
        update operations.segment_budget_tracking_sum set last_updated = now() where 1=1;
    END/
The Specific error raised by the DB is: "/* SQL Error (1064): 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 '' at line 9 */". This is where it encounters the default delimiter ";"  ("...where 1=1;").

Also as an aside, I noticed if I set "$$" as the endDelimiter, LB also includes a ";" after my custom delimiter. So the last line emitted in that case looks like "END$$;". This isn't the direct issue at hand but it is a different behavior than by using only "/" as the endDelimiter.

Viewing all articles
Browse latest Browse all 2993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>