Refer to mariadb documentation and fix old stuff

same as 5.5 PR