[Maria-developers] A joint patch for MDEV-5969 and MDEV-5971