Merge pull request #23553 from taosdata/szhou/fix/3.0/TD-27152

fix: use the right target name
This commit is contained in:
dapan1121 2023-11-07 09:04:42 +08:00 committed by GitHub
commit 0e7433e3b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 4 deletions

View File

@ -1757,7 +1757,7 @@ static int32_t processCtbAutoCreationAndCtbMeta(SInsertParseContext* pCxt, SVnod
.requestId = pCxt->pComCxt->requestId,
.requestObjRefId = pCxt->pComCxt->requestRid,
.mgmtEps = pCxt->pComCxt->mgmtEpSet};
code = catalogGetTableHashVgroup(pCxt->pComCxt->pCatalog, &conn, &pStmt->targetTableName, &vg);
code = catalogGetTableHashVgroup(pCxt->pComCxt->pCatalog, &conn, &pStbRowsCxt->ctbName, &vg);
if (code == TSDB_CODE_SUCCESS) {
taosHashPut(pStmt->pVgroupsHashObj, (const char*)(&vg.vgId), sizeof(vg.vgId), &vg, sizeof(vg));
pStbRowsCxt->pCtbMeta->uid = taosHashGetSize(pStmt->pSubTableHashObj) + 1;

View File

@ -81,10 +81,10 @@ pip3 list|grep taospy
pip3 uninstall taospy -y
pip3 install --default-timeout=120 taospy==2.7.12
#define taos-ws-py 0.2.8
#define taos-ws-py 0.3.1
pip3 list|grep taos-ws-py
pip3 uninstall taos-ws-py -y
pip3 install --default-timeout=120 taos-ws-py==0.2.8
pip3 install --default-timeout=120 taos-ws-py==0.3.1
$TIMEOUT_CMD $cmd
RET=$?

View File

@ -51,6 +51,21 @@ print $rows
if $rows != 5 then
return -1
endi
sql create database dgxy;
sql use dgxy;
sql create table st(ts timestamp, f int) tags(t int);
sql insert into ct1 using st tags(1) values(now, 1);
sql insert into st(tbname, ts, f) values('ct1', now, 2);
sql select * from ct1;
if $rows != 2 then
return -1
endi
sql show tables like 'ct1';
if $rows != 1 then
return -1
endi
sql_error insert into d2.st values(now, 1, 1)
sql_error insert into d2.st(ts, f) values(now, 1);
sql_error insert into d2.st(ts, f, tbname) values(now, 1);

View File

@ -176,7 +176,7 @@ class TDTestCase:
tdSql.checkData(3, 2, 10)
tdSql.checkData(4, 0, datetime.datetime(2021, 4, 19, 8, 0, 13))
tdSql.checkData(4, 1, 1)
tdSql.checkData(4, 2, None)
tdSql.checkData(4, 2, 1)
def run_insert_stb(self):
print("running {}".format('insert_stb'))