We are upgrading Jira from 4.4.5 and Confluence from 3.x. Users are managed for Confluence from within Jira.
In our upgraded test instance, many spaces crashed with a SQL error relating to max_join_size.
Here's the error:
org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: Could not execute query; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:97)
caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
Our DBA increased this size to 20 times the default size for this parameter but it didn't resolve the problem. Our DBA says he's not sure why JIRA or confluence needs to examine over 20 billion rows of combined data, but this type of programming is concerning! He has increased the max_join_size to some "cringeworthy" variable, well above what it normally should be.
Is this normal? Is there something else we should be looking at?