activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From franz1981 <...@git.apache.org>
Subject [GitHub] activemq-artemis pull request #1997: ARTEMIS-1653 Allow database tables to b...
Date Mon, 09 Apr 2018 07:28:23 GMT
Github user franz1981 commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1997#discussion_r180007558
  
    --- Diff: artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/AbstractJDBCDriver.java
---
    @@ -179,32 +179,61 @@ private void createTableIfNotExists(String tableName, String...
sqls) throws SQL
           logger.tracef("Validating if table %s didn't exist before creating", tableName);
           try {
              connection.setAutoCommit(false);
    +         final boolean tableExists;
              try (ResultSet rs = connection.getMetaData().getTables(null, null, tableName,
null)) {
    -            if (rs != null && !rs.next()) {
    +            if ((rs == null) || (rs != null && !rs.next())) {
    --- End diff --
    
    Nice feature on some DB2 drivers :)


---

Mime
View raw message