code: private AbstractHelperDialect getDialect(MappedStatement ms) {
          //改为对dataSource做缓存
          DataSource dataSource = ms.getConfiguration().getEnvironment().getDataSource();
          String url = getUrl(dataSource);
          if (urlDialectMap.containsKey(url)) {
              return urlDialectMap.get(url);
          }
          try {
              lock.lock();
              if (urlDialectMap.containsKey(url)) {
                  return urlDialectMap.get(url);
              }
              if (StringUtil.isEmpty(url)) {
                  throw new PageException("无法自动获取jdbcUrl，请在分页插件中配置dialect参数!");
              }
              String dialectStr = fromJdbcUrl(url);
              if (dialectStr == null) {
                  throw new PageException("无法自动获取数据库类型，请通过 helperDialect 参数指定!");
              }
              AbstractHelperDialect dialect = initDialect(dialectStr, properties);
              urlDialectMap.put(url, dialect);
              return dialect;
          } finally {
              lock.unlock();
          }
      }
docs: 根据 jdbcUrl 获取数据库方言
  
  @param ms
  @return