code: protected String checkForMariaDb(DatabaseMetaData databaseMetaData, String databaseName) {
      try {
        String databaseProductVersion = databaseMetaData.getDatabaseProductVersion();
        if (databaseProductVersion != null && databaseProductVersion.toLowerCase().contains("mariadb")) {
          return MARIA_DB_PRODUCT_NAME;
        }
      } catch (SQLException ignore) {
      }
  
      try {
        String driverName = databaseMetaData.getDriverName();
        if (driverName != null && driverName.toLowerCase().contains("mariadb")) {
          return MARIA_DB_PRODUCT_NAME;
        }
      } catch (SQLException ignore) {
      }
  
      String metaDataClassName = databaseMetaData.getClass().getName();
      if (metaDataClassName != null && metaDataClassName.toLowerCase().contains("mariadb")) {
        return MARIA_DB_PRODUCT_NAME;
      }
  
      return databaseName;
    }
docs: The product name of mariadb is still 'MySQL'. This method
  tries if it can find some evidence for mariadb. If it is successful
  it will return "MariaDB", otherwise the provided database name.