forked from github/dataease
Merge pull request #3479 from dataease/pr@dev@dataset
fix(数据源): mysql8 获取表字段为空
This commit is contained in:
commit
7cc0fa5823
@ -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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user