need this change for mariaDB verion. Close #151.
Unify handling of relval and offline server. Finalize the. Close #153.