[td-1603]
This commit is contained in:
parent
df32088b5d
commit
0dcef5b340
|
@ -817,17 +817,16 @@ int32_t tscSetTableFullName(STableMetaInfo* pTableMetaInfo, SStrToken* pzTableNa
|
||||||
oldName = strdup(pTableMetaInfo->name);
|
oldName = strdup(pTableMetaInfo->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasSpecifyDB(pzTableName)) {
|
if (hasSpecifyDB(pzTableName)) { // db has been specified in sql string so we ignore current db path
|
||||||
// db has been specified in sql string so we ignore current db path
|
|
||||||
code = setObjFullName(pTableMetaInfo->name, getAccountId(pSql), NULL, pzTableName, NULL);
|
code = setObjFullName(pTableMetaInfo->name, getAccountId(pSql), NULL, pzTableName, NULL);
|
||||||
if (code != 0) {
|
if (code != 0) {
|
||||||
invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg1);
|
invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg1);
|
||||||
}
|
}
|
||||||
} else { // get current DB name first, then set it into path
|
} else { // get current DB name first, and then set it into path
|
||||||
SStrToken t = {0};
|
SStrToken t = {0};
|
||||||
getCurrentDBName(pSql, &t);
|
getCurrentDBName(pSql, &t);
|
||||||
if (t.n == 0) {
|
if (t.n == 0) { // current database not available or not specified
|
||||||
code = invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg2);
|
code = TSDB_CODE_MND_DB_NOT_SELECTED;
|
||||||
} else {
|
} else {
|
||||||
code = setObjFullName(pTableMetaInfo->name, NULL, &t, pzTableName, NULL);
|
code = setObjFullName(pTableMetaInfo->name, NULL, &t, pzTableName, NULL);
|
||||||
if (code != 0) {
|
if (code != 0) {
|
||||||
|
|
Loading…
Reference in New Issue