liquibase.exception.DatabaseException: Error executing SQL ALTER TABLE my_database.my_table CHANGE my_column_old my_column_new clob: 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 'clob' at line 1

JIRA | Jason Duke | 3 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    I have a Liquibase 2.x style change set with the following configuration: {code} <renameColumn tableName="my_table" oldColumnName="my_column_old" newColumnName="my_column_new" columnDataType="text"/> {code} This change set worked properly against MySQL using Liquibase 2.x. Running this change set against a MySQL database using Liquibase 3.x, I encounter the following error: {code} [INFO] ChangeSet schema/my.changelog.xml::my-changeset::jduke ran successfully in 32ms [ERROR] Change Set my.changelog.xml::my-changeset::jduke failed. Error: Error executing SQL ALTER TABLE my_database.my_table CHANGE my_column_old my_column_new clob: 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 'clob' at line 1 liquibase.exception.DatabaseException: Error executing SQL ALTER TABLE my_database.my_table CHANGE my_column_old my_column_new clob: 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 'clob' at line 1 at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:56) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:98) at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1341) at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1325) at liquibase.changelog.ChangeSet.execute(ChangeSet.java:343) at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:28) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:58) at liquibase.Liquibase.update(Liquibase.java:135) {code} It seems that Liquibase is incorrectly mapping the 'text' data type to 'clob', when it should be using 'text' for MySQL, as it did in 2.x. I have verified I am using a MySQLDatabase object. Is this a bug, or am I missing something?

    JIRA | 3 years ago | Jason Duke
    liquibase.exception.DatabaseException: Error executing SQL ALTER TABLE my_database.my_table CHANGE my_column_old my_column_new clob: 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 'clob' at line 1
  2. 0

    I have a Liquibase 2.x style change set with the following configuration: {code} <renameColumn tableName="my_table" oldColumnName="my_column_old" newColumnName="my_column_new" columnDataType="text"/> {code} This change set worked properly against MySQL using Liquibase 2.x. Running this change set against a MySQL database using Liquibase 3.x, I encounter the following error: {code} [INFO] ChangeSet schema/my.changelog.xml::my-changeset::jduke ran successfully in 32ms [ERROR] Change Set my.changelog.xml::my-changeset::jduke failed. Error: Error executing SQL ALTER TABLE my_database.my_table CHANGE my_column_old my_column_new clob: 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 'clob' at line 1 liquibase.exception.DatabaseException: Error executing SQL ALTER TABLE my_database.my_table CHANGE my_column_old my_column_new clob: 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 'clob' at line 1 at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:56) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:98) at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1341) at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1325) at liquibase.changelog.ChangeSet.execute(ChangeSet.java:343) at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:28) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:58) at liquibase.Liquibase.update(Liquibase.java:135) {code} It seems that Liquibase is incorrectly mapping the 'text' data type to 'clob', when it should be using 'text' for MySQL, as it did in 2.x. I have verified I am using a MySQLDatabase object. Is this a bug, or am I missing something?

    JIRA | 3 years ago | Jason Duke
    liquibase.exception.DatabaseException: Error executing SQL ALTER TABLE my_database.my_table CHANGE my_column_old my_column_new clob: 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 'clob' at line 1
  3. 0

    Unable to update 1.0.3 db?

    GitHub | 2 years ago | ojhunt
    liquibase.exception.DatabaseException: Error executing SQL ALTER TABLE commafeed.FEEDENTRYTAGS ADD CONSTRAINT fk_entry_id FOREIGN KEY (entry_id) REFERENCES commafeed.FEEDENTRIES (id): Can't create table 'commafeed.#sql-3e1_87a6' (errno: 150)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Can liquibase handle a partially updated schema?

    Stack Overflow | 4 years ago | Kramer
    liquibase.exception.DatabaseException: Error executing SQL ALTER TABLE limit ADD id serial: ERROR: column "id" of relation "limit" already exists
  6. 0

    PL/SQL and SQL script in one sqlFile with liquibase?

    Stack Overflow | 2 years ago | Gabor
    liquibase.exception.DatabaseException: ORA-06550: 4 line, 1 col: PLS-00103: Encountered the symbol: "/" [Failed SQL: BEGIN aud.someProcedure('parameter'); END; // insert into test_table(_id, value) VALUES(1, 'test') ]

  1. davidvanlaatum 1 times, last 9 months ago
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. liquibase.exception.DatabaseException

    Error executing SQL ALTER TABLE my_database.my_table CHANGE my_column_old my_column_new clob: 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 'clob' at line 1

    at liquibase.executor.jvm.JdbcExecutor.execute()
  2. Liquibase Core
    Liquibase.update
    1. liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:56)
    2. liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:98)
    3. liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1341)
    4. liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1325)
    5. liquibase.changelog.ChangeSet.execute(ChangeSet.java:343)
    6. liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:28)
    7. liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:58)
    8. liquibase.Liquibase.update(Liquibase.java:135)
    8 frames