Product: Axon Ivy Platform
Affected Database: MySQL 9.7
The Problem
MySQL 9.7 introduces a breaking change to how InnoDB handles foreign key cascades. A new configuration parameter innodb_native_foreign_keys defaults to OFF, which silently breaks cascade delete behavior.
In the context of the Axon Ivy Engine, this means: when you delete an application, the dependent IWA_TaskElement rows are removed, but the referenced IWA_TaskStart rows are not fully cascade-deleted — only the first row gets removed, leaving orphaned records in the database.
If you then redeploy the same project, the engine does not display the deployed starts and logs the following:
java.lang.NullPointerException: Cannot invoke "ch.ivyteam.ivy.workflow.internal.element.TaskElement.getProcessModelVersionId()" because "element" is null
At that point, redeployment is impossible without manual database cleanup.
Background
Oracle documented this behavioral change here:
No More Silent Foreign Key Cascades – MySQL 9.7 Lets Child Triggers Speak Up
The new default (innodb_native_foreign_keys=OFF) changes how cascade operations propagate, which breaks applications that rely on standard foreign key cascade behavior — including Axon Ivy.
Our Recommendation
🚫 Do not upgrade to MySQL 9.7.
If you're currently on MySQL 9.6 → Stay on 9.6. It works correctly.
If you're planning a new setup or migration → Use MySQL 8.4 LTS. It is the current Long-Term Support release, fully tested, and does not have this issue. LTS means you'll get security patches and bug fixes for years without risky behavioral changes.
If you're already on MySQL 9.7 → As a temporary workaround, you can set innodb_native_foreign_keys=ON to restore the previous behavior:
# Docker Compose example
services:
mysql:
image: mysql:9.7
command: --innodb_native_foreign_keys=ON
Why MySQL 8.4 LTS?
MySQL's Innovation releases (9.x) are designed for early adopters and may introduce breaking changes between minor versions — as this case clearly demonstrates. The 8.4 LTS release is the safer choice for production environments:
- Long-term support with predictable behavior
- No surprise behavioral changes in foreign key handling
- Proven compatibility with Axon Ivy Platform
Reference