bug fixed mariadb implementation