You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by cmathrusse <ch...@veeva.com> on 2020/05/07 18:25:06 UTC

Unknown column 'ACTIVEMQ_MSGS.CONTAINER' in 'where clause' using MySQL

We are currently running ActiveMQ 5.15.3 along with MySQL 5.6.32-78.1. We are
getting queries associated with ActiveMQ appearing in our slow running
queries report. Upon further examination of the query it appears to have a
syntax error due to a missing JOIN.

The query in question:
/DELETE FROM ACTIVEMQ_MSGS WHERE (PRIORITY=0 AND ID <= ( SELECT
min(ACTIVEMQ_ACKS.LAST_ACKED_ID) FROM ACTIVEMQ_ACKS WHERE
ACTIVEMQ_ACKS.CONTAINER=ACTIVEMQ_MSGS.CONTAINER AND
ACTIVEMQ_ACKS.PRIORITY=0));/ 


Executing an explain on this query results in:  *You have an error in your
SQL syntax*

explain extended SELECT min(ACTIVEMQ_ACKS.LAST_ACKED_ID) FROM ACTIVEMQ_ACKS
join ACTIVEMQ_MSGS WHERE ACTIVexplain extended SELECT
min(ACTIVEMQ_ACKS.LAST_ACKED_ID) FROM ACTIVEMQ_ACKS WHERE
ACTIVEMQ_ACKS.CONTAINER= `ACTIVEMQ_MSGS`.`CONTAINER` AND
ACTIVEMQ_ACKS.PRIORITY=0;EMQ_ACKS.CONTAINER= `ACTIVEMQ_MSGS`.`CONTAINER` AND
ACTIVEMQ_ACKS.PRIORITY=0;


I've seen some older posts pertaining to this issue stating that MySQL 5 is
required for this query, but you can see from above we are using MySQL
5.6.32-78.1, so this should not be an issue. 

Adding ACTIVEMQ_MSGS to the FROM clause resolves the issue but I have no way
to configure ActiveMQ to correct the query. 

Is there a work-around for this issue, using a configuration change? 
Since we are not using Topics is there a way to disable the functionality
that performs this SELECT?

Thanks for the assistance...
Chris




--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html