Liquibase failing while attempting to drop non-existent TMP_% tables during generateChangeLog

Cross-posted from stack-overflow (here):

Running 

liquibase generateChangeLog > genChgLog.txt

with the following as my liquibase.properties,

classpath=C:\Program Files (x86)\MySQL\MySQL Connector

 J\mysql-connector-java-8.0.16.jar 

driver=com.mysql.cj.jdbc.Driver

url=jdbc:mysql://{thisisnottheproblem,Iguarantee} 

username={it’sright}

password={it’sright}

referenceUrl=jdbc:mysql://{thisisnottheproblem,Iguarantee}

referenceUsername={it’sright} 

referencePassword={it’sright}

changeLogFile=databaseChangeLogSchema.mysql.sql

diffTypes=tables,columns,views,primaryKeys,indexes,foreignKeys,sequences,data

logLevel=debug

I am consistently getting the likes of this, output to the genChgLog.txt file:

Starting Liquibase at Wed, 15 May 2019 15:37:32 CDT (version 3.6.3

built at 2019-01-29 11:34:48) Unexpected error running Liquibase:

liquibase.exception.DatabaseException:

liquibase.exception.DatabaseException: Unknown table

‘TMP_CTAWHBNCQVQMHSUU’ [Failed SQL: DROP TABLE TMP_CTAWHBNCQVQMHSUU]

liquibase.exception.LiquibaseException:

liquibase.command.CommandExecutionException:

liquibase.exception.DatabaseException:

liquibase.exception.DatabaseException: Unknown table

‘TMP_CTAWHBNCQVQMHSUU’ [Failed SQL: DROP TABLE TMP_CTAWHBNCQVQMHSUU]

… 30 common frames omitted

 

 

For more information, please use the --logLevel flag

Each time I run it, it changes the name of the phantom TMP_ tables (although they always begin with TMP_ and then a string of apparently random characters).  I don’t know where it’s getting these non-existent TMP_ tables from that it wants to drop, but…is there some way to make it only attempt to drop them if they exist?  Of potential note:  it works fine if my only diffType is “tables”, “data”, or if I have both “tables” and “data” as diffTypes…otherwise, failure…

I don’t have all the details, but it appears this can happen when using a database user with insufficient permissions. I talked with someone who said that using a root level database user fixed this issue for them.

Steve Donie
Principal Software Engineer
Liquibase Community Engagement
Datical, Inc. http://www.datical.com/