diff --git a/activemq-core/src/main/java/org/apache/activemq/store/jdbc/Statements.java b/activemq-core/src/main/java/org/apache/activemq/store/jdbc/Statements.java index 932bfb262e..fa5e7e0e8b 100755 --- a/activemq-core/src/main/java/org/apache/activemq/store/jdbc/Statements.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/jdbc/Statements.java @@ -357,7 +357,7 @@ public class Statements { public String getFindAllDestinationsStatement() { if (findAllDestinationsStatement == null) { findAllDestinationsStatement = "SELECT DISTINCT CONTAINER FROM " + getFullMessageTableName() - + " UNION DISTINCT SELECT DISTINCT CONTAINER FROM " + getFullAckTableName(); + + " UNION SELECT DISTINCT CONTAINER FROM " + getFullAckTableName(); } return findAllDestinationsStatement; }