Merge pull request #6662 from taosdata/bugfix/TD-4915

[TD-4915]<fix> fix show-create-database except
This commit is contained in:
Haojun Liao 2021-06-30 11:30:47 +08:00 committed by GitHub
commit 562d82ed68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -481,6 +481,7 @@ static int32_t tscGetDBInfo(SCreateBuilder *builder, char *result) {
char buf[TSDB_DB_NAME_LEN + 64] = {0}; char buf[TSDB_DB_NAME_LEN + 64] = {0};
do { do {
memset(buf, 0, sizeof(buf));
int32_t* lengths = taos_fetch_lengths(pSql); int32_t* lengths = taos_fetch_lengths(pSql);
int32_t ret = tscGetNthFieldResult(row, fields, lengths, 0, buf); int32_t ret = tscGetNthFieldResult(row, fields, lengths, 0, buf);
if (0 == ret && STR_NOCASE_EQUAL(buf, strlen(buf), builder->buf, strlen(builder->buf))) { if (0 == ret && STR_NOCASE_EQUAL(buf, strlen(buf), builder->buf, strlen(builder->buf))) {