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

Re : Formatted sql with mySQL generates "mysql syntax error"

$
0
0
No replies yet, so I will add some information. 
I have now tried to run the example given at http://www.liquibase.org/documentation/sql_format.html

The same error occurs. Now I have created a logfile, which has the following output
  1. SEVERE 19-7-13 16:40:liquibase: Change Set c:/temp/liquibase/liquibase.sql::raw::includeAll failed.  Error: Error executing SQL --liquibase formatted sql

  2. --changeset jvddrift:1 
  3. create table test1 (
  4.     id int primary key,
  5.     name varchar(255)
  6. );: 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 '--liquibase formatted sql

  7. --changeset jvddrift:1 
  8. create table test1 (
  9.     id i' at line 1
  10. liquibase.exception.DatabaseException: Error executing SQL --liquibase formatted sql

  11. --changeset jvddrift:1 
  12. create table test1 (
  13.     id int primary key,
  14.     name varchar(255)
  15. );: 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 '--liquibase formatted sql

  16. --changeset jvddrift:1 
  17. create table test1 (
  18.     id i' at line 1
  19. at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:56)
  20. at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:98)
  21. at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1341)
  22. at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1325)
  23. at liquibase.changelog.ChangeSet.execute(ChangeSet.java:343)
  24. at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:28)
  25. at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:58)
  26. at liquibase.Liquibase.update(Liquibase.java:135)
  27. at liquibase.integration.commandline.Main.doMigration(Main.java:848)
  28. at liquibase.integration.commandline.Main.main(Main.java:138)
  29. Caused by: com.mysql.jdbc.exceptions.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 '--liquibase formatted sql

  30. --changeset jvddrift:1 
  31. create table test1 (
  32.     id i' at line 1
  33. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
  34. at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
  35. at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
  36. at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
  37. at com.mysql.jdbc.Connection.execSQL(Connection.java:3277)
  38. at com.mysql.jdbc.Connection.execSQL(Connection.java:3206)
  39. at com.mysql.jdbc.Statement.execute(Statement.java:727)
  40. at liquibase.executor.jvm.JdbcExecutor$1ExecuteStatementCallback.doInStatement(JdbcExecutor.java:86)
  41. at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:49)
  42. ... 9 more
  43. SEVERE 19-7-13 16:40:liquibase: Migration failed for change set c:/temp/liquibase/liquibase.sql::raw::includeAll:
  44.      Reason: liquibase.exception.DatabaseException: Error executing SQL --liquibase formatted sql

  45. --changeset jvddrift:1 
  46. create table test1 (
  47.     id int primary key,
  48.     name varchar(255)
  49. );: 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 '--liquibase formatted sql

  50. --changeset jvddrift:1 
  51. create table test1 (
  52.     id i' at line 1
  53. liquibase.exception.MigrationFailedException: Migration failed for change set c:/temp/liquibase/liquibase.sql::raw::includeAll:
  54.      Reason: liquibase.exception.DatabaseException: Error executing SQL --liquibase formatted sql

  55. --changeset jvddrift:1 
  56. create table test1 (
  57.     id int primary key,
  58.     name varchar(255)
  59. );: 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 '--liquibase formatted sql

  60. --changeset jvddrift:1 
  61. create table test1 (
  62.     id i' at line 1
  63. at liquibase.changelog.ChangeSet.execute(ChangeSet.java:376)
  64. at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:28)
  65. at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:58)
  66. at liquibase.Liquibase.update(Liquibase.java:135)
  67. at liquibase.integration.commandline.Main.doMigration(Main.java:848)
  68. at liquibase.integration.commandline.Main.main(Main.java:138)
  69. Caused by: liquibase.exception.DatabaseException: Error executing SQL --liquibase formatted sql

  70. --changeset jvddrift:1 
  71. create table test1 (
  72.     id int primary key,
  73.     name varchar(255)
  74. );: 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 '--liquibase formatted sql

  75. --changeset jvddrift:1 
  76. create table test1 (
  77.     id i' at line 1
  78. at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:56)
  79. at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:98)
  80. at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1341)
  81. at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1325)
  82. at liquibase.changelog.ChangeSet.execute(ChangeSet.java:343)
  83. ... 5 more
  84. Caused by: com.mysql.jdbc.exceptions.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 '--liquibase formatted sql

  85. --changeset jvddrift:1 
  86. create table test1 (
  87.     id i' at line 1
  88. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
  89. at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
  90. at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
  91. at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
  92. at com.mysql.jdbc.Connection.execSQL(Connection.java:3277)
  93. at com.mysql.jdbc.Connection.execSQL(Connection.java:3206)
  94. at com.mysql.jdbc.Statement.execute(Statement.java:727)
  95. at liquibase.executor.jvm.JdbcExecutor$1ExecuteStatementCallback.doInStatement(JdbcExecutor.java:86)
  96. at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:49)
  97. ... 9 more

I really hope someone can point me in the right direction!

Regards
Joost



Viewing all articles
Browse latest Browse all 2993

Trending Articles



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