Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,16 @@ public void dropTableIfExists(TableIdentifier table) throws SQLException
protected void dropTableIfExists(Statement stmt, TableIdentifier table) throws SQLException
{
if (supportsTableIfExistsClause()) {
String sql = String.format("DROP TABLE IF EXISTS %s", quoteTableIdentifier(table));
executeUpdate(stmt, sql);
try {
String sql = String.format("DROP TABLE IF EXISTS %s", quoteTableIdentifier(table));
executeUpdate(stmt, sql);
}
catch (Exception ex) {
logger.warn("IF EXISTS Not Supported.");
if (tableExists(table)) {
dropTable(stmt, table);
}
}
} else {
if (tableExists(table)) {
dropTable(stmt, table);
Expand Down