add show command for system db
This commit is contained in:
parent
13bc1e744e
commit
48bc377233
|
@ -286,6 +286,9 @@ static void setCreateDBResultIntoDataBlock(SSDataBlock* pBlock, char* dbName, ch
|
||||||
hashPrefix = pCfg->hashPrefix + dbFNameLen + 1;
|
hashPrefix = pCfg->hashPrefix + dbFNameLen + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (IS_SYS_DBNAME(dbName)) {
|
||||||
|
len += sprintf(buf2 + VARSTR_HEADER_SIZE, "CREATE DATABASE `%s` ", dbName);
|
||||||
|
} else {
|
||||||
len += sprintf(
|
len += sprintf(
|
||||||
buf2 + VARSTR_HEADER_SIZE,
|
buf2 + VARSTR_HEADER_SIZE,
|
||||||
"CREATE DATABASE `%s` BUFFER %d CACHESIZE %d CACHEMODEL '%s' COMP %d DURATION %dm "
|
"CREATE DATABASE `%s` BUFFER %d CACHESIZE %d CACHEMODEL '%s' COMP %d DURATION %dm "
|
||||||
|
@ -302,6 +305,7 @@ static void setCreateDBResultIntoDataBlock(SSDataBlock* pBlock, char* dbName, ch
|
||||||
len += sprintf(buf2 + VARSTR_HEADER_SIZE + len, " RETENTIONS %s", retentions);
|
len += sprintf(buf2 + VARSTR_HEADER_SIZE + len, " RETENTIONS %s", retentions);
|
||||||
taosMemoryFree(retentions);
|
taosMemoryFree(retentions);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
(varDataLen(buf2)) = len;
|
(varDataLen(buf2)) = len;
|
||||||
|
|
||||||
|
|
|
@ -509,6 +509,10 @@ static int32_t getDBVgVersion(STranslateContext* pCxt, const char* pDbFName, int
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t getDBCfg(STranslateContext* pCxt, const char* pDbName, SDbCfgInfo* pInfo) {
|
static int32_t getDBCfg(STranslateContext* pCxt, const char* pDbName, SDbCfgInfo* pInfo) {
|
||||||
|
if (IS_SYS_DBNAME(pDbName)) {
|
||||||
|
return TSDB_CODE_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
SParseContext* pParCxt = pCxt->pParseCxt;
|
SParseContext* pParCxt = pCxt->pParseCxt;
|
||||||
SName name;
|
SName name;
|
||||||
tNameSetDbName(&name, pCxt->pParseCxt->acctId, pDbName, strlen(pDbName));
|
tNameSetDbName(&name, pCxt->pParseCxt->acctId, pDbName, strlen(pDbName));
|
||||||
|
|
Loading…
Reference in New Issue