mariadb: fix for issue #30891

Please note, that this might also require PR #30930.
I took a more direct approach, which seemed more appropriate and reported it to Tokutek/tokudb-engine#266 which will hopefully find its way into mariadb eventually.