MySQL 5.7.40 includes the following InnoDB changes:
Bug#34144951: InnoDB restore position crash when descent scan btree
This fixes a rare debug assertion in the function btr_cur_latch_leaves(). This code was refactored as part of
MDEV-13542 in MariaDB Server 10.6.9. We do not run many stress tests on debug builds of MariaDB Server older than 10.6. This has no impact on non-debug builds.
Bug#32912868: dict_table_x_lock_indexes() can cause deadlock with concurrent purge operations
This was fixed in
BUG#34380370 truncate table not free mutex in some case
This should only affect crash-upgrades from 10.2.18 or earlier (before
MDEV-13564). The code was completely removed from 10.4 in MDEV-13564. Crash-upgrades of 10.2 (or MySQL 5.7) to 10.3 or later should be prevented by MDEV-15912.
Because MariaDB Server 10.3 does not include a separate InnoDB version number (
MDEV-16172), no code changes whatsoever will be necessary.