Liquibase diff changelog generator throwing error - Index 0 out of bounds for length 0

When I try to run the liquibase diff changelog generator between entity and the local mysql db, it is throwing "Index 0 out of bounds for length 0" error.

Error:
java.util.concurrent.ExecutionException: liquibase.exception.LiquibaseException: liquibase.exception.CommandExecutionException: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0

Note:
If I try to run the diff changelog generator between two mysql server, its working!

I found a solution on a similar question:

sql changesets including function declarations contain semi-colons in the middle of the create statement. To fix these errors change the formatted-sql to not split the statements:

--changeset <username>:graph_functions_initialize_1 splitStatements:false

Reference: grails - Null / Out of Bounds Error when running Liquibase - Stack Overflow