[#7248] Error when running "SELECT 1" query from AbstractDatabase in unsupported SQLDialect

This commit is contained in:
lukaseder 2018-03-07 11:45:58 +01:00
parent d72bd3c5d6
commit b166cda830

View File

@ -250,7 +250,15 @@ public abstract class AbstractDatabase implements Database {
// [#4974] Prevent any class loading effects from impacting below
// SQLPerformanceWarning.
if (!initialised) {
DSL.using(configuration).selectOne().fetch();
try {
DSL.using(configuration).selectOne().fetch();
}
// [#7248] Unsupported dialects might not be able to run queries on the DUAL table
catch (DataAccessException ignore) {
log.debug("Error while running init query", ignore);
}
initialised = true;
}
}