mariadb: fix for issue #30891

Please note, that this might also require PR #30930.