Merge pull request #21253 from taosdata/feat/TD-23643-3.0
feat: support connectors licensing
This commit is contained in:
commit
eda4c85dbb
|
@ -26,6 +26,10 @@ extern "C" {
|
||||||
#include "tgrantCfg.h"
|
#include "tgrantCfg.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef GRANTS_COL_MAX_LEN
|
||||||
|
#define GRANTS_COL_MAX_LEN 196
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
TSDB_GRANT_ALL,
|
TSDB_GRANT_ALL,
|
||||||
TSDB_GRANT_TIME,
|
TSDB_GRANT_TIME,
|
||||||
|
@ -47,6 +51,31 @@ typedef enum {
|
||||||
int32_t grantCheck(EGrantType grant);
|
int32_t grantCheck(EGrantType grant);
|
||||||
|
|
||||||
#ifndef GRANTS_CFG
|
#ifndef GRANTS_CFG
|
||||||
|
#ifdef TD_ENTERPRISE
|
||||||
|
#define GRANTS_SCHEMA \
|
||||||
|
static const SSysDbTableSchema grantsSchema[] = { \
|
||||||
|
{.name = "version", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
|
||||||
|
{.name = "expire_time", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
|
||||||
|
{.name = "expired", .bytes = 5 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
|
||||||
|
{.name = "storage", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
|
||||||
|
{.name = "timeseries", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
|
||||||
|
{.name = "databases", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
|
||||||
|
{.name = "users", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
|
||||||
|
{.name = "accounts", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
|
||||||
|
{.name = "dnodes", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
|
||||||
|
{.name = "connections", .bytes = 11 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
|
||||||
|
{.name = "streams", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
|
||||||
|
{.name = "cpu_cores", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
|
||||||
|
{.name = "speed", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
|
||||||
|
{.name = "querytime", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
|
||||||
|
{.name = "opc_da", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
|
||||||
|
{.name = "opc_ua", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
|
||||||
|
{.name = "pi", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
|
||||||
|
{.name = "kafka", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
|
||||||
|
{.name = "influxdb", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
|
||||||
|
{.name = "mqtt", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
|
||||||
|
}
|
||||||
|
#else
|
||||||
#define GRANTS_SCHEMA \
|
#define GRANTS_SCHEMA \
|
||||||
static const SSysDbTableSchema grantsSchema[] = { \
|
static const SSysDbTableSchema grantsSchema[] = { \
|
||||||
{.name = "version", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
|
{.name = "version", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
|
||||||
|
@ -64,6 +93,7 @@ int32_t grantCheck(EGrantType grant);
|
||||||
{.name = "speed", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
|
{.name = "speed", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
|
||||||
{.name = "querytime", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
|
{.name = "querytime", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#define GRANT_CFG_ADD
|
#define GRANT_CFG_ADD
|
||||||
#define GRANT_CFG_SET
|
#define GRANT_CFG_SET
|
||||||
#define GRANT_CFG_GET
|
#define GRANT_CFG_GET
|
||||||
|
|
|
@ -1232,6 +1232,14 @@ typedef struct {
|
||||||
SEp ep;
|
SEp ep;
|
||||||
} SDnodeEp;
|
} SDnodeEp;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
int32_t id;
|
||||||
|
int8_t isMnode;
|
||||||
|
SEp ep;
|
||||||
|
char active[TSDB_ACTIVE_KEY_LEN];
|
||||||
|
char connActive[TSDB_CONN_ACTIVE_KEY_LEN];
|
||||||
|
} SDnodeInfo;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int64_t dnodeVer;
|
int64_t dnodeVer;
|
||||||
SDnodeCfg dnodeCfg;
|
SDnodeCfg dnodeCfg;
|
||||||
|
|
|
@ -267,6 +267,9 @@ typedef enum ELogicConditionType {
|
||||||
#define TSDB_DNODE_CONFIG_LEN 128
|
#define TSDB_DNODE_CONFIG_LEN 128
|
||||||
#define TSDB_DNODE_VALUE_LEN 256
|
#define TSDB_DNODE_VALUE_LEN 256
|
||||||
|
|
||||||
|
#define TSDB_ACTIVE_KEY_LEN 109 // history 109:?
|
||||||
|
#define TSDB_CONN_ACTIVE_KEY_LEN 257 // history 257:?
|
||||||
|
|
||||||
#define TSDB_DEFAULT_PKT_SIZE 65480 // same as RPC_MAX_UDP_SIZE
|
#define TSDB_DEFAULT_PKT_SIZE 65480 // same as RPC_MAX_UDP_SIZE
|
||||||
|
|
||||||
#define TSDB_PAYLOAD_SIZE TSDB_DEFAULT_PKT_SIZE
|
#define TSDB_PAYLOAD_SIZE TSDB_DEFAULT_PKT_SIZE
|
||||||
|
|
|
@ -35,6 +35,10 @@ static const SSysDbTableSchema dnodesSchema[] = {
|
||||||
{.name = "create_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = true},
|
{.name = "create_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = true},
|
||||||
{.name = "reboot_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = true},
|
{.name = "reboot_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = true},
|
||||||
{.name = "note", .bytes = 256 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
|
{.name = "note", .bytes = 256 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
|
||||||
|
#ifdef TD_ENTERPRISE
|
||||||
|
{.name = "active_code", .bytes = TSDB_ACTIVE_KEY_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
|
||||||
|
{.name = "c_active_code", .bytes = TSDB_CONN_ACTIVE_KEY_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
static const SSysDbTableSchema mnodesSchema[] = {
|
static const SSysDbTableSchema mnodesSchema[] = {
|
||||||
|
|
|
@ -206,6 +206,8 @@ typedef struct {
|
||||||
uint16_t port;
|
uint16_t port;
|
||||||
char fqdn[TSDB_FQDN_LEN];
|
char fqdn[TSDB_FQDN_LEN];
|
||||||
char ep[TSDB_EP_LEN];
|
char ep[TSDB_EP_LEN];
|
||||||
|
char active[TSDB_ACTIVE_KEY_LEN];
|
||||||
|
char connActive[TSDB_CONN_ACTIVE_KEY_LEN];
|
||||||
} SDnodeObj;
|
} SDnodeObj;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
@ -29,7 +29,7 @@ void mndReleaseDnode(SMnode *pMnode, SDnodeObj *pDnode);
|
||||||
SEpSet mndGetDnodeEpset(SDnodeObj *pDnode);
|
SEpSet mndGetDnodeEpset(SDnodeObj *pDnode);
|
||||||
int32_t mndGetDnodeSize(SMnode *pMnode);
|
int32_t mndGetDnodeSize(SMnode *pMnode);
|
||||||
bool mndIsDnodeOnline(SDnodeObj *pDnode, int64_t curMs);
|
bool mndIsDnodeOnline(SDnodeObj *pDnode, int64_t curMs);
|
||||||
void mndGetDnodeData(SMnode *pMnode, SArray *pDnodeEps);
|
void mndGetDnodeData(SMnode *pMnode, SArray *pDnodeInfo);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include "tmisce.h"
|
#include "tmisce.h"
|
||||||
#include "mndCluster.h"
|
#include "mndCluster.h"
|
||||||
|
|
||||||
#define TSDB_DNODE_VER_NUMBER 1
|
#define TSDB_DNODE_VER_NUMBER 2
|
||||||
#define TSDB_DNODE_RESERVE_SIZE 64
|
#define TSDB_DNODE_RESERVE_SIZE 64
|
||||||
|
|
||||||
static const char *offlineReason[] = {
|
static const char *offlineReason[] = {
|
||||||
|
@ -141,6 +141,10 @@ static SSdbRaw *mndDnodeActionEncode(SDnodeObj *pDnode) {
|
||||||
SDB_SET_INT16(pRaw, dataPos, pDnode->port, _OVER)
|
SDB_SET_INT16(pRaw, dataPos, pDnode->port, _OVER)
|
||||||
SDB_SET_BINARY(pRaw, dataPos, pDnode->fqdn, TSDB_FQDN_LEN, _OVER)
|
SDB_SET_BINARY(pRaw, dataPos, pDnode->fqdn, TSDB_FQDN_LEN, _OVER)
|
||||||
SDB_SET_RESERVE(pRaw, dataPos, TSDB_DNODE_RESERVE_SIZE, _OVER)
|
SDB_SET_RESERVE(pRaw, dataPos, TSDB_DNODE_RESERVE_SIZE, _OVER)
|
||||||
|
SDB_SET_INT16(pRaw, dataPos, TSDB_ACTIVE_KEY_LEN, _OVER)
|
||||||
|
SDB_SET_BINARY(pRaw, dataPos, pDnode->active, TSDB_ACTIVE_KEY_LEN, _OVER)
|
||||||
|
SDB_SET_INT16(pRaw, dataPos, TSDB_CONN_ACTIVE_KEY_LEN, _OVER)
|
||||||
|
SDB_SET_BINARY(pRaw, dataPos, pDnode->connActive, TSDB_CONN_ACTIVE_KEY_LEN, _OVER)
|
||||||
SDB_SET_DATALEN(pRaw, dataPos, _OVER);
|
SDB_SET_DATALEN(pRaw, dataPos, _OVER);
|
||||||
|
|
||||||
terrno = 0;
|
terrno = 0;
|
||||||
|
@ -163,7 +167,7 @@ static SSdbRow *mndDnodeActionDecode(SSdbRaw *pRaw) {
|
||||||
|
|
||||||
int8_t sver = 0;
|
int8_t sver = 0;
|
||||||
if (sdbGetRawSoftVer(pRaw, &sver) != 0) goto _OVER;
|
if (sdbGetRawSoftVer(pRaw, &sver) != 0) goto _OVER;
|
||||||
if (sver != TSDB_DNODE_VER_NUMBER) {
|
if (sver < 1 || sver > TSDB_DNODE_VER_NUMBER) {
|
||||||
terrno = TSDB_CODE_SDB_INVALID_DATA_VER;
|
terrno = TSDB_CODE_SDB_INVALID_DATA_VER;
|
||||||
goto _OVER;
|
goto _OVER;
|
||||||
}
|
}
|
||||||
|
@ -181,6 +185,13 @@ static SSdbRow *mndDnodeActionDecode(SSdbRaw *pRaw) {
|
||||||
SDB_GET_INT16(pRaw, dataPos, &pDnode->port, _OVER)
|
SDB_GET_INT16(pRaw, dataPos, &pDnode->port, _OVER)
|
||||||
SDB_GET_BINARY(pRaw, dataPos, pDnode->fqdn, TSDB_FQDN_LEN, _OVER)
|
SDB_GET_BINARY(pRaw, dataPos, pDnode->fqdn, TSDB_FQDN_LEN, _OVER)
|
||||||
SDB_GET_RESERVE(pRaw, dataPos, TSDB_DNODE_RESERVE_SIZE, _OVER)
|
SDB_GET_RESERVE(pRaw, dataPos, TSDB_DNODE_RESERVE_SIZE, _OVER)
|
||||||
|
if (sver > 1) {
|
||||||
|
int16_t keyLen = 0;
|
||||||
|
SDB_GET_INT16(pRaw, dataPos, &keyLen, _OVER)
|
||||||
|
SDB_GET_BINARY(pRaw, dataPos, pDnode->active, keyLen, _OVER)
|
||||||
|
SDB_GET_INT16(pRaw, dataPos, &keyLen, _OVER)
|
||||||
|
SDB_GET_BINARY(pRaw, dataPos, pDnode->connActive, keyLen, _OVER)
|
||||||
|
}
|
||||||
|
|
||||||
terrno = 0;
|
terrno = 0;
|
||||||
if (tmsgUpdateDnodeInfo(&pDnode->id, NULL, pDnode->fqdn, &pDnode->port)) {
|
if (tmsgUpdateDnodeInfo(&pDnode->id, NULL, pDnode->fqdn, &pDnode->port)) {
|
||||||
|
@ -312,7 +323,7 @@ bool mndIsDnodeOnline(SDnodeObj *pDnode, int64_t curMs) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void mndGetDnodeData(SMnode *pMnode, SArray *pDnodeEps) {
|
static void mndGetDnodeEps(SMnode *pMnode, SArray *pDnodeEps) {
|
||||||
SSdb *pSdb = pMnode->pSdb;
|
SSdb *pSdb = pMnode->pSdb;
|
||||||
|
|
||||||
int32_t numOfEps = 0;
|
int32_t numOfEps = 0;
|
||||||
|
@ -337,6 +348,34 @@ void mndGetDnodeData(SMnode *pMnode, SArray *pDnodeEps) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void mndGetDnodeData(SMnode *pMnode, SArray *pDnodeInfo) {
|
||||||
|
SSdb *pSdb = pMnode->pSdb;
|
||||||
|
|
||||||
|
int32_t numOfEps = 0;
|
||||||
|
void *pIter = NULL;
|
||||||
|
while (1) {
|
||||||
|
SDnodeObj *pDnode = NULL;
|
||||||
|
ESdbStatus objStatus = 0;
|
||||||
|
pIter = sdbFetchAll(pSdb, SDB_DNODE, pIter, (void **)&pDnode, &objStatus, true);
|
||||||
|
if (pIter == NULL) break;
|
||||||
|
|
||||||
|
SDnodeInfo dInfo;
|
||||||
|
dInfo.id = pDnode->id;
|
||||||
|
dInfo.ep.port = pDnode->port;
|
||||||
|
tstrncpy(dInfo.ep.fqdn, pDnode->fqdn, TSDB_FQDN_LEN);
|
||||||
|
tstrncpy(dInfo.active, pDnode->active, TSDB_ACTIVE_KEY_LEN);
|
||||||
|
tstrncpy(dInfo.connActive, pDnode->connActive, TSDB_CONN_ACTIVE_KEY_LEN);
|
||||||
|
sdbRelease(pSdb, pDnode);
|
||||||
|
if (mndIsMnode(pMnode, pDnode->id)) {
|
||||||
|
dInfo.isMnode = 1;
|
||||||
|
} else {
|
||||||
|
dInfo.isMnode = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
taosArrayPush(pDnodeInfo, &dInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static int32_t mndCheckClusterCfgPara(SMnode *pMnode, SDnodeObj *pDnode, const SClusterCfg *pCfg) {
|
static int32_t mndCheckClusterCfgPara(SMnode *pMnode, SDnodeObj *pDnode, const SClusterCfg *pCfg) {
|
||||||
if (pCfg->statusInterval != tsStatusInterval) {
|
if (pCfg->statusInterval != tsStatusInterval) {
|
||||||
mError("dnode:%d, statusInterval:%d inconsistent with cluster:%d", pDnode->id, pCfg->statusInterval,
|
mError("dnode:%d, statusInterval:%d inconsistent with cluster:%d", pDnode->id, pCfg->statusInterval,
|
||||||
|
@ -543,7 +582,7 @@ static int32_t mndProcessStatusReq(SRpcMsg *pReq) {
|
||||||
goto _OVER;
|
goto _OVER;
|
||||||
}
|
}
|
||||||
|
|
||||||
mndGetDnodeData(pMnode, statusRsp.pDnodeEps);
|
mndGetDnodeEps(pMnode, statusRsp.pDnodeEps);
|
||||||
|
|
||||||
int32_t contLen = tSerializeSStatusRsp(NULL, 0, &statusRsp);
|
int32_t contLen = tSerializeSStatusRsp(NULL, 0, &statusRsp);
|
||||||
void *pHead = rpcMallocCont(contLen);
|
void *pHead = rpcMallocCont(contLen);
|
||||||
|
@ -1060,6 +1099,7 @@ static int32_t mndRetrieveDnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
|
||||||
ESdbStatus objStatus = 0;
|
ESdbStatus objStatus = 0;
|
||||||
SDnodeObj *pDnode = NULL;
|
SDnodeObj *pDnode = NULL;
|
||||||
int64_t curMs = taosGetTimestampMs();
|
int64_t curMs = taosGetTimestampMs();
|
||||||
|
char buf[TSDB_CONN_ACTIVE_KEY_LEN + VARSTR_HEADER_SIZE]; // make sure TSDB_CONN_ACTIVE_KEY_LEN >= TSDB_EP_LEN
|
||||||
|
|
||||||
while (numOfRows < rows) {
|
while (numOfRows < rows) {
|
||||||
pShow->pIter = sdbFetchAll(pSdb, SDB_DNODE, pShow->pIter, (void **)&pDnode, &objStatus, true);
|
pShow->pIter = sdbFetchAll(pSdb, SDB_DNODE, pShow->pIter, (void **)&pDnode, &objStatus, true);
|
||||||
|
@ -1071,7 +1111,6 @@ static int32_t mndRetrieveDnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
|
||||||
SColumnInfoData *pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
|
SColumnInfoData *pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
|
||||||
colDataSetVal(pColInfo, numOfRows, (const char *)&pDnode->id, false);
|
colDataSetVal(pColInfo, numOfRows, (const char *)&pDnode->id, false);
|
||||||
|
|
||||||
char buf[tListLen(pDnode->ep) + VARSTR_HEADER_SIZE] = {0};
|
|
||||||
STR_WITH_MAXSIZE_TO_VARSTR(buf, pDnode->ep, pShow->pMeta->pSchemas[cols].bytes);
|
STR_WITH_MAXSIZE_TO_VARSTR(buf, pDnode->ep, pShow->pMeta->pSchemas[cols].bytes);
|
||||||
|
|
||||||
pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
|
pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
|
||||||
|
@ -1096,10 +1135,9 @@ static int32_t mndRetrieveDnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
|
||||||
status = "offline";
|
status = "offline";
|
||||||
}
|
}
|
||||||
|
|
||||||
char b1[16] = {0};
|
STR_TO_VARSTR(buf, status);
|
||||||
STR_TO_VARSTR(b1, status);
|
|
||||||
pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
|
pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
|
||||||
colDataSetVal(pColInfo, numOfRows, b1, false);
|
colDataSetVal(pColInfo, numOfRows, buf, false);
|
||||||
|
|
||||||
pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
|
pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
|
||||||
colDataSetVal(pColInfo, numOfRows, (const char *)&pDnode->createdTime, false);
|
colDataSetVal(pColInfo, numOfRows, (const char *)&pDnode->createdTime, false);
|
||||||
|
@ -1114,6 +1152,16 @@ static int32_t mndRetrieveDnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
|
||||||
colDataSetVal(pColInfo, numOfRows, b, false);
|
colDataSetVal(pColInfo, numOfRows, b, false);
|
||||||
taosMemoryFreeClear(b);
|
taosMemoryFreeClear(b);
|
||||||
|
|
||||||
|
#ifdef TD_ENTERPRISE
|
||||||
|
STR_TO_VARSTR(buf, pDnode->active);
|
||||||
|
pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
|
||||||
|
colDataSetVal(pColInfo, numOfRows, buf, false);
|
||||||
|
|
||||||
|
STR_TO_VARSTR(buf, pDnode->connActive);
|
||||||
|
pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
|
||||||
|
colDataSetVal(pColInfo, numOfRows, buf, false);
|
||||||
|
#endif
|
||||||
|
|
||||||
numOfRows++;
|
numOfRows++;
|
||||||
sdbRelease(pSdb, pDnode);
|
sdbRelease(pSdb, pDnode);
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,8 @@ class TDTestCase:
|
||||||
tdSql.execute("insert into db.ctb using db.stb tags(1) (ts, c1) values (now, 1)")
|
tdSql.execute("insert into db.ctb using db.stb tags(1) (ts, c1) values (now, 1)")
|
||||||
|
|
||||||
tdSql.query("select count(*) from information_schema.ins_columns")
|
tdSql.query("select count(*) from information_schema.ins_columns")
|
||||||
tdSql.checkData(0, 0, 277)
|
# enterprise version: 285, community version: 277
|
||||||
|
tdSql.checkData(0, 0, 285)
|
||||||
|
|
||||||
tdSql.query("select * from information_schema.ins_columns where table_name = 'ntb'")
|
tdSql.query("select * from information_schema.ins_columns where table_name = 'ntb'")
|
||||||
tdSql.checkRows(14)
|
tdSql.checkRows(14)
|
||||||
|
|
Loading…
Reference in New Issue