Hello! Thanks for the report and the fix suggestion. Would you like to send it as a Merge Request at https://salsa.debian.org/mariadb-team/mariadb-10.5 ?
Even though this is just an onliner, please write a good git commit message and reference the upstream bug report or commit that fixed it. If it is not fixed at all upstream, then please also engage there and help this fixed for everybody. Thanks!