diff --git a/backend/src/main/java/io/dataease/provider/datasource/JdbcProvider.java b/backend/src/main/java/io/dataease/provider/datasource/JdbcProvider.java index 6468accbd6..ea5b3a204e 100644 --- a/backend/src/main/java/io/dataease/provider/datasource/JdbcProvider.java +++ b/backend/src/main/java/io/dataease/provider/datasource/JdbcProvider.java @@ -90,7 +90,9 @@ public class JdbcProvider extends DefaultJdbcProvider { DatabaseMetaData databaseMetaData = connection.getMetaData(); String tableNamePattern = datasourceRequest.getTable(); if(datasourceRequest.getDatasource().getType().equalsIgnoreCase(DatasourceTypes.mysql.name())){ - tableNamePattern = String.format(MySQLConstants.KEYWORD_TABLE, tableNamePattern); + if(databaseMetaData.getDriverMajorVersion() < 8){ + tableNamePattern = String.format(MySQLConstants.KEYWORD_TABLE, tableNamePattern); + } } ResultSet resultSet = databaseMetaData.getColumns(null, "%", tableNamePattern, "%"); while (resultSet.next()) {