mariadb: fix for issue #30891

Please note, that this might also require PR #30930.
Has this been reported to the MariaDB developers?