Skip to content

Commit 7ce12f8

Browse files
authored
fix(cynosdb): [120305083] Fix the problem of matching errors caused b… (#2912)
* fix(cynosdb): [120305083] Fix the problem of matching errors caused by fuzzy query * fix: add changelog
1 parent 4cfa818 commit 7ce12f8

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.changelog/2912.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
resource/tencentcloud_cynosdb_cluster_databases: Fix the problem of matching errors caused by fuzzy query.
3+
```

tencentcloud/services/cynosdb/service_tencentcloud_cynosdb.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2232,7 +2232,12 @@ func (me *CynosdbService) DescribeCynosdbClusterDatabasesById(ctx context.Contex
22322232
return
22332233
}
22342234

2235-
clusterDatabases = response.Response.DbInfos[0]
2235+
for _, dbInfo := range response.Response.DbInfos {
2236+
if dbInfo != nil && dbInfo.DbName != nil && *dbInfo.DbName == dbName {
2237+
clusterDatabases = dbInfo
2238+
return
2239+
}
2240+
}
22362241

22372242
return
22382243
}

0 commit comments

Comments
 (0)