提交 25c555a5 编写于 作者: D dapan1121

fix: refresh sys db vgroups after creating database

上级 78d72a7d
...@@ -163,6 +163,22 @@ int32_t processCreateDbRsp(void* param, SDataBuf* pMsg, int32_t code) { ...@@ -163,6 +163,22 @@ int32_t processCreateDbRsp(void* param, SDataBuf* pMsg, int32_t code) {
taosMemoryFree(pMsg->pEpSet); taosMemoryFree(pMsg->pEpSet);
if (code != TSDB_CODE_SUCCESS) { if (code != TSDB_CODE_SUCCESS) {
setErrno(pRequest, code); setErrno(pRequest, code);
} else {
struct SCatalog* pCatalog = NULL;
int32_t code = catalogGetHandle(pRequest->pTscObj->pAppInfo->clusterId, &pCatalog);
if (TSDB_CODE_SUCCESS == code) {
STscObj* pTscObj = pRequest->pTscObj;
SRequestConnInfo conn = {.pTrans = pTscObj->pAppInfo->pTransporter,
.requestId = pRequest->requestId,
.requestObjRefId = pRequest->self,
.mgmtEps = getEpSet_s(&pTscObj->pAppInfo->mgmtEp)};
char dbFName[TSDB_DB_FNAME_LEN];
snprintf(dbFName, sizeof(dbFName) - 1, "%d.%s", pTscObj->acctId, TSDB_INFORMATION_SCHEMA_DB);
catalogRefreshDBVgInfo(pCatalog, &conn, dbFName);
snprintf(dbFName, sizeof(dbFName) - 1, "%d.%s", pTscObj->acctId, TSDB_PERFORMANCE_SCHEMA_DB);
catalogRefreshDBVgInfo(pCatalog, &conn, dbFName);
}
} }
if (pRequest->body.queryFp) { if (pRequest->body.queryFp) {
......
...@@ -67,4 +67,19 @@ sql insert into t1 values (1591060628000, 1); ...@@ -67,4 +67,19 @@ sql insert into t1 values (1591060628000, 1);
sql alter table st1 drop tag t2; sql alter table st1 drop tag t2;
sql create table t2 using st1 tags(2); sql create table t2 using st1 tags(2);
print ======== drop tag in super table
sql create database if not exists aaa;
sql select table_name, db_name from information_schema.ins_tables t where t.db_name like 'aaa';
if $rows != 0 then
return -1
endi
sql drop database if exists foo;
sql create database if not exists foo;
sql create table foo.t(ts timestamp,name varchar(20));
sql create table foo.xt(ts timestamp,name varchar(20));
sql select table_name, db_name from information_schema.ins_tables t where t.db_name like 'foo';
if $rows != 2 then
return -1
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT system sh/exec.sh -n dnode1 -s stop -x SIGINT
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册