Hotfix/sangshuduo/td 4406 taosdemo auto create tables (#6294)

* [TD-4406]<fix>: taosdemo auto create table.

* fix child table exists or auto create logic.

* reduce redundant conditions.

Co-authored-by: Shuduo Sang <sdsang@taosdata.com>
This commit is contained in:
Shuduo Sang 2021-05-30 07:02:30 +08:00 committed by GitHub
parent 934517b0b4
commit daa5205052
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -5144,8 +5144,7 @@ static int generateStbSQLHead(
char headBuf[HEAD_BUFF_LEN]; char headBuf[HEAD_BUFF_LEN];
if ((AUTO_CREATE_SUBTBL == superTblInfo->autoCreateTable) if (AUTO_CREATE_SUBTBL == superTblInfo->autoCreateTable) {
&& (TBL_ALREADY_EXISTS != superTblInfo->childTblExists)) {
char* tagsValBuf = NULL; char* tagsValBuf = NULL;
if (0 == superTblInfo->tagSource) { if (0 == superTblInfo->tagSource) {
tagsValBuf = generateTagVaulesForStb(superTblInfo, tableSeq); tagsValBuf = generateTagVaulesForStb(superTblInfo, tableSeq);