未验证 提交 fcc308fb 编写于 作者: S slguan 提交者: GitHub

Merge pull request #694 from taosdata/feature/liaohj

Feature/liaohj
......@@ -13,8 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdbool.h>
#include "os.h"
#include "com_taosdata_jdbc_TSDBJNIConnector.h"
#include "taos.h"
......
......@@ -13,12 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <assert.h>
#include <float.h>
#include <math.h>
#include <stdbool.h>
#include <stdlib.h>
#include "os.h"
#include "taosmsg.h"
#include "tast.h"
......
......@@ -13,8 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
#include <stdlib.h>
#include "os.h"
#include "tlog.h"
#include "trpc.h"
......
......@@ -13,14 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <assert.h>
#include <pthread.h>
#include <semaphore.h>
#include <signal.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "os.h"
#include "tglobalcfg.h"
#include "tlog.h"
......
......@@ -15,16 +15,6 @@
#pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
#include <assert.h>
#include <ctype.h>
#include <fcntl.h>
#include <float.h>
#include <math.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <wctype.h>
#include "os.h"
#include "taosmsg.h"
#include "tast.h"
......
......@@ -13,13 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <fcntl.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <tsclient.h>
#include <sys/stat.h>
#include "os.h"
#include "tcache.h"
#include "tscJoinProcess.h"
......
......@@ -13,9 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include "os.h"
#include "taosmsg.h"
#include "tcache.h"
......
......@@ -21,22 +21,8 @@
#pragma GCC diagnostic ignored "-Woverflow"
#pragma GCC diagnostic ignored "-Wunused-variable"
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <sys/types.h>
#include <assert.h>
#include <float.h>
#include <math.h>
#include <string.h>
#include <time.h>
#include <wchar.h>
#include "ihash.h"
#include "os.h"
#include "ihash.h"
#include "tscSecondaryMerge.h"
#include "tscUtil.h"
#include "tschemautil.h"
......
......@@ -13,9 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
#include <stdlib.h>
#include "taos.h"
#include "tsclient.h"
#include "tsql.h"
......
......@@ -13,9 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
#include <stdlib.h>
#include "os.h"
#include "tlog.h"
#include "tsclient.h"
......
......@@ -13,13 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include <stdarg.h>
#include "os.h"
#include "tglobalcfg.h"
#include "tsql.h"
......
......@@ -13,10 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include "os.h"
#include "taosmsg.h"
#include "tschemautil.h"
......
......@@ -13,13 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <assert.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdlib.h>
#include <tsclient.h>
#include "tlosertree.h"
#include "os.h"
#include "tlosertree.h"
#include "tscSecondaryMerge.h"
#include "tscUtil.h"
......
......@@ -13,12 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <assert.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <wchar.h>
#include "os.h"
#include "tcache.h"
#include "trpc.h"
......@@ -2848,7 +2842,7 @@ int tscBuildMetricMetaMsg(SSqlObj *pSql) {
return msgLen;
}
int tscEstimateBuildHeartBeatMsgLength(SSqlObj *pSql) {
int tscEstimateHeartBeatMsgLength(SSqlObj *pSql) {
int size = 0;
STscObj *pObj = pSql->pTscObj;
......@@ -2881,7 +2875,7 @@ int tscBuildHeartBeatMsg(SSqlObj *pSql) {
pthread_mutex_lock(&pObj->mutex);
size = tscEstimateBuildHeartBeatMsgLength(pSql);
size = tscEstimateHeartBeatMsgLength(pSql);
if (TSDB_CODE_SUCCESS != tscAllocPayload(pCmd, size)) {
tscError("%p failed to malloc for heartbeat msg", pSql);
return -1;
......@@ -3613,7 +3607,7 @@ int tscRenewMeterMeta(SSqlObj *pSql, char *meterId) {
code = tscDoGetMeterMeta(pSql, meterId, 0); // todo ??
} else {
tscTrace("%p metric query not update metric meta, numOfTags:%d, numOfCols:%d, uid:%d, addr:%p", pSql,
tscTrace("%p metric query not update metric meta, numOfTags:%d, numOfCols:%d, uid:%lld, addr:%p", pSql,
pMeterMetaInfo->pMeterMeta->numOfTags, pCmd->numOfCols, pMeterMetaInfo->pMeterMeta->uid,
pMeterMetaInfo->pMeterMeta);
}
......
......@@ -13,9 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
#include <stdlib.h>
#include "os.h"
#include "tcache.h"
#include "tlog.h"
......
......@@ -13,7 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <signal.h>
#include "os.h"
#include "shash.h"
#include "taos.h"
......
......@@ -13,10 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <assert.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include "os.h"
#include "tscSyntaxtreefunction.h"
#include "tsql.h"
......
......@@ -13,15 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <locale.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <time.h>
#include "os.h"
#include "taosmsg.h"
#include "tcache.h"
......
......@@ -13,10 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <assert.h>
#include <math.h>
#include <time.h>
#include "os.h"
#include "ihash.h"
#include "taosmsg.h"
......
......@@ -41,7 +41,7 @@ extern int taosTmrThreads;
tprintf("TMR ", tmrDebugFlag, __VA_ARGS__); \
} } while(0)
#define MAX_NUM_OF_TMRCTL 32
#define MAX_NUM_OF_TMRCTL 512
#define MSECONDS_PER_TICK 5
void *taosTmrInit(int maxTmr, int resoultion, int longest, const char *label);
......
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TDENGINE_PLATFORM_LINUX_H
#define TDENGINE_PLATFORM_LINUX_H
......@@ -25,10 +25,12 @@ extern "C" {
#include <arpa/inet.h>
#include <assert.h>
#include <dirent.h>
#include <endian.h>
#include <float.h>
#include <ifaddrs.h>
#include <limits.h>
#include <locale.h>
#include <math.h>
#include <netdb.h>
#include <netinet/in.h>
......@@ -37,7 +39,8 @@ extern "C" {
#include <netinet/udp.h>
#include <pthread.h>
#include <pwd.h>
#include <stdbool.h>
#include <semaphore.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
......@@ -45,21 +48,19 @@ extern "C" {
#include <sys/epoll.h>
#include <sys/file.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/sendfile.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <sys/time.h>
#include <sys/uio.h>
#include <sys/mman.h>
#include <sys/un.h>
#include <syslog.h>
#include <termios.h>
#include <unistd.h>
#include <wchar.h>
#include <wordexp.h>
#include <locale.h>
#include <dirent.h>
#define taosCloseSocket(x) \
{ \
......@@ -110,7 +111,7 @@ extern "C" {
#define __sync_sub_and_fetch_ptr __sync_sub_and_fetch
int32_t __sync_val_load_32(int32_t *ptr);
void __sync_val_restore_32(int32_t *ptr, int32_t newval);
void __sync_val_restore_32(int32_t *ptr, int32_t newval);
#define SWAP(a, b, c) \
do { \
......@@ -168,9 +169,9 @@ bool taosSkipSocketCheck();
int64_t str2int64(char *str);
#define BUILDIN_CLZL(val) __builtin_clzl(val)
#define BUILDIN_CLZ(val) __builtin_clz(val)
#define BUILDIN_CLZ(val) __builtin_clz(val)
#define BUILDIN_CTZL(val) __builtin_ctzl(val)
#define BUILDIN_CTZ(val) __builtin_ctz(val)
#define BUILDIN_CTZ(val) __builtin_ctz(val)
#ifdef __cplusplus
}
......
......@@ -833,6 +833,7 @@ static void removeMeterFromMetricIndex(STabObj *pMetric, STabObj *pMeter) {
}
}
tSkipListDestroyKey(&key);
if (num != 0) {
free(pRes);
}
......
......@@ -3436,9 +3436,18 @@ void pointInterpSupporterSetData(SQInfo *pQInfo, SPointInterpoSupporter *pPointI
if (pQuery->interpoType == TSDB_INTERPO_SET_VALUE) {
for (int32_t i = 0; i < pQuery->numOfOutputCols; ++i) {
SQLFunctionCtx *pCtx = &pRuntimeEnv->pCtx[i];
// only the function of interp needs the corresponding information
if (pCtx->functionId != TSDB_FUNC_INTERP) {
continue;
}
pCtx->numOfParams = 4;
SInterpInfo * pInterpInfo = (SInterpInfo *)pRuntimeEnv->pCtx[i].aOutputBuf;
pInterpInfo->pInterpDetail = calloc(1, sizeof(SInterpInfoDetail));
SInterpInfoDetail *pInterpDetail = pInterpInfo->pInterpDetail;
// for primary timestamp column, set the flag
......
......@@ -419,7 +419,7 @@ void vnodeExecuteRetrieveReq(SSchedMsg *pSched) {
if (code == TSDB_CODE_SUCCESS) {
pRsp->offset = htobe64(vnodeGetOffsetVal(pRetrieve->qhandle));
pRsp->useconds = ((SQInfo *)(pRetrieve->qhandle))->useconds;
pRsp->useconds = htobe64(((SQInfo *)(pRetrieve->qhandle))->useconds);
} else {
pRsp->offset = 0;
pRsp->useconds = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册