Activity Objects library throws syntax error during "find" query with MySQL database

Hello.

I’m trying to execute a query like following with Active Objects (entry from Jira logs) :

/rest/sentiment/1.0/results 8 ms "SELECT MESSAGE,ALERT,CREATED_DATE,PROJECT_KEY,ID,SCORE,USER_KEY,MAGNITUDE,IGNORED,COMMENT_ID FROM AO_5BB1C1_SARE WHERE PROJECT_KEY LIKE ? AND CREATED_DATE > ? AND IGNORED IS ?" {1=SAM, 2=2020-03-01, 3=false}

But this causes an error like so :

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0' at line 1

I’m at a loss as to what causes this problem. When I try to execute a query like this manually by logging into a mysql console everything works ok. It also works without fail on a H2 database.

Any input on how to debug/solve/workaround this would be greatly appreciated.

Versions :

  • MySQL : 5.7.25
  • MySQL Connector : 5.1.48
  • Active Objects : 3.2.4
  • Jira : 8.4.2

Hello, I’m still facing this problem. Does anyone know how to solve this, or at least where to look for a solution ?

Figured it out. Maybe someone will find this useful.

Turned out the problem was mysql converting boolean to tinyint which resulted in query containing “is 0” which is invalid. The solution was to change “is” to “=” while generating the query string.