Merge pull request #22392 from taosdata/fix/TS-3811-m

fix: sma option for show create table
This commit is contained in:
dapan1121 2023-08-10 15:21:31 +08:00 committed by GitHub
commit 791e453219
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -624,7 +624,7 @@ void appendTableOptions(char* buf, int32_t* len, SDbCfgInfo* pDbCfg, STableCfg*
}
}
if (nSma < pCfg->numOfColumns) {
if (nSma < pCfg->numOfColumns && nSma > 0) {
bool smaOn = false;
*len += sprintf(buf + VARSTR_HEADER_SIZE + *len, " SMA(");
for (int32_t i = 0; i < pCfg->numOfColumns; ++i) {