fix: use the right target name
This commit is contained in:
parent
0c4040b48e
commit
5495e1ceac
|
@ -1757,7 +1757,7 @@ static int32_t processCtbAutoCreationAndCtbMeta(SInsertParseContext* pCxt, SVnod
|
||||||
.requestId = pCxt->pComCxt->requestId,
|
.requestId = pCxt->pComCxt->requestId,
|
||||||
.requestObjRefId = pCxt->pComCxt->requestRid,
|
.requestObjRefId = pCxt->pComCxt->requestRid,
|
||||||
.mgmtEps = pCxt->pComCxt->mgmtEpSet};
|
.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) {
|
if (code == TSDB_CODE_SUCCESS) {
|
||||||
taosHashPut(pStmt->pVgroupsHashObj, (const char*)(&vg.vgId), sizeof(vg.vgId), &vg, sizeof(vg));
|
taosHashPut(pStmt->pVgroupsHashObj, (const char*)(&vg.vgId), sizeof(vg.vgId), &vg, sizeof(vg));
|
||||||
pStbRowsCxt->pCtbMeta->uid = taosHashGetSize(pStmt->pSubTableHashObj) + 1;
|
pStbRowsCxt->pCtbMeta->uid = taosHashGetSize(pStmt->pSubTableHashObj) + 1;
|
||||||
|
|
|
@ -51,6 +51,21 @@ print $rows
|
||||||
if $rows != 5 then
|
if $rows != 5 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
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 values(now, 1, 1)
|
||||||
sql_error insert into d2.st(ts, f) values(now, 1);
|
sql_error insert into d2.st(ts, f) values(now, 1);
|
||||||
sql_error insert into d2.st(ts, f, tbname) values(now, 1);
|
sql_error insert into d2.st(ts, f, tbname) values(now, 1);
|
||||||
|
|
Loading…
Reference in New Issue