We got this error:
Using too big key for internal temp tables
it seems that the bug described in https://bugs.launchpad.net/maria/+bug/957409 is not fixed for all cases.
the testcase described there works.
But in our case the workaround (SET GLOBAL optimizer_switch = 'derived_with_keys=off';) is needed, so that our complex statement works.
The statement is a complex statement on innodb-tables with inner selects and substring_index-fkt and group by/order by having count. belonging to three tables.
Test case and statement delivered. Tables.sql contains select statement which causes the error.