diff --git a/packaging/cfg/taos.cfg b/packaging/cfg/taos.cfg index 3ae4e9941e96abb4c93b99ae86c40b3e3583bd08..c16410a4fe7bf0d7271d98dfb36ce53a615834ac 100644 --- a/packaging/cfg/taos.cfg +++ b/packaging/cfg/taos.cfg @@ -284,3 +284,6 @@ keepColumnName 1 # 0 no query allowed, queries are disabled # queryBufferSize -1 +# +# + diff --git a/src/client/src/tscParseInsert.c b/src/client/src/tscParseInsert.c index b8d7e8a32b668db5aa04a167b1c3c649d178df78..1902e3aa25a31a9a2f71bd489004e17c4fe04d6d 100644 --- a/src/client/src/tscParseInsert.c +++ b/src/client/src/tscParseInsert.c @@ -44,6 +44,12 @@ static int32_t parseBoundColumns(SInsertStatementParam *pInsertParam, SParsedDat int initMemRowBuilder(SMemRowBuilder *pBuilder, uint32_t nRows, uint32_t nCols, uint32_t nBoundCols, int32_t allNullLen) { ASSERT(nRows >= 0 && nCols > 0 && (nBoundCols <= nCols)); + + if (tsForceDataRow) { + pBuilder->memRowType = SMEM_ROW_DATA; + return TSDB_CODE_SUCCESS; + } + if (nRows > 0) { // already init(bind multiple rows by single column) if (pBuilder->compareStat == ROW_COMPARE_NEED && (pBuilder->rowInfo != NULL)) { diff --git a/src/common/inc/tglobal.h b/src/common/inc/tglobal.h index ffa89b8c39bea339e7916cc027232e88bfbaa44b..b2fed24aaf0a89dbea2db11401191a3bf08e7a95 100644 --- a/src/common/inc/tglobal.h +++ b/src/common/inc/tglobal.h @@ -46,6 +46,7 @@ extern int32_t tsDnodeId; extern int tsRpcTimer; extern int tsRpcMaxTime; extern int tsRpcForceTcp; // all commands go to tcp protocol if this is enabled +extern int32_t tsForceDataRow; // use SDataRow forcibly extern int32_t tsMaxConnections; extern int32_t tsMaxShellConns; extern int32_t tsShellActivityTimer; diff --git a/src/common/src/tglobal.c b/src/common/src/tglobal.c index 50d3fcd1a914bcb6af2629334a3f94daf7d26101..7d6db5fde46b3ed58bec4c59cf7091c0568926cf 100644 --- a/src/common/src/tglobal.c +++ b/src/common/src/tglobal.c @@ -54,6 +54,7 @@ int32_t tsDnodeId = 0; int32_t tsRpcTimer = 300; int32_t tsRpcMaxTime = 600; // seconds; int32_t tsRpcForceTcp = 0; // disable this, means query, show command use udp protocol as default +int32_t tsForceDataRow = 0; // disable this at default int32_t tsMaxShellConns = 50000; int32_t tsMaxConnections = 5000; int32_t tsShellActivityTimer = 3; // second @@ -691,6 +692,16 @@ static void doInitGlobalConfig(void) { cfg.unitType = TAOS_CFG_UTYPE_NONE; taosInitConfigOption(cfg); + cfg.option = "forceDataRow"; + cfg.ptr = &tsForceDataRow; + cfg.valType = TAOS_CFG_VTYPE_INT32; + cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_CLIENT | TSDB_CFG_CTYPE_B_SHOW; + cfg.minValue = 0; + cfg.maxValue = 1; + cfg.ptrLength = 0; + cfg.unitType = TAOS_CFG_UTYPE_NONE; + taosInitConfigOption(cfg); + cfg.option = "statusInterval"; cfg.ptr = &tsStatusInterval; cfg.valType = TAOS_CFG_VTYPE_INT32; diff --git a/src/util/inc/tconfig.h b/src/util/inc/tconfig.h index e2165ec1a32c3b47a47a4b22243d1ac178d58876..b3d7fcd0a094f809e2cad7d65c6399ce1bab6c00 100644 --- a/src/util/inc/tconfig.h +++ b/src/util/inc/tconfig.h @@ -20,7 +20,7 @@ extern "C" { #endif -#define TSDB_CFG_MAX_NUM 122 +#define TSDB_CFG_MAX_NUM 123 #define TSDB_CFG_PRINT_LEN 23 #define TSDB_CFG_OPTION_LEN 24 #define TSDB_CFG_VALUE_LEN 41