From e4e8e040e625ab95db9c76097639ec9fb096be0b Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Thu, 29 Oct 2020 21:35:20 +0000 Subject: [PATCH 1/5] TD-1857 --- src/client/src/tscParseInsert.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/src/tscParseInsert.c b/src/client/src/tscParseInsert.c index ac34d26d2f..5e65126ef6 100644 --- a/src/client/src/tscParseInsert.c +++ b/src/client/src/tscParseInsert.c @@ -702,7 +702,7 @@ static int32_t doParseInsertStatement(SSqlObj *pSql, void *pTableList, char **st } int32_t code = TSDB_CODE_TSC_INVALID_SQL; - char * tmpTokenBuf = calloc(1, 4096); // used for deleting Escape character: \\, \', \" + char * tmpTokenBuf = calloc(1, 16*1024); // used for deleting Escape character: \\, \', \" if (NULL == tmpTokenBuf) { return TSDB_CODE_TSC_OUT_OF_MEMORY; } From eb2e0b958e1946fe1d2f2870e0087a7cd8844cfa Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Fri, 30 Oct 2020 14:35:43 +0800 Subject: [PATCH 2/5] [TD-225] fix bugs --- src/client/src/tscSubquery.c | 1 + src/client/src/tscUtil.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/client/src/tscSubquery.c b/src/client/src/tscSubquery.c index 3e907e5d77..c747eb2fe8 100644 --- a/src/client/src/tscSubquery.c +++ b/src/client/src/tscSubquery.c @@ -1449,6 +1449,7 @@ void tscHandleMasterJoinQuery(SSqlObj* pSql) { tscDebug("%p start subquery, total:%d", pSql, pQueryInfo->numOfTables); for (int32_t i = 0; i < pQueryInfo->numOfTables; ++i) { + SJoinSupporter *pSupporter = tscCreateJoinSupporter(pSql, i); if (pSupporter == NULL) { // failed to create support struct, abort current query diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index e2cc440335..7946214d4a 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -2158,7 +2158,7 @@ int16_t tscGetJoinTagColIdByUid(STagCond* pTagCond, uint64_t uid) { } int16_t tscGetTagColIndexById(STableMeta* pTableMeta, int16_t colId) { - int32_t numOfTags = tscGetNumOfColumns(pTableMeta); + int32_t numOfTags = tscGetNumOfTags(pTableMeta); SSchema* pSchema = tscGetTableTagSchema(pTableMeta); for(int32_t i = 0; i < numOfTags; ++i) { @@ -2167,7 +2167,8 @@ int16_t tscGetTagColIndexById(STableMeta* pTableMeta, int16_t colId) { } } - return -1; + // can not reach here + assert(0); } bool tscIsUpdateQuery(SSqlObj* pSql) { From d597ad5c54bd86bb83c4b1218d15bfe066c1070c Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Fri, 30 Oct 2020 14:43:19 +0800 Subject: [PATCH 3/5] [TD-225] fix bugs --- src/client/src/tscUtil.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index 7946214d4a..117874475b 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -2169,6 +2169,7 @@ int16_t tscGetTagColIndexById(STableMeta* pTableMeta, int16_t colId) { // can not reach here assert(0); + return INT16_MIN; } bool tscIsUpdateQuery(SSqlObj* pSql) { From ec730924828b77d9e27a15547d98f82167a520d2 Mon Sep 17 00:00:00 2001 From: Hui Li Date: Fri, 30 Oct 2020 15:32:25 +0800 Subject: [PATCH 4/5] [NONE] --- tests/examples/go/taosdemo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/examples/go/taosdemo.go b/tests/examples/go/taosdemo.go index 14a67b93d3..2c3a7d09b6 100644 --- a/tests/examples/go/taosdemo.go +++ b/tests/examples/go/taosdemo.go @@ -87,7 +87,7 @@ func init() { func printAllArgs() { fmt.Printf("\n============= args parse result: =============\n") - fmt.Printf("dbName: %v\n", configPara.hostName) + fmt.Printf("hostName: %v\n", configPara.hostName) fmt.Printf("serverPort: %v\n", configPara.serverPort) fmt.Printf("usr: %v\n", configPara.user) fmt.Printf("password: %v\n", configPara.password) From 49fff0ed2db37ca34d28f34f5c957419cd1fcd70 Mon Sep 17 00:00:00 2001 From: Jeff Tao Date: Fri, 30 Oct 2020 12:55:33 +0000 Subject: [PATCH 5/5] remove an invalid/read --- src/connector/go | 2 +- src/rpc/src/rpcMain.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/connector/go b/src/connector/go index 8d7bf74385..8c58c512b6 160000 --- a/src/connector/go +++ b/src/connector/go @@ -1 +1 @@ -Subproject commit 8d7bf743852897110cbdcc7c4322cd7a74d4167b +Subproject commit 8c58c512b6acda8bcdfa48fdc7140227b5221766 diff --git a/src/rpc/src/rpcMain.c b/src/rpc/src/rpcMain.c index 1dfd87ff3a..d170fed30c 100644 --- a/src/rpc/src/rpcMain.c +++ b/src/rpc/src/rpcMain.c @@ -557,10 +557,7 @@ void rpcCancelRequest(void *handle) { int code = taosAcquireRef(tsRpcRefId, pContext); if (code < 0) return; - if (pContext->pConn) { - tDebug("%s, app tries to cancel request", pContext->pConn->info); - rpcCloseConn(pContext->pConn); - } + rpcCloseConn(pContext->pConn); taosReleaseRef(tsRpcRefId, pContext); } @@ -655,6 +652,7 @@ static void rpcReleaseConn(SRpcConn *pConn) { static void rpcCloseConn(void *thandle) { SRpcConn *pConn = (SRpcConn *)thandle; + if (pConn == NULL) return; rpcLockConn(pConn); @@ -1026,6 +1024,7 @@ static void rpcProcessBrokenLink(SRpcConn *pConn) { if (pConn->outType) { SRpcReqContext *pContext = pConn->pContext; pContext->code = TSDB_CODE_RPC_NETWORK_UNAVAIL; + pContext->pConn = NULL; pConn->pReqMsg = NULL; taosTmrStart(rpcProcessConnError, 0, pContext, pRpc->tmrCtrl); } @@ -1135,6 +1134,7 @@ static void rpcProcessIncomingMsg(SRpcConn *pConn, SRpcHead *pHead, SRpcReqConte // it's a response rpcMsg.handle = pContext; rpcMsg.ahandle = pContext->ahandle; + pContext->pConn = NULL; // for UDP, port may be changed by server, the port in epSet shall be used for cache if (pHead->code != TSDB_CODE_RPC_TOO_SLOW) { @@ -1370,6 +1370,7 @@ static void rpcProcessRetryTimer(void *param, void *tmrId) { tDebug("%s, failed to send msg:%s to %s:%hu", pConn->info, taosMsg[pConn->outType], pConn->peerFqdn, pConn->peerPort); if (pConn->pContext) { pConn->pContext->code = TSDB_CODE_RPC_NETWORK_UNAVAIL; + pConn->pContext->pConn = NULL; pConn->pReqMsg = NULL; taosTmrStart(rpcProcessConnError, 0, pConn->pContext, pRpc->tmrCtrl); rpcReleaseConn(pConn);