Coverage Report

Created: 2026-07-30 06:13

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/tdengine/include/common/tmsg.h
Line
Count
Source
1
/*
2
 * Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
3
 *
4
 * This program is free software: you can use, redistribute, and/or modify
5
 * it under the terms of the GNU Affero General Public License, version 3
6
 * or later ("AGPL"), as published by the Free Software Foundation.
7
 *
8
 * This program is distributed in the hope that it will be useful, but WITHOUT
9
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
 * FITNESS FOR A PARTICULAR PURPOSE.
11
 *
12
 * You should have received a copy of the GNU Affero General Public License
13
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14
 */
15
16
#ifndef _TD_COMMON_TAOS_MSG_H_
17
#define _TD_COMMON_TAOS_MSG_H_
18
19
#include <stdint.h>
20
#include "taosdef.h"
21
#include "taoserror.h"
22
#include "tarray.h"
23
#include "tcoding.h"
24
#include "tcol.h"
25
#include "tencode.h"
26
#include "thash.h"
27
#include "tlist.h"
28
#include "tname.h"
29
#include "tpriv.h"
30
#include "trow.h"
31
#include "tuuid.h"
32
33
#ifdef __cplusplus
34
extern "C" {
35
#endif
36
37
/* ------------------------ MESSAGE DEFINITIONS ------------------------ */
38
39
#define TD_MSG_NUMBER_
40
#undef TD_MSG_DICT_
41
#undef TD_MSG_INFO_
42
#undef TD_MSG_TYPE_INFO_
43
#undef TD_MSG_RANGE_CODE_
44
#undef TD_MSG_SEG_CODE_
45
#include "tmsgdef.h"
46
47
#undef TD_MSG_NUMBER_
48
#undef TD_MSG_DICT_
49
#undef TD_MSG_INFO_
50
#undef TD_MSG_TYPE_INFO_
51
#undef TD_MSG_RANGE_CODE_
52
#define TD_MSG_SEG_CODE_
53
#include "tmsgdef.h"
54
55
#undef TD_MSG_NUMBER_
56
#undef TD_MSG_DICT_
57
#undef TD_MSG_INFO_
58
#undef TD_MSG_TYPE_INFO_
59
#undef TD_MSG_SEG_CODE_
60
#undef TD_MSG_RANGE_CODE_
61
#include "tmsgdef.h"
62
63
extern char*   tMsgInfo[];
64
extern int32_t tMsgDict[];
65
extern int32_t tMsgRangeDict[];
66
67
typedef uint16_t tmsg_t;
68
69
0
#define TMSG_SEG_CODE(TYPE) (((TYPE) & 0xff00) >> 8)
70
0
#define TMSG_SEG_SEQ(TYPE)  ((TYPE) & 0xff)
71
0
#define TMSG_INDEX(TYPE)    (tMsgDict[TMSG_SEG_CODE(TYPE)] + TMSG_SEG_SEQ(TYPE))
72
73
#define DECODESQL()                                                              \
74
0
  do {                                                                           \
75
0
    if (!tDecodeIsEnd(&decoder)) {                                               \
76
0
      TAOS_CHECK_EXIT(tDecodeI32(&decoder, &pReq->sqlLen));                      \
77
0
      if (pReq->sqlLen > 0) {                                                    \
78
0
        TAOS_CHECK_EXIT(tDecodeBinaryAlloc(&decoder, (void**)&pReq->sql, NULL)); \
79
0
      }                                                                          \
80
0
    }                                                                            \
81
0
  } while (0)
82
83
#define ENCODESQL()                                                                      \
84
0
  do {                                                                                   \
85
0
    TAOS_CHECK_EXIT(tEncodeI32(&encoder, pReq->sqlLen));                                 \
86
0
    if (pReq->sqlLen > 0) {                                                              \
87
0
      TAOS_CHECK_EXIT(tEncodeBinary(&encoder, (const uint8_t*)pReq->sql, pReq->sqlLen)); \
88
0
    }                                                                                    \
89
0
  } while (0)
90
91
#define FREESQL()                \
92
0
  do {                           \
93
0
    if (pReq->sql != NULL) {     \
94
0
      taosMemoryFree(pReq->sql); \
95
0
    }                            \
96
0
    pReq->sql = NULL;            \
97
0
  } while (0)
98
99
0
static inline bool tmsgIsValid(tmsg_t type) {
100
  // static int8_t sz = sizeof(tMsgRangeDict) / sizeof(tMsgRangeDict[0]);
101
0
  int8_t maxSegIdx = TMSG_SEG_CODE(TDMT_MAX_MSG_MIN);
102
0
  int    segIdx = TMSG_SEG_CODE(type);
103
0
  if (segIdx >= 0 && segIdx < maxSegIdx) {
104
0
    return type < tMsgRangeDict[segIdx];
105
0
  }
106
0
  return false;
107
0
}
Unexecuted instantiation: sql-fuzzer.c:tmsgIsValid
Unexecuted instantiation: parser.c:tmsgIsValid
Unexecuted instantiation: parTranslater.c:tmsgIsValid
Unexecuted instantiation: parUtil.c:tmsgIsValid
Unexecuted instantiation: parAstParser.c:tmsgIsValid
Unexecuted instantiation: parAuthenticator.c:tmsgIsValid
Unexecuted instantiation: parCalcConst.c:tmsgIsValid
Unexecuted instantiation: parInsertSql.c:tmsgIsValid
Unexecuted instantiation: parInsertUtil.c:tmsgIsValid
Unexecuted instantiation: taos_lemon_sql.tab.c:tmsgIsValid
Unexecuted instantiation: parAstCreater.c:tmsgIsValid
Unexecuted instantiation: parInsertSml.c:tmsgIsValid
Unexecuted instantiation: planner.c:tmsgIsValid
Unexecuted instantiation: planLogicCreater.c:tmsgIsValid
Unexecuted instantiation: planOptimizer.c:tmsgIsValid
Unexecuted instantiation: planPhysiCreater.c:tmsgIsValid
Unexecuted instantiation: planScaleOut.c:tmsgIsValid
Unexecuted instantiation: planSpliter.c:tmsgIsValid
Unexecuted instantiation: planUtil.c:tmsgIsValid
Unexecuted instantiation: planValidator.c:tmsgIsValid
Unexecuted instantiation: catalog.c:tmsgIsValid
Unexecuted instantiation: ctgAsync.c:tmsgIsValid
Unexecuted instantiation: ctgCache.c:tmsgIsValid
Unexecuted instantiation: ctgDbg.c:tmsgIsValid
Unexecuted instantiation: ctgRemote.c:tmsgIsValid
Unexecuted instantiation: ctgRent.c:tmsgIsValid
Unexecuted instantiation: ctgUtil.c:tmsgIsValid
Unexecuted instantiation: functionMgt.c:tmsgIsValid
Unexecuted instantiation: tudf.c:tmsgIsValid
Unexecuted instantiation: builtins.c:tmsgIsValid
Unexecuted instantiation: builtinsimpl.c:tmsgIsValid
Unexecuted instantiation: thistogram.c:tmsgIsValid
Unexecuted instantiation: tpercentile.c:tmsgIsValid
Unexecuted instantiation: tavgfunction.c:tmsgIsValid
Unexecuted instantiation: tminmax.c:tmsgIsValid
Unexecuted instantiation: tminmaxavx.c:tmsgIsValid
Unexecuted instantiation: filter.c:tmsgIsValid
Unexecuted instantiation: scalar.c:tmsgIsValid
Unexecuted instantiation: sclfunc.c:tmsgIsValid
Unexecuted instantiation: sclvector.c:tmsgIsValid
Unexecuted instantiation: nodesCloneFuncs.c:tmsgIsValid
Unexecuted instantiation: nodesCodeFuncs.c:tmsgIsValid
Unexecuted instantiation: nodesEqualFuncs.c:tmsgIsValid
Unexecuted instantiation: nodesMatchFuncs.c:tmsgIsValid
Unexecuted instantiation: nodesMsgFuncs.c:tmsgIsValid
Unexecuted instantiation: nodesToSQLFuncs.c:tmsgIsValid
Unexecuted instantiation: nodesTraverseFuncs.c:tmsgIsValid
Unexecuted instantiation: nodesUtilFuncs.c:tmsgIsValid
Unexecuted instantiation: queryUtil.c:tmsgIsValid
Unexecuted instantiation: querymsg.c:tmsgIsValid
Unexecuted instantiation: trans.c:tmsgIsValid
Unexecuted instantiation: transCli.c:tmsgIsValid
Unexecuted instantiation: transComm.c:tmsgIsValid
Unexecuted instantiation: transSasl.c:tmsgIsValid
Unexecuted instantiation: transSvr.c:tmsgIsValid
Unexecuted instantiation: transTLS.c:tmsgIsValid
Unexecuted instantiation: thttp.c:tmsgIsValid
Unexecuted instantiation: geomFunc.c:tmsgIsValid
Unexecuted instantiation: tconfig.c:tmsgIsValid
Unexecuted instantiation: tdigest.c:tmsgIsValid
Unexecuted instantiation: tlog.c:tmsgIsValid
Unexecuted instantiation: tmempool.c:tmsgIsValid
Unexecuted instantiation: mpDirect.c:tmsgIsValid
Unexecuted instantiation: systable.c:tmsgIsValid
Unexecuted instantiation: tdatablock.c:tmsgIsValid
Unexecuted instantiation: tdataformat.c:tmsgIsValid
Unexecuted instantiation: tglobal.c:tmsgIsValid
Unexecuted instantiation: tmisce.c:tmsgIsValid
Unexecuted instantiation: tname.c:tmsgIsValid
Unexecuted instantiation: tpriv.c:tmsgIsValid
Unexecuted instantiation: ttime.c:tmsgIsValid
Unexecuted instantiation: tvariant.c:tmsgIsValid
Unexecuted instantiation: streamMsg.c:tmsgIsValid
Unexecuted instantiation: tmsg.c:tmsgIsValid
Unexecuted instantiation: xnode.c:tmsgIsValid
Unexecuted instantiation: tencrypt.c:tmsgIsValid
Unexecuted instantiation: streamJson.c:tmsgIsValid
108
109
#define TMSG_INFO(type) (tmsgIsValid(type) ? tMsgInfo[TMSG_INDEX(type)] : "unKnown")
110
111
0
static inline bool vnodeIsMsgBlock(tmsg_t type) {
112
0
  return (type == TDMT_VND_CREATE_TABLE) || (type == TDMT_VND_ALTER_TABLE) || (type == TDMT_VND_DROP_TABLE) ||
113
0
         (type == TDMT_VND_UPDATE_TAG_VAL) || (type == TDMT_VND_ALTER_CONFIRM) || (type == TDMT_VND_COMMIT) ||
114
0
         (type == TDMT_SYNC_CONFIG_CHANGE);
115
0
}
Unexecuted instantiation: sql-fuzzer.c:vnodeIsMsgBlock
Unexecuted instantiation: parser.c:vnodeIsMsgBlock
Unexecuted instantiation: parTranslater.c:vnodeIsMsgBlock
Unexecuted instantiation: parUtil.c:vnodeIsMsgBlock
Unexecuted instantiation: parAstParser.c:vnodeIsMsgBlock
Unexecuted instantiation: parAuthenticator.c:vnodeIsMsgBlock
Unexecuted instantiation: parCalcConst.c:vnodeIsMsgBlock
Unexecuted instantiation: parInsertSql.c:vnodeIsMsgBlock
Unexecuted instantiation: parInsertUtil.c:vnodeIsMsgBlock
Unexecuted instantiation: taos_lemon_sql.tab.c:vnodeIsMsgBlock
Unexecuted instantiation: parAstCreater.c:vnodeIsMsgBlock
Unexecuted instantiation: parInsertSml.c:vnodeIsMsgBlock
Unexecuted instantiation: planner.c:vnodeIsMsgBlock
Unexecuted instantiation: planLogicCreater.c:vnodeIsMsgBlock
Unexecuted instantiation: planOptimizer.c:vnodeIsMsgBlock
Unexecuted instantiation: planPhysiCreater.c:vnodeIsMsgBlock
Unexecuted instantiation: planScaleOut.c:vnodeIsMsgBlock
Unexecuted instantiation: planSpliter.c:vnodeIsMsgBlock
Unexecuted instantiation: planUtil.c:vnodeIsMsgBlock
Unexecuted instantiation: planValidator.c:vnodeIsMsgBlock
Unexecuted instantiation: catalog.c:vnodeIsMsgBlock
Unexecuted instantiation: ctgAsync.c:vnodeIsMsgBlock
Unexecuted instantiation: ctgCache.c:vnodeIsMsgBlock
Unexecuted instantiation: ctgDbg.c:vnodeIsMsgBlock
Unexecuted instantiation: ctgRemote.c:vnodeIsMsgBlock
Unexecuted instantiation: ctgRent.c:vnodeIsMsgBlock
Unexecuted instantiation: ctgUtil.c:vnodeIsMsgBlock
Unexecuted instantiation: functionMgt.c:vnodeIsMsgBlock
Unexecuted instantiation: tudf.c:vnodeIsMsgBlock
Unexecuted instantiation: builtins.c:vnodeIsMsgBlock
Unexecuted instantiation: builtinsimpl.c:vnodeIsMsgBlock
Unexecuted instantiation: thistogram.c:vnodeIsMsgBlock
Unexecuted instantiation: tpercentile.c:vnodeIsMsgBlock
Unexecuted instantiation: tavgfunction.c:vnodeIsMsgBlock
Unexecuted instantiation: tminmax.c:vnodeIsMsgBlock
Unexecuted instantiation: tminmaxavx.c:vnodeIsMsgBlock
Unexecuted instantiation: filter.c:vnodeIsMsgBlock
Unexecuted instantiation: scalar.c:vnodeIsMsgBlock
Unexecuted instantiation: sclfunc.c:vnodeIsMsgBlock
Unexecuted instantiation: sclvector.c:vnodeIsMsgBlock
Unexecuted instantiation: nodesCloneFuncs.c:vnodeIsMsgBlock
Unexecuted instantiation: nodesCodeFuncs.c:vnodeIsMsgBlock
Unexecuted instantiation: nodesEqualFuncs.c:vnodeIsMsgBlock
Unexecuted instantiation: nodesMatchFuncs.c:vnodeIsMsgBlock
Unexecuted instantiation: nodesMsgFuncs.c:vnodeIsMsgBlock
Unexecuted instantiation: nodesToSQLFuncs.c:vnodeIsMsgBlock
Unexecuted instantiation: nodesTraverseFuncs.c:vnodeIsMsgBlock
Unexecuted instantiation: nodesUtilFuncs.c:vnodeIsMsgBlock
Unexecuted instantiation: queryUtil.c:vnodeIsMsgBlock
Unexecuted instantiation: querymsg.c:vnodeIsMsgBlock
Unexecuted instantiation: trans.c:vnodeIsMsgBlock
Unexecuted instantiation: transCli.c:vnodeIsMsgBlock
Unexecuted instantiation: transComm.c:vnodeIsMsgBlock
Unexecuted instantiation: transSasl.c:vnodeIsMsgBlock
Unexecuted instantiation: transSvr.c:vnodeIsMsgBlock
Unexecuted instantiation: transTLS.c:vnodeIsMsgBlock
Unexecuted instantiation: thttp.c:vnodeIsMsgBlock
Unexecuted instantiation: geomFunc.c:vnodeIsMsgBlock
Unexecuted instantiation: tconfig.c:vnodeIsMsgBlock
Unexecuted instantiation: tdigest.c:vnodeIsMsgBlock
Unexecuted instantiation: tlog.c:vnodeIsMsgBlock
Unexecuted instantiation: tmempool.c:vnodeIsMsgBlock
Unexecuted instantiation: mpDirect.c:vnodeIsMsgBlock
Unexecuted instantiation: systable.c:vnodeIsMsgBlock
Unexecuted instantiation: tdatablock.c:vnodeIsMsgBlock
Unexecuted instantiation: tdataformat.c:vnodeIsMsgBlock
Unexecuted instantiation: tglobal.c:vnodeIsMsgBlock
Unexecuted instantiation: tmisce.c:vnodeIsMsgBlock
Unexecuted instantiation: tname.c:vnodeIsMsgBlock
Unexecuted instantiation: tpriv.c:vnodeIsMsgBlock
Unexecuted instantiation: ttime.c:vnodeIsMsgBlock
Unexecuted instantiation: tvariant.c:vnodeIsMsgBlock
Unexecuted instantiation: streamMsg.c:vnodeIsMsgBlock
Unexecuted instantiation: tmsg.c:vnodeIsMsgBlock
Unexecuted instantiation: xnode.c:vnodeIsMsgBlock
Unexecuted instantiation: tencrypt.c:vnodeIsMsgBlock
Unexecuted instantiation: streamJson.c:vnodeIsMsgBlock
116
117
0
static inline bool syncUtilUserCommit(tmsg_t msgType) {
118
0
  return msgType != TDMT_SYNC_NOOP && msgType != TDMT_SYNC_LEADER_TRANSFER;
119
0
}
Unexecuted instantiation: sql-fuzzer.c:syncUtilUserCommit
Unexecuted instantiation: parser.c:syncUtilUserCommit
Unexecuted instantiation: parTranslater.c:syncUtilUserCommit
Unexecuted instantiation: parUtil.c:syncUtilUserCommit
Unexecuted instantiation: parAstParser.c:syncUtilUserCommit
Unexecuted instantiation: parAuthenticator.c:syncUtilUserCommit
Unexecuted instantiation: parCalcConst.c:syncUtilUserCommit
Unexecuted instantiation: parInsertSql.c:syncUtilUserCommit
Unexecuted instantiation: parInsertUtil.c:syncUtilUserCommit
Unexecuted instantiation: taos_lemon_sql.tab.c:syncUtilUserCommit
Unexecuted instantiation: parAstCreater.c:syncUtilUserCommit
Unexecuted instantiation: parInsertSml.c:syncUtilUserCommit
Unexecuted instantiation: planner.c:syncUtilUserCommit
Unexecuted instantiation: planLogicCreater.c:syncUtilUserCommit
Unexecuted instantiation: planOptimizer.c:syncUtilUserCommit
Unexecuted instantiation: planPhysiCreater.c:syncUtilUserCommit
Unexecuted instantiation: planScaleOut.c:syncUtilUserCommit
Unexecuted instantiation: planSpliter.c:syncUtilUserCommit
Unexecuted instantiation: planUtil.c:syncUtilUserCommit
Unexecuted instantiation: planValidator.c:syncUtilUserCommit
Unexecuted instantiation: catalog.c:syncUtilUserCommit
Unexecuted instantiation: ctgAsync.c:syncUtilUserCommit
Unexecuted instantiation: ctgCache.c:syncUtilUserCommit
Unexecuted instantiation: ctgDbg.c:syncUtilUserCommit
Unexecuted instantiation: ctgRemote.c:syncUtilUserCommit
Unexecuted instantiation: ctgRent.c:syncUtilUserCommit
Unexecuted instantiation: ctgUtil.c:syncUtilUserCommit
Unexecuted instantiation: functionMgt.c:syncUtilUserCommit
Unexecuted instantiation: tudf.c:syncUtilUserCommit
Unexecuted instantiation: builtins.c:syncUtilUserCommit
Unexecuted instantiation: builtinsimpl.c:syncUtilUserCommit
Unexecuted instantiation: thistogram.c:syncUtilUserCommit
Unexecuted instantiation: tpercentile.c:syncUtilUserCommit
Unexecuted instantiation: tavgfunction.c:syncUtilUserCommit
Unexecuted instantiation: tminmax.c:syncUtilUserCommit
Unexecuted instantiation: tminmaxavx.c:syncUtilUserCommit
Unexecuted instantiation: filter.c:syncUtilUserCommit
Unexecuted instantiation: scalar.c:syncUtilUserCommit
Unexecuted instantiation: sclfunc.c:syncUtilUserCommit
Unexecuted instantiation: sclvector.c:syncUtilUserCommit
Unexecuted instantiation: nodesCloneFuncs.c:syncUtilUserCommit
Unexecuted instantiation: nodesCodeFuncs.c:syncUtilUserCommit
Unexecuted instantiation: nodesEqualFuncs.c:syncUtilUserCommit
Unexecuted instantiation: nodesMatchFuncs.c:syncUtilUserCommit
Unexecuted instantiation: nodesMsgFuncs.c:syncUtilUserCommit
Unexecuted instantiation: nodesToSQLFuncs.c:syncUtilUserCommit
Unexecuted instantiation: nodesTraverseFuncs.c:syncUtilUserCommit
Unexecuted instantiation: nodesUtilFuncs.c:syncUtilUserCommit
Unexecuted instantiation: queryUtil.c:syncUtilUserCommit
Unexecuted instantiation: querymsg.c:syncUtilUserCommit
Unexecuted instantiation: trans.c:syncUtilUserCommit
Unexecuted instantiation: transCli.c:syncUtilUserCommit
Unexecuted instantiation: transComm.c:syncUtilUserCommit
Unexecuted instantiation: transSasl.c:syncUtilUserCommit
Unexecuted instantiation: transSvr.c:syncUtilUserCommit
Unexecuted instantiation: transTLS.c:syncUtilUserCommit
Unexecuted instantiation: thttp.c:syncUtilUserCommit
Unexecuted instantiation: geomFunc.c:syncUtilUserCommit
Unexecuted instantiation: tconfig.c:syncUtilUserCommit
Unexecuted instantiation: tdigest.c:syncUtilUserCommit
Unexecuted instantiation: tlog.c:syncUtilUserCommit
Unexecuted instantiation: tmempool.c:syncUtilUserCommit
Unexecuted instantiation: mpDirect.c:syncUtilUserCommit
Unexecuted instantiation: systable.c:syncUtilUserCommit
Unexecuted instantiation: tdatablock.c:syncUtilUserCommit
Unexecuted instantiation: tdataformat.c:syncUtilUserCommit
Unexecuted instantiation: tglobal.c:syncUtilUserCommit
Unexecuted instantiation: tmisce.c:syncUtilUserCommit
Unexecuted instantiation: tname.c:syncUtilUserCommit
Unexecuted instantiation: tpriv.c:syncUtilUserCommit
Unexecuted instantiation: ttime.c:syncUtilUserCommit
Unexecuted instantiation: tvariant.c:syncUtilUserCommit
Unexecuted instantiation: streamMsg.c:syncUtilUserCommit
Unexecuted instantiation: tmsg.c:syncUtilUserCommit
Unexecuted instantiation: xnode.c:syncUtilUserCommit
Unexecuted instantiation: tencrypt.c:syncUtilUserCommit
Unexecuted instantiation: streamJson.c:syncUtilUserCommit
120
121
/* ------------------------ OTHER DEFINITIONS ------------------------ */
122
// IE type
123
#define TSDB_IE_TYPE_SEC         1
124
#define TSDB_IE_TYPE_META        2
125
#define TSDB_IE_TYPE_MGMT_IP     3
126
#define TSDB_IE_TYPE_DNODE_CFG   4
127
#define TSDB_IE_TYPE_NEW_VERSION 5
128
#define TSDB_IE_TYPE_DNODE_EXT   6
129
#define TSDB_IE_TYPE_DNODE_STATE 7
130
131
enum {
132
  CONN_TYPE__QUERY = 1,
133
  CONN_TYPE__TMQ,
134
  CONN_TYPE__UDFD,
135
  CONN_TYPE__AUTH_TEST, // only for test authentication
136
  CONN_TYPE__MAX,
137
};
138
139
enum {
140
  HEARTBEAT_KEY_USER_AUTHINFO = 1,
141
  HEARTBEAT_KEY_DBINFO,
142
  HEARTBEAT_KEY_STBINFO,
143
  HEARTBEAT_KEY_TMQ,
144
  HEARTBEAT_KEY_DYN_VIEW,
145
  HEARTBEAT_KEY_VIEWINFO,
146
  HEARTBEAT_KEY_TSMA,
147
};
148
149
typedef enum _mgmt_table {
150
  TSDB_MGMT_TABLE_START,
151
  TSDB_MGMT_TABLE_DNODE,
152
  TSDB_MGMT_TABLE_MNODE,
153
  TSDB_MGMT_TABLE_MODULE,
154
  TSDB_MGMT_TABLE_QNODE,
155
  TSDB_MGMT_TABLE_SNODE,
156
  TSDB_MGMT_TABLE_BACKUP_NODE,  // no longer used
157
  TSDB_MGMT_TABLE_CLUSTER,
158
  TSDB_MGMT_TABLE_DB,
159
  TSDB_MGMT_TABLE_FUNC,
160
  TSDB_MGMT_TABLE_INDEX,
161
  TSDB_MGMT_TABLE_STB,
162
  TSDB_MGMT_TABLE_STREAMS,
163
  TSDB_MGMT_TABLE_TABLE,
164
  TSDB_MGMT_TABLE_TAG,
165
  TSDB_MGMT_TABLE_COL,
166
  TSDB_MGMT_TABLE_USER,
167
  TSDB_MGMT_TABLE_GRANTS,
168
  TSDB_MGMT_TABLE_VGROUP,
169
  TSDB_MGMT_TABLE_TOPICS,
170
  TSDB_MGMT_TABLE_CONSUMERS,
171
  TSDB_MGMT_TABLE_SUBSCRIPTIONS,
172
  TSDB_MGMT_TABLE_TRANS,
173
  TSDB_MGMT_TABLE_SMAS,
174
  TSDB_MGMT_TABLE_CONFIGS,
175
  TSDB_MGMT_TABLE_CONNS,
176
  TSDB_MGMT_TABLE_QUERIES,
177
  TSDB_MGMT_TABLE_VNODES,
178
  TSDB_MGMT_TABLE_APPS,
179
  TSDB_MGMT_TABLE_STREAM_TASKS,
180
  TSDB_MGMT_TABLE_STREAM_RECALCULATES,
181
  TSDB_MGMT_TABLE_PRIVILEGES,
182
  TSDB_MGMT_TABLE_VIEWS,
183
  TSDB_MGMT_TABLE_TSMAS,
184
  TSDB_MGMT_TABLE_COMPACT,
185
  TSDB_MGMT_TABLE_COMPACT_DETAIL,
186
  TSDB_MGMT_TABLE_GRANTS_FULL,
187
  TSDB_MGMT_TABLE_GRANTS_LOGS,
188
  TSDB_MGMT_TABLE_MACHINES,
189
  TSDB_MGMT_TABLE_ARBGROUP,
190
  TSDB_MGMT_TABLE_ENCRYPTIONS,
191
  TSDB_MGMT_TABLE_USER_FULL,
192
  TSDB_MGMT_TABLE_ANODE,
193
  TSDB_MGMT_TABLE_ANODE_FULL,
194
  TSDB_MGMT_TABLE_USAGE,
195
  TSDB_MGMT_TABLE_FILESETS,
196
  TSDB_MGMT_TABLE_TRANSACTION_DETAIL,
197
  TSDB_MGMT_TABLE_VC_COL,
198
  TSDB_MGMT_TABLE_BNODE,
199
  TSDB_MGMT_TABLE_MOUNT,
200
  TSDB_MGMT_TABLE_SSMIGRATE,
201
  TSDB_MGMT_TABLE_SCAN,
202
  TSDB_MGMT_TABLE_SCAN_DETAIL,
203
  TSDB_MGMT_TABLE_RSMA,
204
  TSDB_MGMT_TABLE_RETENTION,
205
  TSDB_MGMT_TABLE_RETENTION_DETAIL,
206
  TSDB_MGMT_TABLE_INSTANCE,
207
  TSDB_MGMT_TABLE_ENCRYPT_ALGORITHMS,
208
  TSDB_MGMT_TABLE_TOKEN,
209
  TSDB_MGMT_TABLE_ENCRYPT_STATUS,
210
  TSDB_MGMT_TABLE_ROLE,
211
  TSDB_MGMT_TABLE_ROLE_PRIVILEGES,
212
  TSDB_MGMT_TABLE_ROLE_COL_PRIVILEGES,
213
  TSDB_MGMT_TABLE_XNODES,
214
  TSDB_MGMT_TABLE_XNODE_TASKS,
215
  TSDB_MGMT_TABLE_XNODE_AGENTS,
216
  TSDB_MGMT_TABLE_XNODE_JOBS,
217
  TSDB_MGMT_TABLE_XNODE_FULL,
218
  TSDB_MGMT_TABLE_VIRTUAL_TABLES_REFERENCING,
219
  TSDB_MGMT_TABLE_SECURITY_POLICIES,
220
  TSDB_MGMT_TABLE_MAX,
221
} EShowType;
222
223
typedef enum {
224
  TSDB_OPTR_NORMAL = 0,  // default
225
  TSDB_OPTR_SSMIGRATE = 1,
226
  TSDB_OPTR_ROLLUP = 2,
227
} ETsdbOpType;
228
229
typedef enum {
230
  TSDB_TRIGGER_MANUAL = 0,  // default
231
  TSDB_TRIGGER_AUTO = 1,
232
} ETriggerType;
233
234
0
#define TSDB_ALTER_TABLE_ADD_TAG                         1
235
0
#define TSDB_ALTER_TABLE_DROP_TAG                        2
236
0
#define TSDB_ALTER_TABLE_UPDATE_TAG_NAME                 3
237
0
#define TSDB_ALTER_TABLE_UPDATE_TAG_VAL                  4 // deprecated, kept for wire compatibility
238
0
#define TSDB_ALTER_TABLE_ADD_COLUMN                      5
239
0
#define TSDB_ALTER_TABLE_DROP_COLUMN                     6
240
0
#define TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES             7
241
0
#define TSDB_ALTER_TABLE_UPDATE_TAG_BYTES                8
242
0
#define TSDB_ALTER_TABLE_UPDATE_OPTIONS                  9
243
0
#define TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME              10
244
#define TSDB_ALTER_TABLE_ADD_TAG_INDEX                   11
245
#define TSDB_ALTER_TABLE_DROP_TAG_INDEX                  12
246
0
#define TSDB_ALTER_TABLE_UPDATE_COLUMN_COMPRESS          13
247
0
#define TSDB_ALTER_TABLE_ADD_COLUMN_WITH_COMPRESS_OPTION 14
248
0
#define TSDB_ALTER_TABLE_UPDATE_MULTI_TAG_VAL            15 // deprecated, kept for wire compatibility
249
0
#define TSDB_ALTER_TABLE_ALTER_COLUMN_REF                16
250
0
#define TSDB_ALTER_TABLE_REMOVE_COLUMN_REF               17
251
0
#define TSDB_ALTER_TABLE_ADD_COLUMN_WITH_COLUMN_REF      18
252
0
#define TSDB_ALTER_TABLE_UPDATE_MULTI_TABLE_TAG_VAL      19 // alter multiple tag values of multi tables
253
0
#define TSDB_ALTER_TABLE_UPDATE_CHILD_TABLE_TAG_VAL      20 // alter multiple tag values of the child tables of a stable
254
255
#define TSDB_FILL_NONE        0
256
#define TSDB_FILL_NULL        1
257
#define TSDB_FILL_NULL_F      2
258
#define TSDB_FILL_SET_VALUE   3
259
#define TSDB_FILL_SET_VALUE_F 4
260
#define TSDB_FILL_LINEAR      5
261
#define TSDB_FILL_PREV        6
262
#define TSDB_FILL_NEXT        7
263
#define TSDB_FILL_NEAR        8
264
265
266
0
#define TSDB_ALTER_USER_BASIC_INFO             1
267
// these definitions start from 5 is to keep compatible with old versions
268
#define TSDB_ALTER_USER_ADD_PRIVILEGES         5
269
#define TSDB_ALTER_USER_DEL_PRIVILEGES         6
270
271
272
0
#define TSDB_ALTER_ROLE_LOCK            0x1
273
0
#define TSDB_ALTER_ROLE_ROLE            0x2
274
0
#define TSDB_ALTER_ROLE_PRIVILEGES      0x3
275
0
#define TSDB_ALTER_ROLE_MAX             0x4 // increase according to actual use
276
277
0
#define TSDB_ALTER_RSMA_FUNCTION        0x1
278
279
#define TSDB_KILL_MSG_LEN 30
280
281
#define TSDB_TABLE_NUM_UNIT 100000
282
283
#define TSDB_VN_READ_ACCCESS  ((char)0x1)
284
#define TSDB_VN_WRITE_ACCCESS ((char)0x2)
285
#define TSDB_VN_ALL_ACCCESS   (TSDB_VN_READ_ACCCESS | TSDB_VN_WRITE_ACCCESS)
286
287
#define TSDB_COL_NORMAL 0x0u  // the normal column of the table
288
#define TSDB_COL_TAG    0x1u  // the tag column type
289
#define TSDB_COL_UDC    0x2u  // the user specified normal string column, it is a dummy column
290
#define TSDB_COL_TMP    0x4u  // internal column generated by the previous operators
291
#define TSDB_COL_NULL   0x8u  // the column filter NULL or not
292
293
#define TSDB_COL_IS_TAG(f)        (((f & (~(TSDB_COL_NULL))) & TSDB_COL_TAG) != 0)
294
#define TSDB_COL_IS_NORMAL_COL(f) ((f & (~(TSDB_COL_NULL))) == TSDB_COL_NORMAL)
295
#define TSDB_COL_IS_UD_COL(f)     ((f & (~(TSDB_COL_NULL))) == TSDB_COL_UDC)
296
#define TSDB_COL_REQ_NULL(f)      (((f) & TSDB_COL_NULL) != 0)
297
298
#define TD_SUPER_TABLE          TSDB_SUPER_TABLE
299
0
#define TD_CHILD_TABLE          TSDB_CHILD_TABLE
300
0
#define TD_NORMAL_TABLE         TSDB_NORMAL_TABLE
301
0
#define TD_VIRTUAL_NORMAL_TABLE TSDB_VIRTUAL_NORMAL_TABLE
302
0
#define TD_VIRTUAL_CHILD_TABLE  TSDB_VIRTUAL_CHILD_TABLE
303
304
typedef enum ENodeType {
305
  // Syntax nodes are used in parser and planner module, and some are also used in executor module, such as COLUMN,
306
  // VALUE, OPERATOR, FUNCTION and so on.
307
  QUERY_NODE_COLUMN = 1,
308
  QUERY_NODE_VALUE,
309
  QUERY_NODE_OPERATOR,
310
  QUERY_NODE_LOGIC_CONDITION,
311
  QUERY_NODE_FUNCTION,
312
  QUERY_NODE_REAL_TABLE,
313
  QUERY_NODE_TEMP_TABLE,
314
  QUERY_NODE_JOIN_TABLE,
315
  QUERY_NODE_GROUPING_SET,
316
  QUERY_NODE_ORDER_BY_EXPR,
317
  QUERY_NODE_LIMIT,
318
  QUERY_NODE_STATE_WINDOW,
319
  QUERY_NODE_SESSION_WINDOW,
320
  QUERY_NODE_INTERVAL_WINDOW,
321
  QUERY_NODE_NODE_LIST,
322
  QUERY_NODE_FILL,
323
  QUERY_NODE_RAW_EXPR,  // Only be used in parser module.
324
  QUERY_NODE_TARGET,
325
  QUERY_NODE_DATABLOCK_DESC,
326
  QUERY_NODE_SLOT_DESC,
327
  QUERY_NODE_COLUMN_DEF,
328
  QUERY_NODE_DOWNSTREAM_SOURCE,
329
  QUERY_NODE_DATABASE_OPTIONS,
330
  QUERY_NODE_TABLE_OPTIONS,
331
  QUERY_NODE_INDEX_OPTIONS,
332
  QUERY_NODE_EXPLAIN_OPTIONS,
333
  QUERY_NODE_LEFT_VALUE,
334
  QUERY_NODE_COLUMN_REF,
335
  QUERY_NODE_WHEN_THEN,
336
  QUERY_NODE_CASE_WHEN,
337
  QUERY_NODE_EVENT_WINDOW,
338
  QUERY_NODE_HINT,
339
  QUERY_NODE_VIEW,
340
  QUERY_NODE_WINDOW_OFFSET,
341
  QUERY_NODE_COUNT_WINDOW,
342
  QUERY_NODE_COLUMN_OPTIONS,
343
  QUERY_NODE_TSMA_OPTIONS,
344
  QUERY_NODE_ANOMALY_WINDOW,
345
  QUERY_NODE_RANGE_AROUND,
346
  QUERY_NODE_STREAM_NOTIFY_OPTIONS,
347
  QUERY_NODE_VIRTUAL_TABLE,
348
  QUERY_NODE_SLIDING_WINDOW,
349
  QUERY_NODE_PERIOD_WINDOW,
350
  QUERY_NODE_STREAM_TRIGGER,
351
  QUERY_NODE_STREAM,
352
  QUERY_NODE_STREAM_TAG_DEF,
353
  QUERY_NODE_EXTERNAL_WINDOW,
354
  QUERY_NODE_STREAM_TRIGGER_OPTIONS,
355
  QUERY_NODE_PLACE_HOLDER_TABLE,
356
  QUERY_NODE_TIME_RANGE,
357
  QUERY_NODE_STREAM_OUT_TABLE,
358
  QUERY_NODE_STREAM_CALC_RANGE,
359
  QUERY_NODE_COUNT_WINDOW_ARGS,
360
  QUERY_NODE_BNODE_OPTIONS,
361
  QUERY_NODE_DATE_TIME_RANGE,
362
  QUERY_NODE_IP_RANGE,
363
  QUERY_NODE_USER_OPTIONS,
364
  QUERY_NODE_REMOTE_VALUE,
365
  QUERY_NODE_TOKEN_OPTIONS,
366
  QUERY_NODE_TRUE_FOR,
367
  QUERY_NODE_REMOTE_VALUE_LIST,
368
  QUERY_NODE_SURROUND,
369
  QUERY_NODE_REMOTE_ROW,
370
  QUERY_NODE_REMOTE_ZERO_ROWS,
371
  QUERY_NODE_UPDATE_TAG_VALUE,
372
  QUERY_NODE_ALTER_TABLE_UPDATE_TAG_VAL_CLAUSE,
373
  QUERY_NODE_REMOTE_TABLE,
374
375
  // Statement nodes are used in parser and planner module.
376
  QUERY_NODE_SET_OPERATOR = 100,
377
  QUERY_NODE_SELECT_STMT,
378
  QUERY_NODE_VNODE_MODIFY_STMT,
379
  QUERY_NODE_CREATE_DATABASE_STMT,
380
  QUERY_NODE_DROP_DATABASE_STMT,
381
  QUERY_NODE_ALTER_DATABASE_STMT,
382
  QUERY_NODE_FLUSH_DATABASE_STMT,
383
  QUERY_NODE_TRIM_DATABASE_STMT,
384
  QUERY_NODE_CREATE_TABLE_STMT,
385
  QUERY_NODE_CREATE_SUBTABLE_CLAUSE,
386
  QUERY_NODE_CREATE_MULTI_TABLES_STMT,
387
  QUERY_NODE_DROP_TABLE_CLAUSE,
388
  QUERY_NODE_DROP_TABLE_STMT,
389
  QUERY_NODE_DROP_SUPER_TABLE_STMT,
390
  QUERY_NODE_ALTER_TABLE_STMT,
391
  QUERY_NODE_ALTER_SUPER_TABLE_STMT,
392
  QUERY_NODE_CREATE_USER_STMT,
393
  QUERY_NODE_ALTER_USER_STMT,
394
  QUERY_NODE_DROP_USER_STMT,
395
  QUERY_NODE_USE_DATABASE_STMT,
396
  QUERY_NODE_CREATE_DNODE_STMT,
397
  QUERY_NODE_DROP_DNODE_STMT,
398
  QUERY_NODE_ALTER_DNODE_STMT,
399
  QUERY_NODE_CREATE_INDEX_STMT,
400
  QUERY_NODE_DROP_INDEX_STMT,
401
  QUERY_NODE_CREATE_QNODE_STMT,
402
  QUERY_NODE_DROP_QNODE_STMT,
403
  QUERY_NODE_CREATE_BACKUP_NODE_STMT,  // no longer used
404
  QUERY_NODE_DROP_BACKUP_NODE_STMT,    // no longer used
405
  QUERY_NODE_CREATE_SNODE_STMT,
406
  QUERY_NODE_DROP_SNODE_STMT,
407
  QUERY_NODE_CREATE_MNODE_STMT,
408
  QUERY_NODE_DROP_MNODE_STMT,
409
  QUERY_NODE_CREATE_TOPIC_STMT,
410
  QUERY_NODE_DROP_TOPIC_STMT,
411
  QUERY_NODE_DROP_CGROUP_STMT,
412
  QUERY_NODE_ALTER_LOCAL_STMT,
413
  QUERY_NODE_EXPLAIN_STMT,
414
  QUERY_NODE_DESCRIBE_STMT,
415
  QUERY_NODE_RESET_QUERY_CACHE_STMT,
416
  QUERY_NODE_COMPACT_DATABASE_STMT,
417
  QUERY_NODE_COMPACT_VGROUPS_STMT,
418
  QUERY_NODE_CREATE_FUNCTION_STMT,
419
  QUERY_NODE_DROP_FUNCTION_STMT,
420
  QUERY_NODE_CREATE_STREAM_STMT,
421
  QUERY_NODE_DROP_STREAM_STMT,
422
  QUERY_NODE_BALANCE_VGROUP_STMT,
423
  QUERY_NODE_MERGE_VGROUP_STMT,
424
  QUERY_NODE_REDISTRIBUTE_VGROUP_STMT,
425
  QUERY_NODE_SPLIT_VGROUP_STMT,
426
  QUERY_NODE_SYNCDB_STMT,
427
  QUERY_NODE_GRANT_STMT,
428
  QUERY_NODE_REVOKE_STMT,
429
  QUERY_NODE_ALTER_CLUSTER_STMT,
430
  QUERY_NODE_SSMIGRATE_DATABASE_STMT,
431
  QUERY_NODE_CREATE_TSMA_STMT,
432
  QUERY_NODE_DROP_TSMA_STMT,
433
  QUERY_NODE_CREATE_VIRTUAL_TABLE_STMT,
434
  QUERY_NODE_CREATE_VIRTUAL_SUBTABLE_STMT,
435
  QUERY_NODE_DROP_VIRTUAL_TABLE_STMT,
436
  QUERY_NODE_ALTER_VIRTUAL_TABLE_STMT,
437
  QUERY_NODE_CREATE_MOUNT_STMT,
438
  QUERY_NODE_DROP_MOUNT_STMT,
439
  QUERY_NODE_SCAN_DATABASE_STMT,
440
  QUERY_NODE_SCAN_VGROUPS_STMT,
441
  QUERY_NODE_TRIM_DATABASE_WAL_STMT,
442
  QUERY_NODE_ALTER_DNODES_RELOAD_TLS_STMT,
443
  QUERY_NODE_CREATE_TOKEN_STMT,
444
  QUERY_NODE_ALTER_TOKEN_STMT,
445
  QUERY_NODE_DROP_TOKEN_STMT,
446
  QUERY_NODE_ALTER_ENCRYPT_KEY_STMT,
447
  QUERY_NODE_CREATE_ROLE_STMT,
448
  QUERY_NODE_DROP_ROLE_STMT,
449
  QUERY_NODE_ALTER_ROLE_STMT,
450
  QUERY_NODE_CREATE_TOTP_SECRET_STMT,
451
  QUERY_NODE_DROP_TOTP_SECRET_STMT,
452
  QUERY_NODE_ALTER_KEY_EXPIRATION_STMT,
453
454
  // placeholder for [155, 180]
455
  QUERY_NODE_SHOW_CREATE_VIEW_STMT = 181,
456
  QUERY_NODE_SHOW_CREATE_DATABASE_STMT,
457
  QUERY_NODE_SHOW_CREATE_TABLE_STMT,
458
  QUERY_NODE_SHOW_CREATE_STABLE_STMT,
459
  QUERY_NODE_SHOW_TABLE_DISTRIBUTED_STMT,
460
  QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT,
461
  QUERY_NODE_SHOW_SCORES_STMT,
462
  QUERY_NODE_SHOW_TABLE_TAGS_STMT,
463
  QUERY_NODE_KILL_CONNECTION_STMT,
464
  QUERY_NODE_KILL_QUERY_STMT,
465
  QUERY_NODE_KILL_TRANSACTION_STMT,
466
  QUERY_NODE_KILL_COMPACT_STMT,
467
  QUERY_NODE_DELETE_STMT,
468
  QUERY_NODE_INSERT_STMT,
469
  QUERY_NODE_QUERY,
470
  QUERY_NODE_SHOW_DB_ALIVE_STMT,
471
  QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT,
472
  QUERY_NODE_BALANCE_VGROUP_LEADER_STMT,
473
  QUERY_NODE_BALANCE_VGROUP_LEADER_DATABASE_STMT,
474
  QUERY_NODE_RESTORE_DNODE_STMT,
475
  QUERY_NODE_RESTORE_QNODE_STMT,
476
  QUERY_NODE_RESTORE_MNODE_STMT,
477
  QUERY_NODE_RESTORE_VNODE_STMT,
478
  QUERY_NODE_PAUSE_STREAM_STMT,
479
  QUERY_NODE_RESUME_STREAM_STMT,
480
  QUERY_NODE_CREATE_VIEW_STMT,
481
  QUERY_NODE_DROP_VIEW_STMT,
482
  QUERY_NODE_CREATE_SUBTABLE_FROM_FILE_CLAUSE,
483
  QUERY_NODE_CREATE_ANODE_STMT,
484
  QUERY_NODE_DROP_ANODE_STMT,
485
  QUERY_NODE_UPDATE_ANODE_STMT,
486
  QUERY_NODE_ASSIGN_LEADER_STMT,
487
  QUERY_NODE_SHOW_CREATE_TSMA_STMT,
488
  QUERY_NODE_SHOW_CREATE_VTABLE_STMT,
489
  QUERY_NODE_RECALCULATE_STREAM_STMT,
490
  QUERY_NODE_CREATE_BNODE_STMT,
491
  QUERY_NODE_DROP_BNODE_STMT,
492
  QUERY_NODE_KILL_SSMIGRATE_STMT,
493
  QUERY_NODE_KILL_SCAN_STMT,
494
  QUERY_NODE_CREATE_RSMA_STMT,
495
  QUERY_NODE_DROP_RSMA_STMT,
496
  QUERY_NODE_ALTER_RSMA_STMT,
497
  QUERY_NODE_SHOW_CREATE_RSMA_STMT,
498
  QUERY_NODE_ROLLUP_DATABASE_STMT,
499
  QUERY_NODE_ROLLUP_VGROUPS_STMT,
500
  QUERY_NODE_KILL_RETENTION_STMT,
501
  QUERY_NODE_SET_VGROUP_KEEP_VERSION_STMT,
502
  QUERY_NODE_CREATE_ENCRYPT_ALGORITHMS_STMT,
503
  QUERY_NODE_DROP_ENCRYPT_ALGR_STMT,
504
  QUERY_NODE_SHOW_CREATE_STREAM_STMT,
505
506
  // show statement nodes
507
  // see 'sysTableShowAdapter', 'SYSTABLE_SHOW_TYPE_OFFSET'
508
  QUERY_NODE_SHOW_DNODES_STMT = 400,
509
  QUERY_NODE_SHOW_MNODES_STMT,
510
  QUERY_NODE_SHOW_MODULES_STMT,
511
  QUERY_NODE_SHOW_QNODES_STMT,
512
  QUERY_NODE_SHOW_SNODES_STMT,
513
  QUERY_NODE_SHOW_BACKUP_NODES_STMT,  // no longer used
514
  QUERY_NODE_SHOW_ARBGROUPS_STMT,
515
  QUERY_NODE_SHOW_CLUSTER_STMT,
516
  QUERY_NODE_SHOW_DATABASES_STMT,
517
  QUERY_NODE_SHOW_FUNCTIONS_STMT,
518
  QUERY_NODE_SHOW_INDEXES_STMT,
519
  QUERY_NODE_SHOW_STABLES_STMT,
520
  QUERY_NODE_SHOW_STREAMS_STMT,
521
  QUERY_NODE_SHOW_TABLES_STMT,
522
  QUERY_NODE_SHOW_TAGS_STMT,
523
  QUERY_NODE_SHOW_USERS_STMT,
524
  QUERY_NODE_SHOW_USERS_FULL_STMT,
525
  QUERY_NODE_SHOW_LICENCES_STMT,
526
  QUERY_NODE_SHOW_VGROUPS_STMT,
527
  QUERY_NODE_SHOW_TOPICS_STMT,
528
  QUERY_NODE_SHOW_CONSUMERS_STMT,
529
  QUERY_NODE_SHOW_CONNECTIONS_STMT,
530
  QUERY_NODE_SHOW_QUERIES_STMT,
531
  QUERY_NODE_SHOW_APPS_STMT,
532
  QUERY_NODE_SHOW_VARIABLES_STMT,
533
  QUERY_NODE_SHOW_DNODE_VARIABLES_STMT,
534
  QUERY_NODE_SHOW_TRANSACTIONS_STMT,
535
  QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT,
536
  QUERY_NODE_SHOW_VNODES_STMT,
537
  QUERY_NODE_SHOW_USER_PRIVILEGES_STMT,
538
  QUERY_NODE_SHOW_VIEWS_STMT,
539
  QUERY_NODE_SHOW_COMPACTS_STMT,
540
  QUERY_NODE_SHOW_COMPACT_DETAILS_STMT,
541
  QUERY_NODE_SHOW_GRANTS_FULL_STMT,
542
  QUERY_NODE_SHOW_GRANTS_LOGS_STMT,
543
  QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT,
544
  QUERY_NODE_SHOW_ENCRYPTIONS_STMT,
545
  QUERY_NODE_SHOW_TSMAS_STMT,
546
  QUERY_NODE_SHOW_ANODES_STMT,
547
  QUERY_NODE_SHOW_ANODES_FULL_STMT,
548
  QUERY_NODE_SHOW_USAGE_STMT,
549
  QUERY_NODE_SHOW_FILESETS_STMT,
550
  QUERY_NODE_SHOW_TRANSACTION_DETAILS_STMT,
551
  QUERY_NODE_SHOW_VTABLES_STMT,
552
  QUERY_NODE_SHOW_BNODES_STMT,
553
  QUERY_NODE_SHOW_MOUNTS_STMT,
554
  QUERY_NODE_SHOW_SSMIGRATES_STMT,
555
  QUERY_NODE_SHOW_SCANS_STMT,
556
  QUERY_NODE_SHOW_SCAN_DETAILS_STMT,
557
  QUERY_NODE_SHOW_RSMAS_STMT,
558
  QUERY_NODE_SHOW_RETENTIONS_STMT,
559
  QUERY_NODE_SHOW_RETENTION_DETAILS_STMT,
560
  QUERY_NODE_SHOW_INSTANCES_STMT,
561
  QUERY_NODE_SHOW_ENCRYPT_ALGORITHMS_STMT,
562
  // the order of QUERY_NODE_SHOW_* must be aligned with the order of `sysTableShowAdapter` defines.
563
  QUERY_NODE_SHOW_TOKENS_STMT,
564
  QUERY_NODE_SHOW_ENCRYPT_STATUS_STMT,
565
  QUERY_NODE_SHOW_ROLES_STMT,
566
  QUERY_NODE_SHOW_ROLE_PRIVILEGES_STMT,
567
  QUERY_NODE_SHOW_ROLE_COL_PRIVILEGES_STMT,
568
  QUERY_NODE_SHOW_XNODES_STMT,
569
  QUERY_NODE_SHOW_XNODE_TASKS_STMT,
570
  QUERY_NODE_SHOW_XNODE_AGENTS_STMT,
571
  QUERY_NODE_SHOW_XNODE_JOBS_STMT,
572
  QUERY_NODE_SHOW_VALIDATE_VTABLE_STMT,
573
  QUERY_NODE_SHOW_SECURITY_POLICIES_STMT,
574
575
  // logic plan node
576
  QUERY_NODE_LOGIC_PLAN_SCAN = 1000,
577
  QUERY_NODE_LOGIC_PLAN_JOIN,
578
  QUERY_NODE_LOGIC_PLAN_AGG,
579
  QUERY_NODE_LOGIC_PLAN_PROJECT,
580
  QUERY_NODE_LOGIC_PLAN_VNODE_MODIFY,
581
  QUERY_NODE_LOGIC_PLAN_EXCHANGE,
582
  QUERY_NODE_LOGIC_PLAN_MERGE,
583
  QUERY_NODE_LOGIC_PLAN_WINDOW,
584
  QUERY_NODE_LOGIC_PLAN_FILL,
585
  QUERY_NODE_LOGIC_PLAN_SORT,
586
  QUERY_NODE_LOGIC_PLAN_PARTITION,
587
  QUERY_NODE_LOGIC_PLAN_INDEF_ROWS_FUNC,
588
  QUERY_NODE_LOGIC_PLAN_INTERP_FUNC,
589
  QUERY_NODE_LOGIC_SUBPLAN,
590
  QUERY_NODE_LOGIC_PLAN,
591
  QUERY_NODE_LOGIC_PLAN_GROUP_CACHE,
592
  QUERY_NODE_LOGIC_PLAN_DYN_QUERY_CTRL,
593
  QUERY_NODE_LOGIC_PLAN_FORECAST_FUNC,
594
  QUERY_NODE_LOGIC_PLAN_VIRTUAL_TABLE_SCAN,
595
  QUERY_NODE_LOGIC_PLAN_ANALYSIS_FUNC,
596
597
  // physical plan node
598
  QUERY_NODE_PHYSICAL_PLAN_TAG_SCAN = 1100,
599
  QUERY_NODE_PHYSICAL_PLAN_TABLE_SCAN,
600
  QUERY_NODE_PHYSICAL_PLAN_TABLE_SEQ_SCAN,  // INACTIVE
601
  QUERY_NODE_PHYSICAL_PLAN_TABLE_MERGE_SCAN,
602
  QUERY_NODE_PHYSICAL_PLAN_STREAM_SCAN,
603
  QUERY_NODE_PHYSICAL_PLAN_SYSTABLE_SCAN,
604
  QUERY_NODE_PHYSICAL_PLAN_BLOCK_DIST_SCAN,
605
  QUERY_NODE_PHYSICAL_PLAN_LAST_ROW_SCAN,
606
  QUERY_NODE_PHYSICAL_PLAN_PROJECT,
607
  QUERY_NODE_PHYSICAL_PLAN_MERGE_JOIN,
608
  QUERY_NODE_PHYSICAL_PLAN_HASH_AGG,
609
  QUERY_NODE_PHYSICAL_PLAN_EXCHANGE,
610
  QUERY_NODE_PHYSICAL_PLAN_MERGE,
611
  QUERY_NODE_PHYSICAL_PLAN_SORT,
612
  QUERY_NODE_PHYSICAL_PLAN_GROUP_SORT,
613
  QUERY_NODE_PHYSICAL_PLAN_HASH_INTERVAL,
614
  QUERY_NODE_PHYSICAL_PLAN_MERGE_INTERVAL,  // INACTIVE
615
  QUERY_NODE_PHYSICAL_PLAN_MERGE_ALIGNED_INTERVAL,
616
  QUERY_NODE_PHYSICAL_PLAN_UNUSED_1,
617
  QUERY_NODE_PHYSICAL_PLAN_UNUSED_2,
618
  QUERY_NODE_PHYSICAL_PLAN_UNUSED_3,
619
  QUERY_NODE_PHYSICAL_PLAN_FILL,
620
  QUERY_NODE_PHYSICAL_PLAN_UNUSED_4,
621
  QUERY_NODE_PHYSICAL_PLAN_MERGE_SESSION,
622
  QUERY_NODE_PHYSICAL_PLAN_UNUSED_5,
623
  QUERY_NODE_PHYSICAL_PLAN_UNUSED_6,
624
  QUERY_NODE_PHYSICAL_PLAN_UNUSED_7,
625
  QUERY_NODE_PHYSICAL_PLAN_MERGE_STATE,
626
  QUERY_NODE_PHYSICAL_PLAN_UNUSED_8,
627
  QUERY_NODE_PHYSICAL_PLAN_PARTITION,
628
  QUERY_NODE_PHYSICAL_PLAN_UNUSED_9,
629
  QUERY_NODE_PHYSICAL_PLAN_INDEF_ROWS_FUNC,
630
  QUERY_NODE_PHYSICAL_PLAN_INTERP_FUNC,
631
  QUERY_NODE_PHYSICAL_PLAN_DISPATCH,
632
  QUERY_NODE_PHYSICAL_PLAN_INSERT,
633
  QUERY_NODE_PHYSICAL_PLAN_QUERY_INSERT,
634
  QUERY_NODE_PHYSICAL_PLAN_DELETE,
635
  QUERY_NODE_PHYSICAL_SUBPLAN,
636
  QUERY_NODE_PHYSICAL_PLAN,
637
  QUERY_NODE_PHYSICAL_PLAN_TABLE_COUNT_SCAN,
638
  QUERY_NODE_PHYSICAL_PLAN_MERGE_EVENT,
639
  QUERY_NODE_PHYSICAL_PLAN_UNUSED_10,
640
  QUERY_NODE_PHYSICAL_PLAN_HASH_JOIN,
641
  QUERY_NODE_PHYSICAL_PLAN_GROUP_CACHE,
642
  QUERY_NODE_PHYSICAL_PLAN_DYN_QUERY_CTRL,
643
  QUERY_NODE_PHYSICAL_PLAN_MERGE_COUNT,
644
  QUERY_NODE_PHYSICAL_PLAN_UNUSED_11,
645
  QUERY_NODE_PHYSICAL_PLAN_UNUSED_12,
646
  QUERY_NODE_PHYSICAL_PLAN_UNUSED_13,
647
  QUERY_NODE_PHYSICAL_PLAN_MERGE_ANOMALY,
648
  QUERY_NODE_PHYSICAL_PLAN_UNUSED_14,
649
  QUERY_NODE_PHYSICAL_PLAN_FORECAST_FUNC,
650
  QUERY_NODE_PHYSICAL_PLAN_UNUSED_15,
651
  QUERY_NODE_PHYSICAL_PLAN_UNUSED_16,
652
  QUERY_NODE_PHYSICAL_PLAN_UNUSED_17,
653
  QUERY_NODE_PHYSICAL_PLAN_UNUSED_18,
654
  QUERY_NODE_PHYSICAL_PLAN_UNUSED_19,
655
  QUERY_NODE_PHYSICAL_PLAN_UNUSED_20,
656
  QUERY_NODE_PHYSICAL_PLAN_UNUSED_21,
657
  QUERY_NODE_PHYSICAL_PLAN_UNUSED_22,
658
  QUERY_NODE_PHYSICAL_PLAN_UNUSED_23,
659
  QUERY_NODE_PHYSICAL_PLAN_UNUSED_24,
660
  QUERY_NODE_PHYSICAL_PLAN_VIRTUAL_TABLE_SCAN,
661
  QUERY_NODE_PHYSICAL_PLAN_EXTERNAL_WINDOW,
662
  QUERY_NODE_PHYSICAL_PLAN_HASH_EXTERNAL,
663
  QUERY_NODE_PHYSICAL_PLAN_MERGE_ALIGNED_EXTERNAL,
664
  QUERY_NODE_PHYSICAL_PLAN_STREAM_INSERT,
665
  QUERY_NODE_PHYSICAL_PLAN_ANALYSIS_FUNC,
666
  // xnode
667
  QUERY_NODE_CREATE_XNODE_STMT = 1200,  // Xnode
668
  QUERY_NODE_DROP_XNODE_STMT,
669
  QUERY_NODE_DRAIN_XNODE_STMT,
670
  QUERY_NODE_XNODE_TASK_OPTIONS,              // XNode task options
671
  QUERY_NODE_XNODE_TASK_SOURCE_OPT,           // XNode task source
672
  QUERY_NODE_XNODE_TASK_SINK_OPT,             // XNode task sink
673
  QUERY_NODE_CREATE_XNODE_TASK_STMT,          // XNode task
674
  QUERY_NODE_START_XNODE_TASK_STMT,           // XNode task
675
  QUERY_NODE_STOP_XNODE_TASK_STMT,            // XNode task
676
  QUERY_NODE_UPDATE_XNODE_TASK_STMT,          // XNode task
677
  QUERY_NODE_DROP_XNODE_TASK_STMT,            // XNode task
678
  QUERY_NODE_CREATE_XNODE_JOB_STMT,           // XNode job
679
  QUERY_NODE_ALTER_XNODE_JOB_STMT,            // XNode job
680
  QUERY_NODE_REBALANCE_XNODE_JOB_STMT,        // XNode job
681
  QUERY_NODE_REBALANCE_XNODE_JOB_WHERE_STMT,  // XNode job
682
  QUERY_NODE_DROP_XNODE_JOB_STMT,             // XNode job
683
  QUERY_NODE_CREATE_XNODE_AGENT_STMT,         // XNode agent
684
  QUERY_NODE_DROP_XNODE_AGENT_STMT,           // XNode agent
685
  QUERY_NODE_ALTER_XNODE_AGENT_STMT,          // XNode agent
686
  QUERY_NODE_ALTER_XNODE_STMT,                // Alter xnode
687
} ENodeType;
688
689
typedef struct {
690
  int32_t     vgId;
691
  uint8_t     option;         // 0x0 REQ_OPT_TBNAME, 0x01 REQ_OPT_TBUID
692
  uint8_t     autoCreateCtb;  // 0x0 not auto create, 0x01 auto create
693
  const char* dbFName;
694
  const char* tbName;
695
} SBuildTableInput;
696
697
typedef struct {
698
  char    db[TSDB_DB_FNAME_LEN];
699
  int64_t dbId;
700
  int32_t vgVersion;
701
  int32_t numOfTable;  // unit is TSDB_TABLE_NUM_UNIT
702
  int64_t stateTs;
703
} SBuildUseDBInput;
704
705
typedef struct SField {
706
  char    name[TSDB_COL_NAME_LEN];
707
  uint8_t type;
708
  int8_t  flags;
709
  int32_t bytes;
710
} SField;
711
712
typedef struct SFieldWithOptions {
713
  char     name[TSDB_COL_NAME_LEN];
714
  uint8_t  type;
715
  int8_t   flags;
716
  int32_t  bytes;
717
  uint32_t compress;
718
  STypeMod typeMod;
719
} SFieldWithOptions;
720
721
typedef struct SRetention {
722
  int64_t freq;
723
  int64_t keep;
724
  int8_t  freqUnit;
725
  int8_t  keepUnit;
726
} SRetention;
727
728
#define RETENTION_VALID(l, r) ((((l) == 0 && (r)->freq >= 0) || ((r)->freq > 0)) && ((r)->keep > 0))
729
730
#pragma pack(push, 1)
731
// null-terminated string instead of char array to avoid too many memory consumption in case of more than 1M tableMeta
732
typedef struct SEp {
733
  char     fqdn[TSDB_FQDN_LEN];
734
  uint16_t port;
735
} SEp;
736
737
typedef struct {
738
  int32_t contLen;
739
  int32_t vgId;
740
} SMsgHead;
741
742
// Submit message for one table
743
typedef struct SSubmitBlk {
744
  int64_t uid;        // table unique id
745
  int64_t suid;       // stable id
746
  int32_t sversion;   // data schema version
747
  int32_t dataLen;    // data part length, not including the SSubmitBlk head
748
  int32_t schemaLen;  // schema length, if length is 0, no schema exists
749
  int32_t numOfRows;  // total number of rows in current submit block
750
  char    data[];
751
} SSubmitBlk;
752
753
// Submit message for this TSDB
754
typedef struct {
755
  SMsgHead header;
756
  int64_t  version;
757
  int32_t  length;
758
  int32_t  numOfBlocks;
759
  char     blocks[];
760
} SSubmitReq;
761
762
typedef struct {
763
  int32_t totalLen;
764
  int32_t len;
765
  STSRow* row;
766
} SSubmitBlkIter;
767
768
typedef struct {
769
  int32_t totalLen;
770
  int32_t len;
771
  // head of SSubmitBlk
772
  int64_t uid;        // table unique id
773
  int64_t suid;       // stable id
774
  int32_t sversion;   // data schema version
775
  int32_t dataLen;    // data part length, not including the SSubmitBlk head
776
  int32_t schemaLen;  // schema length, if length is 0, no schema exists
777
  int32_t numOfRows;  // total number of rows in current submit block
778
  // head of SSubmitBlk
779
  int32_t     numOfBlocks;
780
  const void* pMsg;
781
} SSubmitMsgIter;
782
783
int32_t tInitSubmitMsgIter(const SSubmitReq* pMsg, SSubmitMsgIter* pIter);
784
int32_t tGetSubmitMsgNext(SSubmitMsgIter* pIter, SSubmitBlk** pPBlock);
785
int32_t tInitSubmitBlkIter(SSubmitMsgIter* pMsgIter, SSubmitBlk* pBlock, SSubmitBlkIter* pIter);
786
STSRow* tGetSubmitBlkNext(SSubmitBlkIter* pIter);
787
// for debug
788
int32_t tPrintFixedSchemaSubmitReq(SSubmitReq* pReq, STSchema* pSchema);
789
790
typedef struct {
791
  bool     hasRef;
792
  col_id_t id;
793
  char     refDbName[TSDB_DB_NAME_LEN];
794
  char     refTableName[TSDB_TABLE_NAME_LEN];
795
  char     refColName[TSDB_COL_NAME_LEN];
796
  char     colName[TSDB_COL_NAME_LEN];     // for tmq get json
797
} SColRef;
798
799
typedef struct {
800
  int32_t  nCols;
801
  int32_t  version;
802
  SColRef* pColRef;
803
  int32_t  nTagRefs;
804
  SColRef* pTagRef;
805
} SColRefWrapper;
806
807
int32_t tEncodeSColRefWrapper(SEncoder* pCoder, const SColRefWrapper* pWrapper);
808
int32_t tDecodeSColRefWrapperEx(SDecoder* pDecoder, SColRefWrapper* pWrapper, bool decoderMalloc);
809
typedef struct {
810
  int32_t vgId;
811
  SColRef colRef;
812
} SColRefEx;
813
814
typedef struct {
815
  int16_t colId;
816
  char    refDbName[TSDB_DB_NAME_LEN];
817
  char    refTableName[TSDB_TABLE_NAME_LEN];
818
  char    refColName[TSDB_COL_NAME_LEN];
819
} SRefColInfo;
820
821
typedef struct SVCTableRefCols {
822
  uint64_t     uid;
823
  int32_t      numOfSrcTbls;
824
  int32_t      numOfColRefs;
825
  SRefColInfo* refCols;
826
} SVCTableRefCols;
827
828
typedef struct SVCTableMergeInfo {
829
  uint64_t uid;
830
  int32_t  numOfSrcTbls;
831
} SVCTableMergeInfo;
832
833
typedef struct {
834
  int32_t    nCols;
835
  SColRefEx* pColRefEx;
836
} SColRefExWrapper;
837
838
struct SSchema {
839
  int8_t   type;
840
  int8_t   flags;
841
  col_id_t colId;
842
  int32_t  bytes;
843
  char     name[TSDB_COL_NAME_LEN];
844
};
845
struct SSchemaExt {
846
  col_id_t colId;
847
  uint32_t compress;
848
  STypeMod typeMod;
849
};
850
851
struct SSchemaRsma {
852
  int64_t    interval[2];
853
  int32_t    nFuncs;
854
  int8_t     tbType;
855
  tb_uid_t   tbUid;
856
  func_id_t* funcIds;
857
  char       tbName[TSDB_TABLE_NAME_LEN];
858
};
859
860
struct SSchema2 {
861
  int8_t   type;
862
  int8_t   flags;
863
  col_id_t colId;
864
  int32_t  bytes;
865
  char     name[TSDB_COL_NAME_LEN];
866
  uint32_t compress;
867
};
868
869
typedef struct {
870
  char        tbName[TSDB_TABLE_NAME_LEN];
871
  char        stbName[TSDB_TABLE_NAME_LEN];
872
  char        dbFName[TSDB_DB_FNAME_LEN];
873
  int64_t     dbId;
874
  int32_t     numOfTags;
875
  int32_t     numOfColumns;
876
  int8_t      precision;
877
  int8_t      tableType;
878
  int32_t     sversion;
879
  int32_t     tversion;
880
  int32_t     rversion;
881
  uint64_t    suid;
882
  uint64_t    tuid;
883
  int32_t     vgId;
884
  union {
885
    uint8_t flag;
886
    struct {
887
      uint8_t sysInfo : 1;
888
      uint8_t isAudit : 1;
889
      uint8_t privCat : 3;  // ESysTblPrivCat
890
      uint8_t secLvl : 3;
891
    };
892
  };
893
  int64_t     ownerId;
894
  SSchema*    pSchemas;
895
  SSchemaExt* pSchemaExt;
896
  int8_t      virtualStb;
897
  int32_t     numOfColRefs;
898
  SColRef*    pColRefs;
899
  int32_t     numOfTagRefs;
900
  SColRef*    pTagRefs;
901
  int8_t      secureDelete;
902
} STableMetaRsp;
903
904
typedef struct {
905
  int32_t        code;
906
  int64_t        uid;
907
  char*          tblFName;
908
  int32_t        numOfRows;
909
  int32_t        affectedRows;
910
  int64_t        sver;
911
  STableMetaRsp* pMeta;
912
} SSubmitBlkRsp;
913
914
typedef struct {
915
  int32_t numOfRows;
916
  int32_t affectedRows;
917
  int32_t nBlocks;
918
  union {
919
    SArray*        pArray;
920
    SSubmitBlkRsp* pBlocks;
921
  };
922
} SSubmitRsp;
923
924
// int32_t tEncodeSSubmitRsp(SEncoder* pEncoder, const SSubmitRsp* pRsp);
925
// int32_t tDecodeSSubmitRsp(SDecoder* pDecoder, SSubmitRsp* pRsp);
926
// void    tFreeSSubmitBlkRsp(void* param);
927
void tFreeSSubmitRsp(SSubmitRsp* pRsp);
928
929
0
#define COL_SMA_ON       ((int8_t)0x1)
930
0
#define COL_IDX_ON       ((int8_t)0x2)
931
0
#define COL_IS_KEY       ((int8_t)0x4)
932
#define COL_SET_NULL     ((int8_t)0x10)
933
#define COL_SET_VAL      ((int8_t)0x20)
934
0
#define COL_IS_SYSINFO   ((int8_t)0x40)
935
0
#define COL_HAS_TYPE_MOD ((int8_t)0x80)
936
0
#define COL_REF_BY_STM   ((int8_t)0x08)
937
938
#define COL_IS_SET(FLG)  (((FLG) & (COL_SET_VAL | COL_SET_NULL)) != 0)
939
#define COL_CLR_SET(FLG) ((FLG) &= (~(COL_SET_VAL | COL_SET_NULL)))
940
941
#define IS_BSMA_ON(s)  (((s)->flags & 0x01) == COL_SMA_ON)
942
0
#define IS_IDX_ON(s)   (((s)->flags & 0x02) == COL_IDX_ON)
943
#define IS_SET_NULL(s) (((s)->flags & COL_SET_NULL) == COL_SET_NULL)
944
945
#define SSCHMEA_SET_IDX_ON(s) \
946
  do {                        \
947
    (s)->flags |= COL_IDX_ON; \
948
  } while (0)
949
950
#define SSCHMEA_SET_IDX_OFF(s)   \
951
  do {                           \
952
    (s)->flags &= (~COL_IDX_ON); \
953
  } while (0)
954
955
#define SSCHEMA_SET_TYPE_MOD(s)     \
956
  do {                              \
957
    (s)->flags |= COL_HAS_TYPE_MOD; \
958
  } while (0)
959
960
#define HAS_TYPE_MOD(s) (((s)->flags & COL_HAS_TYPE_MOD))
961
962
#define SSCHMEA_TYPE(s)  ((s)->type)
963
#define SSCHMEA_FLAGS(s) ((s)->flags)
964
#define SSCHMEA_COLID(s) ((s)->colId)
965
#define SSCHMEA_BYTES(s) ((s)->bytes)
966
#define SSCHMEA_NAME(s)  ((s)->name)
967
968
typedef struct {
969
  bool    tsEnableMonitor;
970
  int32_t tsMonitorInterval;
971
  int32_t tsSlowLogThreshold;
972
  int32_t tsSlowLogMaxLen;
973
  int32_t tsSlowLogScope;
974
  int32_t tsSlowLogThresholdTest;  // Obsolete
975
  char    tsSlowLogExceptDb[TSDB_DB_NAME_LEN];
976
} SMonitorParas;
977
978
typedef struct {
979
  STypeMod typeMod;
980
} SExtSchema;
981
982
bool hasExtSchema(const SExtSchema* pExtSchema);
983
984
typedef struct {
985
  int32_t      nCols;
986
  int32_t      version;
987
  SSchema*     pSchema;
988
  SSchemaRsma* pRsma;
989
} SSchemaWrapper;
990
991
typedef struct {
992
  col_id_t id;
993
  uint32_t alg;
994
} SColCmpr;
995
996
typedef struct {
997
  int32_t   nCols;
998
  int32_t   version;
999
  SColCmpr* pColCmpr;
1000
} SColCmprWrapper;
1001
1002
0
static FORCE_INLINE int32_t tInitDefaultSColRefWrapperByCols(SColRefWrapper* pRef, int32_t nCols) {
1003
0
  if (pRef->pColRef) {
1004
0
    return TSDB_CODE_INVALID_PARA;
1005
0
  }
1006
0
  pRef->pColRef = (SColRef*)taosMemoryCalloc(nCols, sizeof(SColRef));
1007
0
  if (pRef->pColRef == NULL) {
1008
0
    return terrno;
1009
0
  }
1010
0
  pRef->nCols = nCols;
1011
0
  for (int32_t i = 0; i < nCols; i++) {
1012
0
    pRef->pColRef[i].hasRef = false;
1013
0
    pRef->pColRef[i].id = (col_id_t)(i + 1);
1014
0
  }
1015
0
  return 0;
1016
0
}
Unexecuted instantiation: sql-fuzzer.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: parser.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: parTranslater.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: parUtil.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: parAstParser.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: parAuthenticator.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: parCalcConst.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: parInsertSql.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: parInsertUtil.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: taos_lemon_sql.tab.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: parAstCreater.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: parInsertSml.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: planner.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: planLogicCreater.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: planOptimizer.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: planPhysiCreater.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: planScaleOut.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: planSpliter.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: planUtil.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: planValidator.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: catalog.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: ctgAsync.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: ctgCache.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: ctgDbg.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: ctgRemote.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: ctgRent.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: ctgUtil.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: functionMgt.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: tudf.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: builtins.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: builtinsimpl.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: thistogram.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: tpercentile.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: tavgfunction.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: tminmax.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: tminmaxavx.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: filter.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: scalar.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: sclfunc.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: sclvector.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: nodesCloneFuncs.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: nodesCodeFuncs.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: nodesEqualFuncs.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: nodesMatchFuncs.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: nodesMsgFuncs.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: nodesToSQLFuncs.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: nodesTraverseFuncs.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: nodesUtilFuncs.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: queryUtil.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: querymsg.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: trans.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: transCli.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: transComm.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: transSasl.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: transSvr.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: transTLS.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: thttp.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: geomFunc.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: tconfig.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: tdigest.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: tlog.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: tmempool.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: mpDirect.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: systable.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: tdatablock.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: tdataformat.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: tglobal.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: tmisce.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: tname.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: tpriv.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: ttime.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: tvariant.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: streamMsg.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: tmsg.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: xnode.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: tencrypt.c:tInitDefaultSColRefWrapperByCols
Unexecuted instantiation: streamJson.c:tInitDefaultSColRefWrapperByCols
1017
1018
0
static FORCE_INLINE int32_t tInitDefaultSColRefWrapperByTags(SColRefWrapper* pRef, int32_t nTags, col_id_t startColId) {
1019
0
  if (pRef->pTagRef) {
1020
0
    return TSDB_CODE_INVALID_PARA;
1021
0
  }
1022
0
  pRef->pTagRef = (SColRef*)taosMemoryCalloc(nTags, sizeof(SColRef));
1023
0
  if (pRef->pTagRef == NULL) {
1024
0
    return terrno;
1025
0
  }
1026
0
  pRef->nTagRefs = nTags;
1027
0
  for (int32_t i = 0; i < nTags; i++) {
1028
0
    pRef->pTagRef[i].hasRef = false;
1029
0
    pRef->pTagRef[i].id = (col_id_t)(startColId + i);
1030
0
  }
1031
0
  return 0;
1032
0
}
Unexecuted instantiation: sql-fuzzer.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: parser.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: parTranslater.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: parUtil.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: parAstParser.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: parAuthenticator.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: parCalcConst.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: parInsertSql.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: parInsertUtil.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: taos_lemon_sql.tab.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: parAstCreater.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: parInsertSml.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: planner.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: planLogicCreater.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: planOptimizer.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: planPhysiCreater.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: planScaleOut.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: planSpliter.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: planUtil.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: planValidator.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: catalog.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: ctgAsync.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: ctgCache.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: ctgDbg.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: ctgRemote.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: ctgRent.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: ctgUtil.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: functionMgt.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: tudf.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: builtins.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: builtinsimpl.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: thistogram.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: tpercentile.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: tavgfunction.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: tminmax.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: tminmaxavx.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: filter.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: scalar.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: sclfunc.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: sclvector.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: nodesCloneFuncs.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: nodesCodeFuncs.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: nodesEqualFuncs.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: nodesMatchFuncs.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: nodesMsgFuncs.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: nodesToSQLFuncs.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: nodesTraverseFuncs.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: nodesUtilFuncs.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: queryUtil.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: querymsg.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: trans.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: transCli.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: transComm.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: transSasl.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: transSvr.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: transTLS.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: thttp.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: geomFunc.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: tconfig.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: tdigest.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: tlog.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: tmempool.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: mpDirect.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: systable.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: tdatablock.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: tdataformat.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: tglobal.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: tmisce.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: tname.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: tpriv.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: ttime.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: tvariant.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: streamMsg.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: tmsg.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: xnode.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: tencrypt.c:tInitDefaultSColRefWrapperByTags
Unexecuted instantiation: streamJson.c:tInitDefaultSColRefWrapperByTags
1033
1034
0
static FORCE_INLINE SColCmprWrapper* tCloneSColCmprWrapper(const SColCmprWrapper* pSrcWrapper) {
1035
0
  if (pSrcWrapper->pColCmpr == NULL || pSrcWrapper->nCols == 0) {
1036
0
    terrno = TSDB_CODE_INVALID_PARA;
1037
0
    return NULL;
1038
0
  }
1039
0
1040
0
  SColCmprWrapper* pDstWrapper = (SColCmprWrapper*)taosMemoryMalloc(sizeof(SColCmprWrapper));
1041
0
  if (pDstWrapper == NULL) {
1042
0
    return NULL;
1043
0
  }
1044
0
  pDstWrapper->nCols = pSrcWrapper->nCols;
1045
0
  pDstWrapper->version = pSrcWrapper->version;
1046
0
1047
0
  int32_t size = sizeof(SColCmpr) * pDstWrapper->nCols;
1048
0
  pDstWrapper->pColCmpr = (SColCmpr*)taosMemoryCalloc(1, size);
1049
0
  if (pDstWrapper->pColCmpr == NULL) {
1050
0
    taosMemoryFree(pDstWrapper);
1051
0
    return NULL;
1052
0
  }
1053
0
  (void)memcpy(pDstWrapper->pColCmpr, pSrcWrapper->pColCmpr, size);
1054
0
1055
0
  return pDstWrapper;
1056
0
}
Unexecuted instantiation: sql-fuzzer.c:tCloneSColCmprWrapper
Unexecuted instantiation: parser.c:tCloneSColCmprWrapper
Unexecuted instantiation: parTranslater.c:tCloneSColCmprWrapper
Unexecuted instantiation: parUtil.c:tCloneSColCmprWrapper
Unexecuted instantiation: parAstParser.c:tCloneSColCmprWrapper
Unexecuted instantiation: parAuthenticator.c:tCloneSColCmprWrapper
Unexecuted instantiation: parCalcConst.c:tCloneSColCmprWrapper
Unexecuted instantiation: parInsertSql.c:tCloneSColCmprWrapper
Unexecuted instantiation: parInsertUtil.c:tCloneSColCmprWrapper
Unexecuted instantiation: taos_lemon_sql.tab.c:tCloneSColCmprWrapper
Unexecuted instantiation: parAstCreater.c:tCloneSColCmprWrapper
Unexecuted instantiation: parInsertSml.c:tCloneSColCmprWrapper
Unexecuted instantiation: planner.c:tCloneSColCmprWrapper
Unexecuted instantiation: planLogicCreater.c:tCloneSColCmprWrapper
Unexecuted instantiation: planOptimizer.c:tCloneSColCmprWrapper
Unexecuted instantiation: planPhysiCreater.c:tCloneSColCmprWrapper
Unexecuted instantiation: planScaleOut.c:tCloneSColCmprWrapper
Unexecuted instantiation: planSpliter.c:tCloneSColCmprWrapper
Unexecuted instantiation: planUtil.c:tCloneSColCmprWrapper
Unexecuted instantiation: planValidator.c:tCloneSColCmprWrapper
Unexecuted instantiation: catalog.c:tCloneSColCmprWrapper
Unexecuted instantiation: ctgAsync.c:tCloneSColCmprWrapper
Unexecuted instantiation: ctgCache.c:tCloneSColCmprWrapper
Unexecuted instantiation: ctgDbg.c:tCloneSColCmprWrapper
Unexecuted instantiation: ctgRemote.c:tCloneSColCmprWrapper
Unexecuted instantiation: ctgRent.c:tCloneSColCmprWrapper
Unexecuted instantiation: ctgUtil.c:tCloneSColCmprWrapper
Unexecuted instantiation: functionMgt.c:tCloneSColCmprWrapper
Unexecuted instantiation: tudf.c:tCloneSColCmprWrapper
Unexecuted instantiation: builtins.c:tCloneSColCmprWrapper
Unexecuted instantiation: builtinsimpl.c:tCloneSColCmprWrapper
Unexecuted instantiation: thistogram.c:tCloneSColCmprWrapper
Unexecuted instantiation: tpercentile.c:tCloneSColCmprWrapper
Unexecuted instantiation: tavgfunction.c:tCloneSColCmprWrapper
Unexecuted instantiation: tminmax.c:tCloneSColCmprWrapper
Unexecuted instantiation: tminmaxavx.c:tCloneSColCmprWrapper
Unexecuted instantiation: filter.c:tCloneSColCmprWrapper
Unexecuted instantiation: scalar.c:tCloneSColCmprWrapper
Unexecuted instantiation: sclfunc.c:tCloneSColCmprWrapper
Unexecuted instantiation: sclvector.c:tCloneSColCmprWrapper
Unexecuted instantiation: nodesCloneFuncs.c:tCloneSColCmprWrapper
Unexecuted instantiation: nodesCodeFuncs.c:tCloneSColCmprWrapper
Unexecuted instantiation: nodesEqualFuncs.c:tCloneSColCmprWrapper
Unexecuted instantiation: nodesMatchFuncs.c:tCloneSColCmprWrapper
Unexecuted instantiation: nodesMsgFuncs.c:tCloneSColCmprWrapper
Unexecuted instantiation: nodesToSQLFuncs.c:tCloneSColCmprWrapper
Unexecuted instantiation: nodesTraverseFuncs.c:tCloneSColCmprWrapper
Unexecuted instantiation: nodesUtilFuncs.c:tCloneSColCmprWrapper
Unexecuted instantiation: queryUtil.c:tCloneSColCmprWrapper
Unexecuted instantiation: querymsg.c:tCloneSColCmprWrapper
Unexecuted instantiation: trans.c:tCloneSColCmprWrapper
Unexecuted instantiation: transCli.c:tCloneSColCmprWrapper
Unexecuted instantiation: transComm.c:tCloneSColCmprWrapper
Unexecuted instantiation: transSasl.c:tCloneSColCmprWrapper
Unexecuted instantiation: transSvr.c:tCloneSColCmprWrapper
Unexecuted instantiation: transTLS.c:tCloneSColCmprWrapper
Unexecuted instantiation: thttp.c:tCloneSColCmprWrapper
Unexecuted instantiation: geomFunc.c:tCloneSColCmprWrapper
Unexecuted instantiation: tconfig.c:tCloneSColCmprWrapper
Unexecuted instantiation: tdigest.c:tCloneSColCmprWrapper
Unexecuted instantiation: tlog.c:tCloneSColCmprWrapper
Unexecuted instantiation: tmempool.c:tCloneSColCmprWrapper
Unexecuted instantiation: mpDirect.c:tCloneSColCmprWrapper
Unexecuted instantiation: systable.c:tCloneSColCmprWrapper
Unexecuted instantiation: tdatablock.c:tCloneSColCmprWrapper
Unexecuted instantiation: tdataformat.c:tCloneSColCmprWrapper
Unexecuted instantiation: tglobal.c:tCloneSColCmprWrapper
Unexecuted instantiation: tmisce.c:tCloneSColCmprWrapper
Unexecuted instantiation: tname.c:tCloneSColCmprWrapper
Unexecuted instantiation: tpriv.c:tCloneSColCmprWrapper
Unexecuted instantiation: ttime.c:tCloneSColCmprWrapper
Unexecuted instantiation: tvariant.c:tCloneSColCmprWrapper
Unexecuted instantiation: streamMsg.c:tCloneSColCmprWrapper
Unexecuted instantiation: tmsg.c:tCloneSColCmprWrapper
Unexecuted instantiation: xnode.c:tCloneSColCmprWrapper
Unexecuted instantiation: tencrypt.c:tCloneSColCmprWrapper
Unexecuted instantiation: streamJson.c:tCloneSColCmprWrapper
1057
1058
0
static FORCE_INLINE int32_t tInitDefaultSColCmprWrapperByCols(SColCmprWrapper* pCmpr, int32_t nCols) {
1059
0
  if (!(!pCmpr->pColCmpr)) {
1060
0
    return TSDB_CODE_INVALID_PARA;
1061
0
  }
1062
0
  pCmpr->pColCmpr = (SColCmpr*)taosMemoryCalloc(nCols, sizeof(SColCmpr));
1063
0
  if (pCmpr->pColCmpr == NULL) {
1064
0
    return terrno;
1065
0
  }
1066
0
  pCmpr->nCols = nCols;
1067
0
  return 0;
1068
0
}
Unexecuted instantiation: sql-fuzzer.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: parser.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: parTranslater.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: parUtil.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: parAstParser.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: parAuthenticator.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: parCalcConst.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: parInsertSql.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: parInsertUtil.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: taos_lemon_sql.tab.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: parAstCreater.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: parInsertSml.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: planner.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: planLogicCreater.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: planOptimizer.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: planPhysiCreater.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: planScaleOut.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: planSpliter.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: planUtil.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: planValidator.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: catalog.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: ctgAsync.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: ctgCache.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: ctgDbg.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: ctgRemote.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: ctgRent.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: ctgUtil.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: functionMgt.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: tudf.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: builtins.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: builtinsimpl.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: thistogram.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: tpercentile.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: tavgfunction.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: tminmax.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: tminmaxavx.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: filter.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: scalar.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: sclfunc.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: sclvector.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: nodesCloneFuncs.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: nodesCodeFuncs.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: nodesEqualFuncs.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: nodesMatchFuncs.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: nodesMsgFuncs.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: nodesToSQLFuncs.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: nodesTraverseFuncs.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: nodesUtilFuncs.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: queryUtil.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: querymsg.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: trans.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: transCli.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: transComm.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: transSasl.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: transSvr.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: transTLS.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: thttp.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: geomFunc.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: tconfig.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: tdigest.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: tlog.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: tmempool.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: mpDirect.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: systable.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: tdatablock.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: tdataformat.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: tglobal.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: tmisce.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: tname.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: tpriv.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: ttime.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: tvariant.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: streamMsg.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: tmsg.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: xnode.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: tencrypt.c:tInitDefaultSColCmprWrapperByCols
Unexecuted instantiation: streamJson.c:tInitDefaultSColCmprWrapperByCols
1069
1070
0
static FORCE_INLINE int32_t tInitDefaultSColCmprWrapper(SColCmprWrapper* pCmpr, SSchemaWrapper* pSchema) {
1071
0
  pCmpr->nCols = pSchema->nCols;
1072
0
  if (!(!pCmpr->pColCmpr)) {
1073
0
    return TSDB_CODE_INVALID_PARA;
1074
0
  }
1075
0
  pCmpr->pColCmpr = (SColCmpr*)taosMemoryCalloc(pCmpr->nCols, sizeof(SColCmpr));
1076
0
  if (pCmpr->pColCmpr == NULL) {
1077
0
    return terrno;
1078
0
  }
1079
0
  for (int32_t i = 0; i < pCmpr->nCols; i++) {
1080
0
    SColCmpr* pColCmpr = &pCmpr->pColCmpr[i];
1081
0
    SSchema*  pColSchema = &pSchema->pSchema[i];
1082
0
    pColCmpr->id = pColSchema->colId;
1083
0
    pColCmpr->alg = 0;
1084
0
  }
1085
0
  return 0;
1086
0
}
Unexecuted instantiation: sql-fuzzer.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: parser.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: parTranslater.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: parUtil.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: parAstParser.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: parAuthenticator.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: parCalcConst.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: parInsertSql.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: parInsertUtil.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: taos_lemon_sql.tab.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: parAstCreater.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: parInsertSml.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: planner.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: planLogicCreater.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: planOptimizer.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: planPhysiCreater.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: planScaleOut.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: planSpliter.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: planUtil.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: planValidator.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: catalog.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: ctgAsync.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: ctgCache.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: ctgDbg.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: ctgRemote.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: ctgRent.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: ctgUtil.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: functionMgt.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: tudf.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: builtins.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: builtinsimpl.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: thistogram.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: tpercentile.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: tavgfunction.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: tminmax.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: tminmaxavx.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: filter.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: scalar.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: sclfunc.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: sclvector.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: nodesCloneFuncs.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: nodesCodeFuncs.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: nodesEqualFuncs.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: nodesMatchFuncs.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: nodesMsgFuncs.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: nodesToSQLFuncs.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: nodesTraverseFuncs.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: nodesUtilFuncs.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: queryUtil.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: querymsg.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: trans.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: transCli.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: transComm.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: transSasl.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: transSvr.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: transTLS.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: thttp.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: geomFunc.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: tconfig.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: tdigest.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: tlog.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: tmempool.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: mpDirect.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: systable.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: tdatablock.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: tdataformat.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: tglobal.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: tmisce.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: tname.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: tpriv.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: ttime.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: tvariant.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: streamMsg.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: tmsg.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: xnode.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: tencrypt.c:tInitDefaultSColCmprWrapper
Unexecuted instantiation: streamJson.c:tInitDefaultSColCmprWrapper
1087
1088
0
static FORCE_INLINE void tDeleteSColCmprWrapper(SColCmprWrapper* pWrapper) {
1089
0
  if (pWrapper == NULL) return;
1090
0
1091
0
  taosMemoryFreeClear(pWrapper->pColCmpr);
1092
0
  taosMemoryFreeClear(pWrapper);
1093
0
}
Unexecuted instantiation: sql-fuzzer.c:tDeleteSColCmprWrapper
Unexecuted instantiation: parser.c:tDeleteSColCmprWrapper
Unexecuted instantiation: parTranslater.c:tDeleteSColCmprWrapper
Unexecuted instantiation: parUtil.c:tDeleteSColCmprWrapper
Unexecuted instantiation: parAstParser.c:tDeleteSColCmprWrapper
Unexecuted instantiation: parAuthenticator.c:tDeleteSColCmprWrapper
Unexecuted instantiation: parCalcConst.c:tDeleteSColCmprWrapper
Unexecuted instantiation: parInsertSql.c:tDeleteSColCmprWrapper
Unexecuted instantiation: parInsertUtil.c:tDeleteSColCmprWrapper
Unexecuted instantiation: taos_lemon_sql.tab.c:tDeleteSColCmprWrapper
Unexecuted instantiation: parAstCreater.c:tDeleteSColCmprWrapper
Unexecuted instantiation: parInsertSml.c:tDeleteSColCmprWrapper
Unexecuted instantiation: planner.c:tDeleteSColCmprWrapper
Unexecuted instantiation: planLogicCreater.c:tDeleteSColCmprWrapper
Unexecuted instantiation: planOptimizer.c:tDeleteSColCmprWrapper
Unexecuted instantiation: planPhysiCreater.c:tDeleteSColCmprWrapper
Unexecuted instantiation: planScaleOut.c:tDeleteSColCmprWrapper
Unexecuted instantiation: planSpliter.c:tDeleteSColCmprWrapper
Unexecuted instantiation: planUtil.c:tDeleteSColCmprWrapper
Unexecuted instantiation: planValidator.c:tDeleteSColCmprWrapper
Unexecuted instantiation: catalog.c:tDeleteSColCmprWrapper
Unexecuted instantiation: ctgAsync.c:tDeleteSColCmprWrapper
Unexecuted instantiation: ctgCache.c:tDeleteSColCmprWrapper
Unexecuted instantiation: ctgDbg.c:tDeleteSColCmprWrapper
Unexecuted instantiation: ctgRemote.c:tDeleteSColCmprWrapper
Unexecuted instantiation: ctgRent.c:tDeleteSColCmprWrapper
Unexecuted instantiation: ctgUtil.c:tDeleteSColCmprWrapper
Unexecuted instantiation: functionMgt.c:tDeleteSColCmprWrapper
Unexecuted instantiation: tudf.c:tDeleteSColCmprWrapper
Unexecuted instantiation: builtins.c:tDeleteSColCmprWrapper
Unexecuted instantiation: builtinsimpl.c:tDeleteSColCmprWrapper
Unexecuted instantiation: thistogram.c:tDeleteSColCmprWrapper
Unexecuted instantiation: tpercentile.c:tDeleteSColCmprWrapper
Unexecuted instantiation: tavgfunction.c:tDeleteSColCmprWrapper
Unexecuted instantiation: tminmax.c:tDeleteSColCmprWrapper
Unexecuted instantiation: tminmaxavx.c:tDeleteSColCmprWrapper
Unexecuted instantiation: filter.c:tDeleteSColCmprWrapper
Unexecuted instantiation: scalar.c:tDeleteSColCmprWrapper
Unexecuted instantiation: sclfunc.c:tDeleteSColCmprWrapper
Unexecuted instantiation: sclvector.c:tDeleteSColCmprWrapper
Unexecuted instantiation: nodesCloneFuncs.c:tDeleteSColCmprWrapper
Unexecuted instantiation: nodesCodeFuncs.c:tDeleteSColCmprWrapper
Unexecuted instantiation: nodesEqualFuncs.c:tDeleteSColCmprWrapper
Unexecuted instantiation: nodesMatchFuncs.c:tDeleteSColCmprWrapper
Unexecuted instantiation: nodesMsgFuncs.c:tDeleteSColCmprWrapper
Unexecuted instantiation: nodesToSQLFuncs.c:tDeleteSColCmprWrapper
Unexecuted instantiation: nodesTraverseFuncs.c:tDeleteSColCmprWrapper
Unexecuted instantiation: nodesUtilFuncs.c:tDeleteSColCmprWrapper
Unexecuted instantiation: queryUtil.c:tDeleteSColCmprWrapper
Unexecuted instantiation: querymsg.c:tDeleteSColCmprWrapper
Unexecuted instantiation: trans.c:tDeleteSColCmprWrapper
Unexecuted instantiation: transCli.c:tDeleteSColCmprWrapper
Unexecuted instantiation: transComm.c:tDeleteSColCmprWrapper
Unexecuted instantiation: transSasl.c:tDeleteSColCmprWrapper
Unexecuted instantiation: transSvr.c:tDeleteSColCmprWrapper
Unexecuted instantiation: transTLS.c:tDeleteSColCmprWrapper
Unexecuted instantiation: thttp.c:tDeleteSColCmprWrapper
Unexecuted instantiation: geomFunc.c:tDeleteSColCmprWrapper
Unexecuted instantiation: tconfig.c:tDeleteSColCmprWrapper
Unexecuted instantiation: tdigest.c:tDeleteSColCmprWrapper
Unexecuted instantiation: tlog.c:tDeleteSColCmprWrapper
Unexecuted instantiation: tmempool.c:tDeleteSColCmprWrapper
Unexecuted instantiation: mpDirect.c:tDeleteSColCmprWrapper
Unexecuted instantiation: systable.c:tDeleteSColCmprWrapper
Unexecuted instantiation: tdatablock.c:tDeleteSColCmprWrapper
Unexecuted instantiation: tdataformat.c:tDeleteSColCmprWrapper
Unexecuted instantiation: tglobal.c:tDeleteSColCmprWrapper
Unexecuted instantiation: tmisce.c:tDeleteSColCmprWrapper
Unexecuted instantiation: tname.c:tDeleteSColCmprWrapper
Unexecuted instantiation: tpriv.c:tDeleteSColCmprWrapper
Unexecuted instantiation: ttime.c:tDeleteSColCmprWrapper
Unexecuted instantiation: tvariant.c:tDeleteSColCmprWrapper
Unexecuted instantiation: streamMsg.c:tDeleteSColCmprWrapper
Unexecuted instantiation: tmsg.c:tDeleteSColCmprWrapper
Unexecuted instantiation: xnode.c:tDeleteSColCmprWrapper
Unexecuted instantiation: tencrypt.c:tDeleteSColCmprWrapper
Unexecuted instantiation: streamJson.c:tDeleteSColCmprWrapper
1094
0
static FORCE_INLINE SSchemaWrapper* tCloneSSchemaWrapper(const SSchemaWrapper* pSchemaWrapper) {
1095
0
  if (pSchemaWrapper->pSchema == NULL) return NULL;
1096
0
1097
0
  SSchemaWrapper* pSW = (SSchemaWrapper*)taosMemoryCalloc(1, sizeof(SSchemaWrapper));
1098
0
  if (pSW == NULL) {
1099
0
    return NULL;
1100
0
  }
1101
0
  pSW->nCols = pSchemaWrapper->nCols;
1102
0
  pSW->version = pSchemaWrapper->version;
1103
0
  pSW->pSchema = (SSchema*)taosMemoryCalloc(pSW->nCols, sizeof(SSchema));
1104
0
  if (pSW->pSchema == NULL) {
1105
0
    taosMemoryFree(pSW);
1106
0
    return NULL;
1107
0
  }
1108
0
1109
0
  (void)memcpy(pSW->pSchema, pSchemaWrapper->pSchema, pSW->nCols * sizeof(SSchema));
1110
0
  return pSW;
1111
0
}
Unexecuted instantiation: sql-fuzzer.c:tCloneSSchemaWrapper
Unexecuted instantiation: parser.c:tCloneSSchemaWrapper
Unexecuted instantiation: parTranslater.c:tCloneSSchemaWrapper
Unexecuted instantiation: parUtil.c:tCloneSSchemaWrapper
Unexecuted instantiation: parAstParser.c:tCloneSSchemaWrapper
Unexecuted instantiation: parAuthenticator.c:tCloneSSchemaWrapper
Unexecuted instantiation: parCalcConst.c:tCloneSSchemaWrapper
Unexecuted instantiation: parInsertSql.c:tCloneSSchemaWrapper
Unexecuted instantiation: parInsertUtil.c:tCloneSSchemaWrapper
Unexecuted instantiation: taos_lemon_sql.tab.c:tCloneSSchemaWrapper
Unexecuted instantiation: parAstCreater.c:tCloneSSchemaWrapper
Unexecuted instantiation: parInsertSml.c:tCloneSSchemaWrapper
Unexecuted instantiation: planner.c:tCloneSSchemaWrapper
Unexecuted instantiation: planLogicCreater.c:tCloneSSchemaWrapper
Unexecuted instantiation: planOptimizer.c:tCloneSSchemaWrapper
Unexecuted instantiation: planPhysiCreater.c:tCloneSSchemaWrapper
Unexecuted instantiation: planScaleOut.c:tCloneSSchemaWrapper
Unexecuted instantiation: planSpliter.c:tCloneSSchemaWrapper
Unexecuted instantiation: planUtil.c:tCloneSSchemaWrapper
Unexecuted instantiation: planValidator.c:tCloneSSchemaWrapper
Unexecuted instantiation: catalog.c:tCloneSSchemaWrapper
Unexecuted instantiation: ctgAsync.c:tCloneSSchemaWrapper
Unexecuted instantiation: ctgCache.c:tCloneSSchemaWrapper
Unexecuted instantiation: ctgDbg.c:tCloneSSchemaWrapper
Unexecuted instantiation: ctgRemote.c:tCloneSSchemaWrapper
Unexecuted instantiation: ctgRent.c:tCloneSSchemaWrapper
Unexecuted instantiation: ctgUtil.c:tCloneSSchemaWrapper
Unexecuted instantiation: functionMgt.c:tCloneSSchemaWrapper
Unexecuted instantiation: tudf.c:tCloneSSchemaWrapper
Unexecuted instantiation: builtins.c:tCloneSSchemaWrapper
Unexecuted instantiation: builtinsimpl.c:tCloneSSchemaWrapper
Unexecuted instantiation: thistogram.c:tCloneSSchemaWrapper
Unexecuted instantiation: tpercentile.c:tCloneSSchemaWrapper
Unexecuted instantiation: tavgfunction.c:tCloneSSchemaWrapper
Unexecuted instantiation: tminmax.c:tCloneSSchemaWrapper
Unexecuted instantiation: tminmaxavx.c:tCloneSSchemaWrapper
Unexecuted instantiation: filter.c:tCloneSSchemaWrapper
Unexecuted instantiation: scalar.c:tCloneSSchemaWrapper
Unexecuted instantiation: sclfunc.c:tCloneSSchemaWrapper
Unexecuted instantiation: sclvector.c:tCloneSSchemaWrapper
Unexecuted instantiation: nodesCloneFuncs.c:tCloneSSchemaWrapper
Unexecuted instantiation: nodesCodeFuncs.c:tCloneSSchemaWrapper
Unexecuted instantiation: nodesEqualFuncs.c:tCloneSSchemaWrapper
Unexecuted instantiation: nodesMatchFuncs.c:tCloneSSchemaWrapper
Unexecuted instantiation: nodesMsgFuncs.c:tCloneSSchemaWrapper
Unexecuted instantiation: nodesToSQLFuncs.c:tCloneSSchemaWrapper
Unexecuted instantiation: nodesTraverseFuncs.c:tCloneSSchemaWrapper
Unexecuted instantiation: nodesUtilFuncs.c:tCloneSSchemaWrapper
Unexecuted instantiation: queryUtil.c:tCloneSSchemaWrapper
Unexecuted instantiation: querymsg.c:tCloneSSchemaWrapper
Unexecuted instantiation: trans.c:tCloneSSchemaWrapper
Unexecuted instantiation: transCli.c:tCloneSSchemaWrapper
Unexecuted instantiation: transComm.c:tCloneSSchemaWrapper
Unexecuted instantiation: transSasl.c:tCloneSSchemaWrapper
Unexecuted instantiation: transSvr.c:tCloneSSchemaWrapper
Unexecuted instantiation: transTLS.c:tCloneSSchemaWrapper
Unexecuted instantiation: thttp.c:tCloneSSchemaWrapper
Unexecuted instantiation: geomFunc.c:tCloneSSchemaWrapper
Unexecuted instantiation: tconfig.c:tCloneSSchemaWrapper
Unexecuted instantiation: tdigest.c:tCloneSSchemaWrapper
Unexecuted instantiation: tlog.c:tCloneSSchemaWrapper
Unexecuted instantiation: tmempool.c:tCloneSSchemaWrapper
Unexecuted instantiation: mpDirect.c:tCloneSSchemaWrapper
Unexecuted instantiation: systable.c:tCloneSSchemaWrapper
Unexecuted instantiation: tdatablock.c:tCloneSSchemaWrapper
Unexecuted instantiation: tdataformat.c:tCloneSSchemaWrapper
Unexecuted instantiation: tglobal.c:tCloneSSchemaWrapper
Unexecuted instantiation: tmisce.c:tCloneSSchemaWrapper
Unexecuted instantiation: tname.c:tCloneSSchemaWrapper
Unexecuted instantiation: tpriv.c:tCloneSSchemaWrapper
Unexecuted instantiation: ttime.c:tCloneSSchemaWrapper
Unexecuted instantiation: tvariant.c:tCloneSSchemaWrapper
Unexecuted instantiation: streamMsg.c:tCloneSSchemaWrapper
Unexecuted instantiation: tmsg.c:tCloneSSchemaWrapper
Unexecuted instantiation: xnode.c:tCloneSSchemaWrapper
Unexecuted instantiation: tencrypt.c:tCloneSSchemaWrapper
Unexecuted instantiation: streamJson.c:tCloneSSchemaWrapper
1112
1113
0
static FORCE_INLINE void tDeleteSchemaWrapper(SSchemaWrapper* pSchemaWrapper) {
1114
0
  if (pSchemaWrapper) {
1115
0
    taosMemoryFree(pSchemaWrapper->pSchema);
1116
0
    if (pSchemaWrapper->pRsma) {
1117
0
      taosMemoryFreeClear(pSchemaWrapper->pRsma->funcIds);
1118
0
      taosMemoryFreeClear(pSchemaWrapper->pRsma);
1119
0
    }
1120
0
    taosMemoryFree(pSchemaWrapper);
1121
0
  }
1122
0
}
Unexecuted instantiation: sql-fuzzer.c:tDeleteSchemaWrapper
Unexecuted instantiation: parser.c:tDeleteSchemaWrapper
Unexecuted instantiation: parTranslater.c:tDeleteSchemaWrapper
Unexecuted instantiation: parUtil.c:tDeleteSchemaWrapper
Unexecuted instantiation: parAstParser.c:tDeleteSchemaWrapper
Unexecuted instantiation: parAuthenticator.c:tDeleteSchemaWrapper
Unexecuted instantiation: parCalcConst.c:tDeleteSchemaWrapper
Unexecuted instantiation: parInsertSql.c:tDeleteSchemaWrapper
Unexecuted instantiation: parInsertUtil.c:tDeleteSchemaWrapper
Unexecuted instantiation: taos_lemon_sql.tab.c:tDeleteSchemaWrapper
Unexecuted instantiation: parAstCreater.c:tDeleteSchemaWrapper
Unexecuted instantiation: parInsertSml.c:tDeleteSchemaWrapper
Unexecuted instantiation: planner.c:tDeleteSchemaWrapper
Unexecuted instantiation: planLogicCreater.c:tDeleteSchemaWrapper
Unexecuted instantiation: planOptimizer.c:tDeleteSchemaWrapper
Unexecuted instantiation: planPhysiCreater.c:tDeleteSchemaWrapper
Unexecuted instantiation: planScaleOut.c:tDeleteSchemaWrapper
Unexecuted instantiation: planSpliter.c:tDeleteSchemaWrapper
Unexecuted instantiation: planUtil.c:tDeleteSchemaWrapper
Unexecuted instantiation: planValidator.c:tDeleteSchemaWrapper
Unexecuted instantiation: catalog.c:tDeleteSchemaWrapper
Unexecuted instantiation: ctgAsync.c:tDeleteSchemaWrapper
Unexecuted instantiation: ctgCache.c:tDeleteSchemaWrapper
Unexecuted instantiation: ctgDbg.c:tDeleteSchemaWrapper
Unexecuted instantiation: ctgRemote.c:tDeleteSchemaWrapper
Unexecuted instantiation: ctgRent.c:tDeleteSchemaWrapper
Unexecuted instantiation: ctgUtil.c:tDeleteSchemaWrapper
Unexecuted instantiation: functionMgt.c:tDeleteSchemaWrapper
Unexecuted instantiation: tudf.c:tDeleteSchemaWrapper
Unexecuted instantiation: builtins.c:tDeleteSchemaWrapper
Unexecuted instantiation: builtinsimpl.c:tDeleteSchemaWrapper
Unexecuted instantiation: thistogram.c:tDeleteSchemaWrapper
Unexecuted instantiation: tpercentile.c:tDeleteSchemaWrapper
Unexecuted instantiation: tavgfunction.c:tDeleteSchemaWrapper
Unexecuted instantiation: tminmax.c:tDeleteSchemaWrapper
Unexecuted instantiation: tminmaxavx.c:tDeleteSchemaWrapper
Unexecuted instantiation: filter.c:tDeleteSchemaWrapper
Unexecuted instantiation: scalar.c:tDeleteSchemaWrapper
Unexecuted instantiation: sclfunc.c:tDeleteSchemaWrapper
Unexecuted instantiation: sclvector.c:tDeleteSchemaWrapper
Unexecuted instantiation: nodesCloneFuncs.c:tDeleteSchemaWrapper
Unexecuted instantiation: nodesCodeFuncs.c:tDeleteSchemaWrapper
Unexecuted instantiation: nodesEqualFuncs.c:tDeleteSchemaWrapper
Unexecuted instantiation: nodesMatchFuncs.c:tDeleteSchemaWrapper
Unexecuted instantiation: nodesMsgFuncs.c:tDeleteSchemaWrapper
Unexecuted instantiation: nodesToSQLFuncs.c:tDeleteSchemaWrapper
Unexecuted instantiation: nodesTraverseFuncs.c:tDeleteSchemaWrapper
Unexecuted instantiation: nodesUtilFuncs.c:tDeleteSchemaWrapper
Unexecuted instantiation: queryUtil.c:tDeleteSchemaWrapper
Unexecuted instantiation: querymsg.c:tDeleteSchemaWrapper
Unexecuted instantiation: trans.c:tDeleteSchemaWrapper
Unexecuted instantiation: transCli.c:tDeleteSchemaWrapper
Unexecuted instantiation: transComm.c:tDeleteSchemaWrapper
Unexecuted instantiation: transSasl.c:tDeleteSchemaWrapper
Unexecuted instantiation: transSvr.c:tDeleteSchemaWrapper
Unexecuted instantiation: transTLS.c:tDeleteSchemaWrapper
Unexecuted instantiation: thttp.c:tDeleteSchemaWrapper
Unexecuted instantiation: geomFunc.c:tDeleteSchemaWrapper
Unexecuted instantiation: tconfig.c:tDeleteSchemaWrapper
Unexecuted instantiation: tdigest.c:tDeleteSchemaWrapper
Unexecuted instantiation: tlog.c:tDeleteSchemaWrapper
Unexecuted instantiation: tmempool.c:tDeleteSchemaWrapper
Unexecuted instantiation: mpDirect.c:tDeleteSchemaWrapper
Unexecuted instantiation: systable.c:tDeleteSchemaWrapper
Unexecuted instantiation: tdatablock.c:tDeleteSchemaWrapper
Unexecuted instantiation: tdataformat.c:tDeleteSchemaWrapper
Unexecuted instantiation: tglobal.c:tDeleteSchemaWrapper
Unexecuted instantiation: tmisce.c:tDeleteSchemaWrapper
Unexecuted instantiation: tname.c:tDeleteSchemaWrapper
Unexecuted instantiation: tpriv.c:tDeleteSchemaWrapper
Unexecuted instantiation: ttime.c:tDeleteSchemaWrapper
Unexecuted instantiation: tvariant.c:tDeleteSchemaWrapper
Unexecuted instantiation: streamMsg.c:tDeleteSchemaWrapper
Unexecuted instantiation: tmsg.c:tDeleteSchemaWrapper
Unexecuted instantiation: xnode.c:tDeleteSchemaWrapper
Unexecuted instantiation: tencrypt.c:tDeleteSchemaWrapper
Unexecuted instantiation: streamJson.c:tDeleteSchemaWrapper
1123
1124
0
static FORCE_INLINE void tDestroySchemaWrapper(SSchemaWrapper* pSchemaWrapper) {
1125
0
  if (pSchemaWrapper) {
1126
0
    taosMemoryFreeClear(pSchemaWrapper->pSchema);
1127
0
    if (pSchemaWrapper->pRsma) {
1128
0
      taosMemoryFreeClear(pSchemaWrapper->pRsma->funcIds);
1129
0
      taosMemoryFreeClear(pSchemaWrapper->pRsma);
1130
0
    }
1131
0
  }
1132
0
}
Unexecuted instantiation: sql-fuzzer.c:tDestroySchemaWrapper
Unexecuted instantiation: parser.c:tDestroySchemaWrapper
Unexecuted instantiation: parTranslater.c:tDestroySchemaWrapper
Unexecuted instantiation: parUtil.c:tDestroySchemaWrapper
Unexecuted instantiation: parAstParser.c:tDestroySchemaWrapper
Unexecuted instantiation: parAuthenticator.c:tDestroySchemaWrapper
Unexecuted instantiation: parCalcConst.c:tDestroySchemaWrapper
Unexecuted instantiation: parInsertSql.c:tDestroySchemaWrapper
Unexecuted instantiation: parInsertUtil.c:tDestroySchemaWrapper
Unexecuted instantiation: taos_lemon_sql.tab.c:tDestroySchemaWrapper
Unexecuted instantiation: parAstCreater.c:tDestroySchemaWrapper
Unexecuted instantiation: parInsertSml.c:tDestroySchemaWrapper
Unexecuted instantiation: planner.c:tDestroySchemaWrapper
Unexecuted instantiation: planLogicCreater.c:tDestroySchemaWrapper
Unexecuted instantiation: planOptimizer.c:tDestroySchemaWrapper
Unexecuted instantiation: planPhysiCreater.c:tDestroySchemaWrapper
Unexecuted instantiation: planScaleOut.c:tDestroySchemaWrapper
Unexecuted instantiation: planSpliter.c:tDestroySchemaWrapper
Unexecuted instantiation: planUtil.c:tDestroySchemaWrapper
Unexecuted instantiation: planValidator.c:tDestroySchemaWrapper
Unexecuted instantiation: catalog.c:tDestroySchemaWrapper
Unexecuted instantiation: ctgAsync.c:tDestroySchemaWrapper
Unexecuted instantiation: ctgCache.c:tDestroySchemaWrapper
Unexecuted instantiation: ctgDbg.c:tDestroySchemaWrapper
Unexecuted instantiation: ctgRemote.c:tDestroySchemaWrapper
Unexecuted instantiation: ctgRent.c:tDestroySchemaWrapper
Unexecuted instantiation: ctgUtil.c:tDestroySchemaWrapper
Unexecuted instantiation: functionMgt.c:tDestroySchemaWrapper
Unexecuted instantiation: tudf.c:tDestroySchemaWrapper
Unexecuted instantiation: builtins.c:tDestroySchemaWrapper
Unexecuted instantiation: builtinsimpl.c:tDestroySchemaWrapper
Unexecuted instantiation: thistogram.c:tDestroySchemaWrapper
Unexecuted instantiation: tpercentile.c:tDestroySchemaWrapper
Unexecuted instantiation: tavgfunction.c:tDestroySchemaWrapper
Unexecuted instantiation: tminmax.c:tDestroySchemaWrapper
Unexecuted instantiation: tminmaxavx.c:tDestroySchemaWrapper
Unexecuted instantiation: filter.c:tDestroySchemaWrapper
Unexecuted instantiation: scalar.c:tDestroySchemaWrapper
Unexecuted instantiation: sclfunc.c:tDestroySchemaWrapper
Unexecuted instantiation: sclvector.c:tDestroySchemaWrapper
Unexecuted instantiation: nodesCloneFuncs.c:tDestroySchemaWrapper
Unexecuted instantiation: nodesCodeFuncs.c:tDestroySchemaWrapper
Unexecuted instantiation: nodesEqualFuncs.c:tDestroySchemaWrapper
Unexecuted instantiation: nodesMatchFuncs.c:tDestroySchemaWrapper
Unexecuted instantiation: nodesMsgFuncs.c:tDestroySchemaWrapper
Unexecuted instantiation: nodesToSQLFuncs.c:tDestroySchemaWrapper
Unexecuted instantiation: nodesTraverseFuncs.c:tDestroySchemaWrapper
Unexecuted instantiation: nodesUtilFuncs.c:tDestroySchemaWrapper
Unexecuted instantiation: queryUtil.c:tDestroySchemaWrapper
Unexecuted instantiation: querymsg.c:tDestroySchemaWrapper
Unexecuted instantiation: trans.c:tDestroySchemaWrapper
Unexecuted instantiation: transCli.c:tDestroySchemaWrapper
Unexecuted instantiation: transComm.c:tDestroySchemaWrapper
Unexecuted instantiation: transSasl.c:tDestroySchemaWrapper
Unexecuted instantiation: transSvr.c:tDestroySchemaWrapper
Unexecuted instantiation: transTLS.c:tDestroySchemaWrapper
Unexecuted instantiation: thttp.c:tDestroySchemaWrapper
Unexecuted instantiation: geomFunc.c:tDestroySchemaWrapper
Unexecuted instantiation: tconfig.c:tDestroySchemaWrapper
Unexecuted instantiation: tdigest.c:tDestroySchemaWrapper
Unexecuted instantiation: tlog.c:tDestroySchemaWrapper
Unexecuted instantiation: tmempool.c:tDestroySchemaWrapper
Unexecuted instantiation: mpDirect.c:tDestroySchemaWrapper
Unexecuted instantiation: systable.c:tDestroySchemaWrapper
Unexecuted instantiation: tdatablock.c:tDestroySchemaWrapper
Unexecuted instantiation: tdataformat.c:tDestroySchemaWrapper
Unexecuted instantiation: tglobal.c:tDestroySchemaWrapper
Unexecuted instantiation: tmisce.c:tDestroySchemaWrapper
Unexecuted instantiation: tname.c:tDestroySchemaWrapper
Unexecuted instantiation: tpriv.c:tDestroySchemaWrapper
Unexecuted instantiation: ttime.c:tDestroySchemaWrapper
Unexecuted instantiation: tvariant.c:tDestroySchemaWrapper
Unexecuted instantiation: streamMsg.c:tDestroySchemaWrapper
Unexecuted instantiation: tmsg.c:tDestroySchemaWrapper
Unexecuted instantiation: xnode.c:tDestroySchemaWrapper
Unexecuted instantiation: tencrypt.c:tDestroySchemaWrapper
Unexecuted instantiation: streamJson.c:tDestroySchemaWrapper
1133
1134
0
static FORCE_INLINE void tDeleteSSchemaWrapperForHash(void* pSchemaWrapper) {
1135
0
  if (pSchemaWrapper != NULL && *(SSchemaWrapper**)pSchemaWrapper != NULL) {
1136
0
    tDeleteSchemaWrapper(*(SSchemaWrapper**)pSchemaWrapper);
1137
0
  }
1138
0
}
Unexecuted instantiation: sql-fuzzer.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: parser.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: parTranslater.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: parUtil.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: parAstParser.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: parAuthenticator.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: parCalcConst.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: parInsertSql.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: parInsertUtil.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: taos_lemon_sql.tab.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: parAstCreater.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: parInsertSml.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: planner.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: planLogicCreater.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: planOptimizer.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: planPhysiCreater.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: planScaleOut.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: planSpliter.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: planUtil.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: planValidator.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: catalog.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: ctgAsync.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: ctgCache.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: ctgDbg.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: ctgRemote.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: ctgRent.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: ctgUtil.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: functionMgt.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: tudf.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: builtins.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: builtinsimpl.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: thistogram.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: tpercentile.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: tavgfunction.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: tminmax.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: tminmaxavx.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: filter.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: scalar.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: sclfunc.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: sclvector.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: nodesCloneFuncs.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: nodesCodeFuncs.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: nodesEqualFuncs.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: nodesMatchFuncs.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: nodesMsgFuncs.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: nodesToSQLFuncs.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: nodesTraverseFuncs.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: nodesUtilFuncs.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: queryUtil.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: querymsg.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: trans.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: transCli.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: transComm.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: transSasl.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: transSvr.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: transTLS.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: thttp.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: geomFunc.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: tconfig.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: tdigest.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: tlog.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: tmempool.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: mpDirect.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: systable.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: tdatablock.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: tdataformat.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: tglobal.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: tmisce.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: tname.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: tpriv.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: ttime.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: tvariant.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: streamMsg.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: tmsg.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: xnode.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: tencrypt.c:tDeleteSSchemaWrapperForHash
Unexecuted instantiation: streamJson.c:tDeleteSSchemaWrapperForHash
1139
1140
0
static FORCE_INLINE int32_t taosEncodeSSchema(void** buf, const SSchema* pSchema) {
1141
0
  int32_t tlen = 0;
1142
0
  tlen += taosEncodeFixedI8(buf, pSchema->type);
1143
0
  tlen += taosEncodeFixedI8(buf, pSchema->flags);
1144
0
  tlen += taosEncodeFixedI32(buf, pSchema->bytes);
1145
0
  tlen += taosEncodeFixedI16(buf, pSchema->colId);
1146
0
  tlen += taosEncodeString(buf, pSchema->name);
1147
0
  return tlen;
1148
0
}
Unexecuted instantiation: sql-fuzzer.c:taosEncodeSSchema
Unexecuted instantiation: parser.c:taosEncodeSSchema
Unexecuted instantiation: parTranslater.c:taosEncodeSSchema
Unexecuted instantiation: parUtil.c:taosEncodeSSchema
Unexecuted instantiation: parAstParser.c:taosEncodeSSchema
Unexecuted instantiation: parAuthenticator.c:taosEncodeSSchema
Unexecuted instantiation: parCalcConst.c:taosEncodeSSchema
Unexecuted instantiation: parInsertSql.c:taosEncodeSSchema
Unexecuted instantiation: parInsertUtil.c:taosEncodeSSchema
Unexecuted instantiation: taos_lemon_sql.tab.c:taosEncodeSSchema
Unexecuted instantiation: parAstCreater.c:taosEncodeSSchema
Unexecuted instantiation: parInsertSml.c:taosEncodeSSchema
Unexecuted instantiation: planner.c:taosEncodeSSchema
Unexecuted instantiation: planLogicCreater.c:taosEncodeSSchema
Unexecuted instantiation: planOptimizer.c:taosEncodeSSchema
Unexecuted instantiation: planPhysiCreater.c:taosEncodeSSchema
Unexecuted instantiation: planScaleOut.c:taosEncodeSSchema
Unexecuted instantiation: planSpliter.c:taosEncodeSSchema
Unexecuted instantiation: planUtil.c:taosEncodeSSchema
Unexecuted instantiation: planValidator.c:taosEncodeSSchema
Unexecuted instantiation: catalog.c:taosEncodeSSchema
Unexecuted instantiation: ctgAsync.c:taosEncodeSSchema
Unexecuted instantiation: ctgCache.c:taosEncodeSSchema
Unexecuted instantiation: ctgDbg.c:taosEncodeSSchema
Unexecuted instantiation: ctgRemote.c:taosEncodeSSchema
Unexecuted instantiation: ctgRent.c:taosEncodeSSchema
Unexecuted instantiation: ctgUtil.c:taosEncodeSSchema
Unexecuted instantiation: functionMgt.c:taosEncodeSSchema
Unexecuted instantiation: tudf.c:taosEncodeSSchema
Unexecuted instantiation: builtins.c:taosEncodeSSchema
Unexecuted instantiation: builtinsimpl.c:taosEncodeSSchema
Unexecuted instantiation: thistogram.c:taosEncodeSSchema
Unexecuted instantiation: tpercentile.c:taosEncodeSSchema
Unexecuted instantiation: tavgfunction.c:taosEncodeSSchema
Unexecuted instantiation: tminmax.c:taosEncodeSSchema
Unexecuted instantiation: tminmaxavx.c:taosEncodeSSchema
Unexecuted instantiation: filter.c:taosEncodeSSchema
Unexecuted instantiation: scalar.c:taosEncodeSSchema
Unexecuted instantiation: sclfunc.c:taosEncodeSSchema
Unexecuted instantiation: sclvector.c:taosEncodeSSchema
Unexecuted instantiation: nodesCloneFuncs.c:taosEncodeSSchema
Unexecuted instantiation: nodesCodeFuncs.c:taosEncodeSSchema
Unexecuted instantiation: nodesEqualFuncs.c:taosEncodeSSchema
Unexecuted instantiation: nodesMatchFuncs.c:taosEncodeSSchema
Unexecuted instantiation: nodesMsgFuncs.c:taosEncodeSSchema
Unexecuted instantiation: nodesToSQLFuncs.c:taosEncodeSSchema
Unexecuted instantiation: nodesTraverseFuncs.c:taosEncodeSSchema
Unexecuted instantiation: nodesUtilFuncs.c:taosEncodeSSchema
Unexecuted instantiation: queryUtil.c:taosEncodeSSchema
Unexecuted instantiation: querymsg.c:taosEncodeSSchema
Unexecuted instantiation: trans.c:taosEncodeSSchema
Unexecuted instantiation: transCli.c:taosEncodeSSchema
Unexecuted instantiation: transComm.c:taosEncodeSSchema
Unexecuted instantiation: transSasl.c:taosEncodeSSchema
Unexecuted instantiation: transSvr.c:taosEncodeSSchema
Unexecuted instantiation: transTLS.c:taosEncodeSSchema
Unexecuted instantiation: thttp.c:taosEncodeSSchema
Unexecuted instantiation: geomFunc.c:taosEncodeSSchema
Unexecuted instantiation: tconfig.c:taosEncodeSSchema
Unexecuted instantiation: tdigest.c:taosEncodeSSchema
Unexecuted instantiation: tlog.c:taosEncodeSSchema
Unexecuted instantiation: tmempool.c:taosEncodeSSchema
Unexecuted instantiation: mpDirect.c:taosEncodeSSchema
Unexecuted instantiation: systable.c:taosEncodeSSchema
Unexecuted instantiation: tdatablock.c:taosEncodeSSchema
Unexecuted instantiation: tdataformat.c:taosEncodeSSchema
Unexecuted instantiation: tglobal.c:taosEncodeSSchema
Unexecuted instantiation: tmisce.c:taosEncodeSSchema
Unexecuted instantiation: tname.c:taosEncodeSSchema
Unexecuted instantiation: tpriv.c:taosEncodeSSchema
Unexecuted instantiation: ttime.c:taosEncodeSSchema
Unexecuted instantiation: tvariant.c:taosEncodeSSchema
Unexecuted instantiation: streamMsg.c:taosEncodeSSchema
Unexecuted instantiation: tmsg.c:taosEncodeSSchema
Unexecuted instantiation: xnode.c:taosEncodeSSchema
Unexecuted instantiation: tencrypt.c:taosEncodeSSchema
Unexecuted instantiation: streamJson.c:taosEncodeSSchema
1149
1150
0
static FORCE_INLINE void* taosDecodeSSchema(const void* buf, SSchema* pSchema) {
1151
0
  buf = taosDecodeFixedI8(buf, &pSchema->type);
1152
0
  buf = taosDecodeFixedI8(buf, &pSchema->flags);
1153
0
  buf = taosDecodeFixedI32(buf, &pSchema->bytes);
1154
0
  buf = taosDecodeFixedI16(buf, &pSchema->colId);
1155
0
  buf = taosDecodeStringTo(buf, pSchema->name);
1156
0
  return (void*)buf;
1157
0
}
Unexecuted instantiation: sql-fuzzer.c:taosDecodeSSchema
Unexecuted instantiation: parser.c:taosDecodeSSchema
Unexecuted instantiation: parTranslater.c:taosDecodeSSchema
Unexecuted instantiation: parUtil.c:taosDecodeSSchema
Unexecuted instantiation: parAstParser.c:taosDecodeSSchema
Unexecuted instantiation: parAuthenticator.c:taosDecodeSSchema
Unexecuted instantiation: parCalcConst.c:taosDecodeSSchema
Unexecuted instantiation: parInsertSql.c:taosDecodeSSchema
Unexecuted instantiation: parInsertUtil.c:taosDecodeSSchema
Unexecuted instantiation: taos_lemon_sql.tab.c:taosDecodeSSchema
Unexecuted instantiation: parAstCreater.c:taosDecodeSSchema
Unexecuted instantiation: parInsertSml.c:taosDecodeSSchema
Unexecuted instantiation: planner.c:taosDecodeSSchema
Unexecuted instantiation: planLogicCreater.c:taosDecodeSSchema
Unexecuted instantiation: planOptimizer.c:taosDecodeSSchema
Unexecuted instantiation: planPhysiCreater.c:taosDecodeSSchema
Unexecuted instantiation: planScaleOut.c:taosDecodeSSchema
Unexecuted instantiation: planSpliter.c:taosDecodeSSchema
Unexecuted instantiation: planUtil.c:taosDecodeSSchema
Unexecuted instantiation: planValidator.c:taosDecodeSSchema
Unexecuted instantiation: catalog.c:taosDecodeSSchema
Unexecuted instantiation: ctgAsync.c:taosDecodeSSchema
Unexecuted instantiation: ctgCache.c:taosDecodeSSchema
Unexecuted instantiation: ctgDbg.c:taosDecodeSSchema
Unexecuted instantiation: ctgRemote.c:taosDecodeSSchema
Unexecuted instantiation: ctgRent.c:taosDecodeSSchema
Unexecuted instantiation: ctgUtil.c:taosDecodeSSchema
Unexecuted instantiation: functionMgt.c:taosDecodeSSchema
Unexecuted instantiation: tudf.c:taosDecodeSSchema
Unexecuted instantiation: builtins.c:taosDecodeSSchema
Unexecuted instantiation: builtinsimpl.c:taosDecodeSSchema
Unexecuted instantiation: thistogram.c:taosDecodeSSchema
Unexecuted instantiation: tpercentile.c:taosDecodeSSchema
Unexecuted instantiation: tavgfunction.c:taosDecodeSSchema
Unexecuted instantiation: tminmax.c:taosDecodeSSchema
Unexecuted instantiation: tminmaxavx.c:taosDecodeSSchema
Unexecuted instantiation: filter.c:taosDecodeSSchema
Unexecuted instantiation: scalar.c:taosDecodeSSchema
Unexecuted instantiation: sclfunc.c:taosDecodeSSchema
Unexecuted instantiation: sclvector.c:taosDecodeSSchema
Unexecuted instantiation: nodesCloneFuncs.c:taosDecodeSSchema
Unexecuted instantiation: nodesCodeFuncs.c:taosDecodeSSchema
Unexecuted instantiation: nodesEqualFuncs.c:taosDecodeSSchema
Unexecuted instantiation: nodesMatchFuncs.c:taosDecodeSSchema
Unexecuted instantiation: nodesMsgFuncs.c:taosDecodeSSchema
Unexecuted instantiation: nodesToSQLFuncs.c:taosDecodeSSchema
Unexecuted instantiation: nodesTraverseFuncs.c:taosDecodeSSchema
Unexecuted instantiation: nodesUtilFuncs.c:taosDecodeSSchema
Unexecuted instantiation: queryUtil.c:taosDecodeSSchema
Unexecuted instantiation: querymsg.c:taosDecodeSSchema
Unexecuted instantiation: trans.c:taosDecodeSSchema
Unexecuted instantiation: transCli.c:taosDecodeSSchema
Unexecuted instantiation: transComm.c:taosDecodeSSchema
Unexecuted instantiation: transSasl.c:taosDecodeSSchema
Unexecuted instantiation: transSvr.c:taosDecodeSSchema
Unexecuted instantiation: transTLS.c:taosDecodeSSchema
Unexecuted instantiation: thttp.c:taosDecodeSSchema
Unexecuted instantiation: geomFunc.c:taosDecodeSSchema
Unexecuted instantiation: tconfig.c:taosDecodeSSchema
Unexecuted instantiation: tdigest.c:taosDecodeSSchema
Unexecuted instantiation: tlog.c:taosDecodeSSchema
Unexecuted instantiation: tmempool.c:taosDecodeSSchema
Unexecuted instantiation: mpDirect.c:taosDecodeSSchema
Unexecuted instantiation: systable.c:taosDecodeSSchema
Unexecuted instantiation: tdatablock.c:taosDecodeSSchema
Unexecuted instantiation: tdataformat.c:taosDecodeSSchema
Unexecuted instantiation: tglobal.c:taosDecodeSSchema
Unexecuted instantiation: tmisce.c:taosDecodeSSchema
Unexecuted instantiation: tname.c:taosDecodeSSchema
Unexecuted instantiation: tpriv.c:taosDecodeSSchema
Unexecuted instantiation: ttime.c:taosDecodeSSchema
Unexecuted instantiation: tvariant.c:taosDecodeSSchema
Unexecuted instantiation: streamMsg.c:taosDecodeSSchema
Unexecuted instantiation: tmsg.c:taosDecodeSSchema
Unexecuted instantiation: xnode.c:taosDecodeSSchema
Unexecuted instantiation: tencrypt.c:taosDecodeSSchema
Unexecuted instantiation: streamJson.c:taosDecodeSSchema
1158
1159
0
static FORCE_INLINE int32_t tEncodeSSchema(SEncoder* pEncoder, const SSchema* pSchema) {
1160
0
  TAOS_CHECK_RETURN(tEncodeI8(pEncoder, pSchema->type));
1161
0
  TAOS_CHECK_RETURN(tEncodeI8(pEncoder, pSchema->flags));
1162
0
  TAOS_CHECK_RETURN(tEncodeI32v(pEncoder, pSchema->bytes));
1163
0
  TAOS_CHECK_RETURN(tEncodeI16v(pEncoder, pSchema->colId));
1164
0
  TAOS_CHECK_RETURN(tEncodeCStr(pEncoder, pSchema->name));
1165
0
  return 0;
1166
0
}
Unexecuted instantiation: sql-fuzzer.c:tEncodeSSchema
Unexecuted instantiation: parser.c:tEncodeSSchema
Unexecuted instantiation: parTranslater.c:tEncodeSSchema
Unexecuted instantiation: parUtil.c:tEncodeSSchema
Unexecuted instantiation: parAstParser.c:tEncodeSSchema
Unexecuted instantiation: parAuthenticator.c:tEncodeSSchema
Unexecuted instantiation: parCalcConst.c:tEncodeSSchema
Unexecuted instantiation: parInsertSql.c:tEncodeSSchema
Unexecuted instantiation: parInsertUtil.c:tEncodeSSchema
Unexecuted instantiation: taos_lemon_sql.tab.c:tEncodeSSchema
Unexecuted instantiation: parAstCreater.c:tEncodeSSchema
Unexecuted instantiation: parInsertSml.c:tEncodeSSchema
Unexecuted instantiation: planner.c:tEncodeSSchema
Unexecuted instantiation: planLogicCreater.c:tEncodeSSchema
Unexecuted instantiation: planOptimizer.c:tEncodeSSchema
Unexecuted instantiation: planPhysiCreater.c:tEncodeSSchema
Unexecuted instantiation: planScaleOut.c:tEncodeSSchema
Unexecuted instantiation: planSpliter.c:tEncodeSSchema
Unexecuted instantiation: planUtil.c:tEncodeSSchema
Unexecuted instantiation: planValidator.c:tEncodeSSchema
Unexecuted instantiation: catalog.c:tEncodeSSchema
Unexecuted instantiation: ctgAsync.c:tEncodeSSchema
Unexecuted instantiation: ctgCache.c:tEncodeSSchema
Unexecuted instantiation: ctgDbg.c:tEncodeSSchema
Unexecuted instantiation: ctgRemote.c:tEncodeSSchema
Unexecuted instantiation: ctgRent.c:tEncodeSSchema
Unexecuted instantiation: ctgUtil.c:tEncodeSSchema
Unexecuted instantiation: functionMgt.c:tEncodeSSchema
Unexecuted instantiation: tudf.c:tEncodeSSchema
Unexecuted instantiation: builtins.c:tEncodeSSchema
Unexecuted instantiation: builtinsimpl.c:tEncodeSSchema
Unexecuted instantiation: thistogram.c:tEncodeSSchema
Unexecuted instantiation: tpercentile.c:tEncodeSSchema
Unexecuted instantiation: tavgfunction.c:tEncodeSSchema
Unexecuted instantiation: tminmax.c:tEncodeSSchema
Unexecuted instantiation: tminmaxavx.c:tEncodeSSchema
Unexecuted instantiation: filter.c:tEncodeSSchema
Unexecuted instantiation: scalar.c:tEncodeSSchema
Unexecuted instantiation: sclfunc.c:tEncodeSSchema
Unexecuted instantiation: sclvector.c:tEncodeSSchema
Unexecuted instantiation: nodesCloneFuncs.c:tEncodeSSchema
Unexecuted instantiation: nodesCodeFuncs.c:tEncodeSSchema
Unexecuted instantiation: nodesEqualFuncs.c:tEncodeSSchema
Unexecuted instantiation: nodesMatchFuncs.c:tEncodeSSchema
Unexecuted instantiation: nodesMsgFuncs.c:tEncodeSSchema
Unexecuted instantiation: nodesToSQLFuncs.c:tEncodeSSchema
Unexecuted instantiation: nodesTraverseFuncs.c:tEncodeSSchema
Unexecuted instantiation: nodesUtilFuncs.c:tEncodeSSchema
Unexecuted instantiation: queryUtil.c:tEncodeSSchema
Unexecuted instantiation: querymsg.c:tEncodeSSchema
Unexecuted instantiation: trans.c:tEncodeSSchema
Unexecuted instantiation: transCli.c:tEncodeSSchema
Unexecuted instantiation: transComm.c:tEncodeSSchema
Unexecuted instantiation: transSasl.c:tEncodeSSchema
Unexecuted instantiation: transSvr.c:tEncodeSSchema
Unexecuted instantiation: transTLS.c:tEncodeSSchema
Unexecuted instantiation: thttp.c:tEncodeSSchema
Unexecuted instantiation: geomFunc.c:tEncodeSSchema
Unexecuted instantiation: tconfig.c:tEncodeSSchema
Unexecuted instantiation: tdigest.c:tEncodeSSchema
Unexecuted instantiation: tlog.c:tEncodeSSchema
Unexecuted instantiation: tmempool.c:tEncodeSSchema
Unexecuted instantiation: mpDirect.c:tEncodeSSchema
Unexecuted instantiation: systable.c:tEncodeSSchema
Unexecuted instantiation: tdatablock.c:tEncodeSSchema
Unexecuted instantiation: tdataformat.c:tEncodeSSchema
Unexecuted instantiation: tglobal.c:tEncodeSSchema
Unexecuted instantiation: tmisce.c:tEncodeSSchema
Unexecuted instantiation: tname.c:tEncodeSSchema
Unexecuted instantiation: tpriv.c:tEncodeSSchema
Unexecuted instantiation: ttime.c:tEncodeSSchema
Unexecuted instantiation: tvariant.c:tEncodeSSchema
Unexecuted instantiation: streamMsg.c:tEncodeSSchema
Unexecuted instantiation: tmsg.c:tEncodeSSchema
Unexecuted instantiation: xnode.c:tEncodeSSchema
Unexecuted instantiation: tencrypt.c:tEncodeSSchema
Unexecuted instantiation: streamJson.c:tEncodeSSchema
1167
1168
0
static FORCE_INLINE int32_t tDecodeSSchema(SDecoder* pDecoder, SSchema* pSchema) {
1169
0
  TAOS_CHECK_RETURN(tDecodeI8(pDecoder, &pSchema->type));
1170
0
  TAOS_CHECK_RETURN(tDecodeI8(pDecoder, &pSchema->flags));
1171
0
  TAOS_CHECK_RETURN(tDecodeI32v(pDecoder, &pSchema->bytes));
1172
0
  TAOS_CHECK_RETURN(tDecodeI16v(pDecoder, &pSchema->colId));
1173
0
  TAOS_CHECK_RETURN(tDecodeCStrTo(pDecoder, pSchema->name));
1174
0
  return 0;
1175
0
}
Unexecuted instantiation: sql-fuzzer.c:tDecodeSSchema
Unexecuted instantiation: parser.c:tDecodeSSchema
Unexecuted instantiation: parTranslater.c:tDecodeSSchema
Unexecuted instantiation: parUtil.c:tDecodeSSchema
Unexecuted instantiation: parAstParser.c:tDecodeSSchema
Unexecuted instantiation: parAuthenticator.c:tDecodeSSchema
Unexecuted instantiation: parCalcConst.c:tDecodeSSchema
Unexecuted instantiation: parInsertSql.c:tDecodeSSchema
Unexecuted instantiation: parInsertUtil.c:tDecodeSSchema
Unexecuted instantiation: taos_lemon_sql.tab.c:tDecodeSSchema
Unexecuted instantiation: parAstCreater.c:tDecodeSSchema
Unexecuted instantiation: parInsertSml.c:tDecodeSSchema
Unexecuted instantiation: planner.c:tDecodeSSchema
Unexecuted instantiation: planLogicCreater.c:tDecodeSSchema
Unexecuted instantiation: planOptimizer.c:tDecodeSSchema
Unexecuted instantiation: planPhysiCreater.c:tDecodeSSchema
Unexecuted instantiation: planScaleOut.c:tDecodeSSchema
Unexecuted instantiation: planSpliter.c:tDecodeSSchema
Unexecuted instantiation: planUtil.c:tDecodeSSchema
Unexecuted instantiation: planValidator.c:tDecodeSSchema
Unexecuted instantiation: catalog.c:tDecodeSSchema
Unexecuted instantiation: ctgAsync.c:tDecodeSSchema
Unexecuted instantiation: ctgCache.c:tDecodeSSchema
Unexecuted instantiation: ctgDbg.c:tDecodeSSchema
Unexecuted instantiation: ctgRemote.c:tDecodeSSchema
Unexecuted instantiation: ctgRent.c:tDecodeSSchema
Unexecuted instantiation: ctgUtil.c:tDecodeSSchema
Unexecuted instantiation: functionMgt.c:tDecodeSSchema
Unexecuted instantiation: tudf.c:tDecodeSSchema
Unexecuted instantiation: builtins.c:tDecodeSSchema
Unexecuted instantiation: builtinsimpl.c:tDecodeSSchema
Unexecuted instantiation: thistogram.c:tDecodeSSchema
Unexecuted instantiation: tpercentile.c:tDecodeSSchema
Unexecuted instantiation: tavgfunction.c:tDecodeSSchema
Unexecuted instantiation: tminmax.c:tDecodeSSchema
Unexecuted instantiation: tminmaxavx.c:tDecodeSSchema
Unexecuted instantiation: filter.c:tDecodeSSchema
Unexecuted instantiation: scalar.c:tDecodeSSchema
Unexecuted instantiation: sclfunc.c:tDecodeSSchema
Unexecuted instantiation: sclvector.c:tDecodeSSchema
Unexecuted instantiation: nodesCloneFuncs.c:tDecodeSSchema
Unexecuted instantiation: nodesCodeFuncs.c:tDecodeSSchema
Unexecuted instantiation: nodesEqualFuncs.c:tDecodeSSchema
Unexecuted instantiation: nodesMatchFuncs.c:tDecodeSSchema
Unexecuted instantiation: nodesMsgFuncs.c:tDecodeSSchema
Unexecuted instantiation: nodesToSQLFuncs.c:tDecodeSSchema
Unexecuted instantiation: nodesTraverseFuncs.c:tDecodeSSchema
Unexecuted instantiation: nodesUtilFuncs.c:tDecodeSSchema
Unexecuted instantiation: queryUtil.c:tDecodeSSchema
Unexecuted instantiation: querymsg.c:tDecodeSSchema
Unexecuted instantiation: trans.c:tDecodeSSchema
Unexecuted instantiation: transCli.c:tDecodeSSchema
Unexecuted instantiation: transComm.c:tDecodeSSchema
Unexecuted instantiation: transSasl.c:tDecodeSSchema
Unexecuted instantiation: transSvr.c:tDecodeSSchema
Unexecuted instantiation: transTLS.c:tDecodeSSchema
Unexecuted instantiation: thttp.c:tDecodeSSchema
Unexecuted instantiation: geomFunc.c:tDecodeSSchema
Unexecuted instantiation: tconfig.c:tDecodeSSchema
Unexecuted instantiation: tdigest.c:tDecodeSSchema
Unexecuted instantiation: tlog.c:tDecodeSSchema
Unexecuted instantiation: tmempool.c:tDecodeSSchema
Unexecuted instantiation: mpDirect.c:tDecodeSSchema
Unexecuted instantiation: systable.c:tDecodeSSchema
Unexecuted instantiation: tdatablock.c:tDecodeSSchema
Unexecuted instantiation: tdataformat.c:tDecodeSSchema
Unexecuted instantiation: tglobal.c:tDecodeSSchema
Unexecuted instantiation: tmisce.c:tDecodeSSchema
Unexecuted instantiation: tname.c:tDecodeSSchema
Unexecuted instantiation: tpriv.c:tDecodeSSchema
Unexecuted instantiation: ttime.c:tDecodeSSchema
Unexecuted instantiation: tvariant.c:tDecodeSSchema
Unexecuted instantiation: streamMsg.c:tDecodeSSchema
Unexecuted instantiation: tmsg.c:tDecodeSSchema
Unexecuted instantiation: xnode.c:tDecodeSSchema
Unexecuted instantiation: tencrypt.c:tDecodeSSchema
Unexecuted instantiation: streamJson.c:tDecodeSSchema
1176
1177
0
static FORCE_INLINE int32_t tEncodeSSchemaExt(SEncoder* pEncoder, const SSchemaExt* pSchemaExt) {
1178
0
  TAOS_CHECK_RETURN(tEncodeI16v(pEncoder, pSchemaExt->colId));
1179
0
  TAOS_CHECK_RETURN(tEncodeU32(pEncoder, pSchemaExt->compress));
1180
0
  TAOS_CHECK_RETURN(tEncodeI32(pEncoder, pSchemaExt->typeMod));
1181
0
  return 0;
1182
0
}
Unexecuted instantiation: sql-fuzzer.c:tEncodeSSchemaExt
Unexecuted instantiation: parser.c:tEncodeSSchemaExt
Unexecuted instantiation: parTranslater.c:tEncodeSSchemaExt
Unexecuted instantiation: parUtil.c:tEncodeSSchemaExt
Unexecuted instantiation: parAstParser.c:tEncodeSSchemaExt
Unexecuted instantiation: parAuthenticator.c:tEncodeSSchemaExt
Unexecuted instantiation: parCalcConst.c:tEncodeSSchemaExt
Unexecuted instantiation: parInsertSql.c:tEncodeSSchemaExt
Unexecuted instantiation: parInsertUtil.c:tEncodeSSchemaExt
Unexecuted instantiation: taos_lemon_sql.tab.c:tEncodeSSchemaExt
Unexecuted instantiation: parAstCreater.c:tEncodeSSchemaExt
Unexecuted instantiation: parInsertSml.c:tEncodeSSchemaExt
Unexecuted instantiation: planner.c:tEncodeSSchemaExt
Unexecuted instantiation: planLogicCreater.c:tEncodeSSchemaExt
Unexecuted instantiation: planOptimizer.c:tEncodeSSchemaExt
Unexecuted instantiation: planPhysiCreater.c:tEncodeSSchemaExt
Unexecuted instantiation: planScaleOut.c:tEncodeSSchemaExt
Unexecuted instantiation: planSpliter.c:tEncodeSSchemaExt
Unexecuted instantiation: planUtil.c:tEncodeSSchemaExt
Unexecuted instantiation: planValidator.c:tEncodeSSchemaExt
Unexecuted instantiation: catalog.c:tEncodeSSchemaExt
Unexecuted instantiation: ctgAsync.c:tEncodeSSchemaExt
Unexecuted instantiation: ctgCache.c:tEncodeSSchemaExt
Unexecuted instantiation: ctgDbg.c:tEncodeSSchemaExt
Unexecuted instantiation: ctgRemote.c:tEncodeSSchemaExt
Unexecuted instantiation: ctgRent.c:tEncodeSSchemaExt
Unexecuted instantiation: ctgUtil.c:tEncodeSSchemaExt
Unexecuted instantiation: functionMgt.c:tEncodeSSchemaExt
Unexecuted instantiation: tudf.c:tEncodeSSchemaExt
Unexecuted instantiation: builtins.c:tEncodeSSchemaExt
Unexecuted instantiation: builtinsimpl.c:tEncodeSSchemaExt
Unexecuted instantiation: thistogram.c:tEncodeSSchemaExt
Unexecuted instantiation: tpercentile.c:tEncodeSSchemaExt
Unexecuted instantiation: tavgfunction.c:tEncodeSSchemaExt
Unexecuted instantiation: tminmax.c:tEncodeSSchemaExt
Unexecuted instantiation: tminmaxavx.c:tEncodeSSchemaExt
Unexecuted instantiation: filter.c:tEncodeSSchemaExt
Unexecuted instantiation: scalar.c:tEncodeSSchemaExt
Unexecuted instantiation: sclfunc.c:tEncodeSSchemaExt
Unexecuted instantiation: sclvector.c:tEncodeSSchemaExt
Unexecuted instantiation: nodesCloneFuncs.c:tEncodeSSchemaExt
Unexecuted instantiation: nodesCodeFuncs.c:tEncodeSSchemaExt
Unexecuted instantiation: nodesEqualFuncs.c:tEncodeSSchemaExt
Unexecuted instantiation: nodesMatchFuncs.c:tEncodeSSchemaExt
Unexecuted instantiation: nodesMsgFuncs.c:tEncodeSSchemaExt
Unexecuted instantiation: nodesToSQLFuncs.c:tEncodeSSchemaExt
Unexecuted instantiation: nodesTraverseFuncs.c:tEncodeSSchemaExt
Unexecuted instantiation: nodesUtilFuncs.c:tEncodeSSchemaExt
Unexecuted instantiation: queryUtil.c:tEncodeSSchemaExt
Unexecuted instantiation: querymsg.c:tEncodeSSchemaExt
Unexecuted instantiation: trans.c:tEncodeSSchemaExt
Unexecuted instantiation: transCli.c:tEncodeSSchemaExt
Unexecuted instantiation: transComm.c:tEncodeSSchemaExt
Unexecuted instantiation: transSasl.c:tEncodeSSchemaExt
Unexecuted instantiation: transSvr.c:tEncodeSSchemaExt
Unexecuted instantiation: transTLS.c:tEncodeSSchemaExt
Unexecuted instantiation: thttp.c:tEncodeSSchemaExt
Unexecuted instantiation: geomFunc.c:tEncodeSSchemaExt
Unexecuted instantiation: tconfig.c:tEncodeSSchemaExt
Unexecuted instantiation: tdigest.c:tEncodeSSchemaExt
Unexecuted instantiation: tlog.c:tEncodeSSchemaExt
Unexecuted instantiation: tmempool.c:tEncodeSSchemaExt
Unexecuted instantiation: mpDirect.c:tEncodeSSchemaExt
Unexecuted instantiation: systable.c:tEncodeSSchemaExt
Unexecuted instantiation: tdatablock.c:tEncodeSSchemaExt
Unexecuted instantiation: tdataformat.c:tEncodeSSchemaExt
Unexecuted instantiation: tglobal.c:tEncodeSSchemaExt
Unexecuted instantiation: tmisce.c:tEncodeSSchemaExt
Unexecuted instantiation: tname.c:tEncodeSSchemaExt
Unexecuted instantiation: tpriv.c:tEncodeSSchemaExt
Unexecuted instantiation: ttime.c:tEncodeSSchemaExt
Unexecuted instantiation: tvariant.c:tEncodeSSchemaExt
Unexecuted instantiation: streamMsg.c:tEncodeSSchemaExt
Unexecuted instantiation: tmsg.c:tEncodeSSchemaExt
Unexecuted instantiation: xnode.c:tEncodeSSchemaExt
Unexecuted instantiation: tencrypt.c:tEncodeSSchemaExt
Unexecuted instantiation: streamJson.c:tEncodeSSchemaExt
1183
1184
0
static FORCE_INLINE int32_t tDecodeSSchemaExt(SDecoder* pDecoder, SSchemaExt* pSchemaExt) {
1185
0
  TAOS_CHECK_RETURN(tDecodeI16v(pDecoder, &pSchemaExt->colId));
1186
0
  TAOS_CHECK_RETURN(tDecodeU32(pDecoder, &pSchemaExt->compress));
1187
0
  TAOS_CHECK_RETURN(tDecodeI32(pDecoder, &pSchemaExt->typeMod));
1188
0
  return 0;
1189
0
}
Unexecuted instantiation: sql-fuzzer.c:tDecodeSSchemaExt
Unexecuted instantiation: parser.c:tDecodeSSchemaExt
Unexecuted instantiation: parTranslater.c:tDecodeSSchemaExt
Unexecuted instantiation: parUtil.c:tDecodeSSchemaExt
Unexecuted instantiation: parAstParser.c:tDecodeSSchemaExt
Unexecuted instantiation: parAuthenticator.c:tDecodeSSchemaExt
Unexecuted instantiation: parCalcConst.c:tDecodeSSchemaExt
Unexecuted instantiation: parInsertSql.c:tDecodeSSchemaExt
Unexecuted instantiation: parInsertUtil.c:tDecodeSSchemaExt
Unexecuted instantiation: taos_lemon_sql.tab.c:tDecodeSSchemaExt
Unexecuted instantiation: parAstCreater.c:tDecodeSSchemaExt
Unexecuted instantiation: parInsertSml.c:tDecodeSSchemaExt
Unexecuted instantiation: planner.c:tDecodeSSchemaExt
Unexecuted instantiation: planLogicCreater.c:tDecodeSSchemaExt
Unexecuted instantiation: planOptimizer.c:tDecodeSSchemaExt
Unexecuted instantiation: planPhysiCreater.c:tDecodeSSchemaExt
Unexecuted instantiation: planScaleOut.c:tDecodeSSchemaExt
Unexecuted instantiation: planSpliter.c:tDecodeSSchemaExt
Unexecuted instantiation: planUtil.c:tDecodeSSchemaExt
Unexecuted instantiation: planValidator.c:tDecodeSSchemaExt
Unexecuted instantiation: catalog.c:tDecodeSSchemaExt
Unexecuted instantiation: ctgAsync.c:tDecodeSSchemaExt
Unexecuted instantiation: ctgCache.c:tDecodeSSchemaExt
Unexecuted instantiation: ctgDbg.c:tDecodeSSchemaExt
Unexecuted instantiation: ctgRemote.c:tDecodeSSchemaExt
Unexecuted instantiation: ctgRent.c:tDecodeSSchemaExt
Unexecuted instantiation: ctgUtil.c:tDecodeSSchemaExt
Unexecuted instantiation: functionMgt.c:tDecodeSSchemaExt
Unexecuted instantiation: tudf.c:tDecodeSSchemaExt
Unexecuted instantiation: builtins.c:tDecodeSSchemaExt
Unexecuted instantiation: builtinsimpl.c:tDecodeSSchemaExt
Unexecuted instantiation: thistogram.c:tDecodeSSchemaExt
Unexecuted instantiation: tpercentile.c:tDecodeSSchemaExt
Unexecuted instantiation: tavgfunction.c:tDecodeSSchemaExt
Unexecuted instantiation: tminmax.c:tDecodeSSchemaExt
Unexecuted instantiation: tminmaxavx.c:tDecodeSSchemaExt
Unexecuted instantiation: filter.c:tDecodeSSchemaExt
Unexecuted instantiation: scalar.c:tDecodeSSchemaExt
Unexecuted instantiation: sclfunc.c:tDecodeSSchemaExt
Unexecuted instantiation: sclvector.c:tDecodeSSchemaExt
Unexecuted instantiation: nodesCloneFuncs.c:tDecodeSSchemaExt
Unexecuted instantiation: nodesCodeFuncs.c:tDecodeSSchemaExt
Unexecuted instantiation: nodesEqualFuncs.c:tDecodeSSchemaExt
Unexecuted instantiation: nodesMatchFuncs.c:tDecodeSSchemaExt
Unexecuted instantiation: nodesMsgFuncs.c:tDecodeSSchemaExt
Unexecuted instantiation: nodesToSQLFuncs.c:tDecodeSSchemaExt
Unexecuted instantiation: nodesTraverseFuncs.c:tDecodeSSchemaExt
Unexecuted instantiation: nodesUtilFuncs.c:tDecodeSSchemaExt
Unexecuted instantiation: queryUtil.c:tDecodeSSchemaExt
Unexecuted instantiation: querymsg.c:tDecodeSSchemaExt
Unexecuted instantiation: trans.c:tDecodeSSchemaExt
Unexecuted instantiation: transCli.c:tDecodeSSchemaExt
Unexecuted instantiation: transComm.c:tDecodeSSchemaExt
Unexecuted instantiation: transSasl.c:tDecodeSSchemaExt
Unexecuted instantiation: transSvr.c:tDecodeSSchemaExt
Unexecuted instantiation: transTLS.c:tDecodeSSchemaExt
Unexecuted instantiation: thttp.c:tDecodeSSchemaExt
Unexecuted instantiation: geomFunc.c:tDecodeSSchemaExt
Unexecuted instantiation: tconfig.c:tDecodeSSchemaExt
Unexecuted instantiation: tdigest.c:tDecodeSSchemaExt
Unexecuted instantiation: tlog.c:tDecodeSSchemaExt
Unexecuted instantiation: tmempool.c:tDecodeSSchemaExt
Unexecuted instantiation: mpDirect.c:tDecodeSSchemaExt
Unexecuted instantiation: systable.c:tDecodeSSchemaExt
Unexecuted instantiation: tdatablock.c:tDecodeSSchemaExt
Unexecuted instantiation: tdataformat.c:tDecodeSSchemaExt
Unexecuted instantiation: tglobal.c:tDecodeSSchemaExt
Unexecuted instantiation: tmisce.c:tDecodeSSchemaExt
Unexecuted instantiation: tname.c:tDecodeSSchemaExt
Unexecuted instantiation: tpriv.c:tDecodeSSchemaExt
Unexecuted instantiation: ttime.c:tDecodeSSchemaExt
Unexecuted instantiation: tvariant.c:tDecodeSSchemaExt
Unexecuted instantiation: streamMsg.c:tDecodeSSchemaExt
Unexecuted instantiation: tmsg.c:tDecodeSSchemaExt
Unexecuted instantiation: xnode.c:tDecodeSSchemaExt
Unexecuted instantiation: tencrypt.c:tDecodeSSchemaExt
Unexecuted instantiation: streamJson.c:tDecodeSSchemaExt
1190
1191
0
static FORCE_INLINE int32_t tEncodeSColRef(SEncoder* pEncoder, const SColRef* pColRef) {
1192
0
  TAOS_CHECK_RETURN(tEncodeI8(pEncoder, pColRef->hasRef));
1193
0
  TAOS_CHECK_RETURN(tEncodeI16(pEncoder, pColRef->id));
1194
0
  if (pColRef->hasRef) {
1195
0
    TAOS_CHECK_RETURN(tEncodeCStr(pEncoder, pColRef->refDbName));
1196
0
    TAOS_CHECK_RETURN(tEncodeCStr(pEncoder, pColRef->refTableName));
1197
0
    TAOS_CHECK_RETURN(tEncodeCStr(pEncoder, pColRef->refColName));
1198
0
  }
1199
0
  return 0;
1200
0
}
Unexecuted instantiation: sql-fuzzer.c:tEncodeSColRef
Unexecuted instantiation: parser.c:tEncodeSColRef
Unexecuted instantiation: parTranslater.c:tEncodeSColRef
Unexecuted instantiation: parUtil.c:tEncodeSColRef
Unexecuted instantiation: parAstParser.c:tEncodeSColRef
Unexecuted instantiation: parAuthenticator.c:tEncodeSColRef
Unexecuted instantiation: parCalcConst.c:tEncodeSColRef
Unexecuted instantiation: parInsertSql.c:tEncodeSColRef
Unexecuted instantiation: parInsertUtil.c:tEncodeSColRef
Unexecuted instantiation: taos_lemon_sql.tab.c:tEncodeSColRef
Unexecuted instantiation: parAstCreater.c:tEncodeSColRef
Unexecuted instantiation: parInsertSml.c:tEncodeSColRef
Unexecuted instantiation: planner.c:tEncodeSColRef
Unexecuted instantiation: planLogicCreater.c:tEncodeSColRef
Unexecuted instantiation: planOptimizer.c:tEncodeSColRef
Unexecuted instantiation: planPhysiCreater.c:tEncodeSColRef
Unexecuted instantiation: planScaleOut.c:tEncodeSColRef
Unexecuted instantiation: planSpliter.c:tEncodeSColRef
Unexecuted instantiation: planUtil.c:tEncodeSColRef
Unexecuted instantiation: planValidator.c:tEncodeSColRef
Unexecuted instantiation: catalog.c:tEncodeSColRef
Unexecuted instantiation: ctgAsync.c:tEncodeSColRef
Unexecuted instantiation: ctgCache.c:tEncodeSColRef
Unexecuted instantiation: ctgDbg.c:tEncodeSColRef
Unexecuted instantiation: ctgRemote.c:tEncodeSColRef
Unexecuted instantiation: ctgRent.c:tEncodeSColRef
Unexecuted instantiation: ctgUtil.c:tEncodeSColRef
Unexecuted instantiation: functionMgt.c:tEncodeSColRef
Unexecuted instantiation: tudf.c:tEncodeSColRef
Unexecuted instantiation: builtins.c:tEncodeSColRef
Unexecuted instantiation: builtinsimpl.c:tEncodeSColRef
Unexecuted instantiation: thistogram.c:tEncodeSColRef
Unexecuted instantiation: tpercentile.c:tEncodeSColRef
Unexecuted instantiation: tavgfunction.c:tEncodeSColRef
Unexecuted instantiation: tminmax.c:tEncodeSColRef
Unexecuted instantiation: tminmaxavx.c:tEncodeSColRef
Unexecuted instantiation: filter.c:tEncodeSColRef
Unexecuted instantiation: scalar.c:tEncodeSColRef
Unexecuted instantiation: sclfunc.c:tEncodeSColRef
Unexecuted instantiation: sclvector.c:tEncodeSColRef
Unexecuted instantiation: nodesCloneFuncs.c:tEncodeSColRef
Unexecuted instantiation: nodesCodeFuncs.c:tEncodeSColRef
Unexecuted instantiation: nodesEqualFuncs.c:tEncodeSColRef
Unexecuted instantiation: nodesMatchFuncs.c:tEncodeSColRef
Unexecuted instantiation: nodesMsgFuncs.c:tEncodeSColRef
Unexecuted instantiation: nodesToSQLFuncs.c:tEncodeSColRef
Unexecuted instantiation: nodesTraverseFuncs.c:tEncodeSColRef
Unexecuted instantiation: nodesUtilFuncs.c:tEncodeSColRef
Unexecuted instantiation: queryUtil.c:tEncodeSColRef
Unexecuted instantiation: querymsg.c:tEncodeSColRef
Unexecuted instantiation: trans.c:tEncodeSColRef
Unexecuted instantiation: transCli.c:tEncodeSColRef
Unexecuted instantiation: transComm.c:tEncodeSColRef
Unexecuted instantiation: transSasl.c:tEncodeSColRef
Unexecuted instantiation: transSvr.c:tEncodeSColRef
Unexecuted instantiation: transTLS.c:tEncodeSColRef
Unexecuted instantiation: thttp.c:tEncodeSColRef
Unexecuted instantiation: geomFunc.c:tEncodeSColRef
Unexecuted instantiation: tconfig.c:tEncodeSColRef
Unexecuted instantiation: tdigest.c:tEncodeSColRef
Unexecuted instantiation: tlog.c:tEncodeSColRef
Unexecuted instantiation: tmempool.c:tEncodeSColRef
Unexecuted instantiation: mpDirect.c:tEncodeSColRef
Unexecuted instantiation: systable.c:tEncodeSColRef
Unexecuted instantiation: tdatablock.c:tEncodeSColRef
Unexecuted instantiation: tdataformat.c:tEncodeSColRef
Unexecuted instantiation: tglobal.c:tEncodeSColRef
Unexecuted instantiation: tmisce.c:tEncodeSColRef
Unexecuted instantiation: tname.c:tEncodeSColRef
Unexecuted instantiation: tpriv.c:tEncodeSColRef
Unexecuted instantiation: ttime.c:tEncodeSColRef
Unexecuted instantiation: tvariant.c:tEncodeSColRef
Unexecuted instantiation: streamMsg.c:tEncodeSColRef
Unexecuted instantiation: tmsg.c:tEncodeSColRef
Unexecuted instantiation: xnode.c:tEncodeSColRef
Unexecuted instantiation: tencrypt.c:tEncodeSColRef
Unexecuted instantiation: streamJson.c:tEncodeSColRef
1201
1202
0
static FORCE_INLINE int32_t tDecodeSColRef(SDecoder* pDecoder, SColRef* pColRef) {
1203
0
  TAOS_CHECK_RETURN(tDecodeI8(pDecoder, (int8_t*)&pColRef->hasRef));
1204
0
  TAOS_CHECK_RETURN(tDecodeI16(pDecoder, &pColRef->id));
1205
0
  if (pColRef->hasRef) {
1206
0
    TAOS_CHECK_RETURN(tDecodeCStrTo(pDecoder, pColRef->refDbName));
1207
0
    TAOS_CHECK_RETURN(tDecodeCStrTo(pDecoder, pColRef->refTableName));
1208
0
    TAOS_CHECK_RETURN(tDecodeCStrTo(pDecoder, pColRef->refColName));
1209
0
  }
1210
1211
0
  return 0;
1212
0
}
Unexecuted instantiation: sql-fuzzer.c:tDecodeSColRef
Unexecuted instantiation: parser.c:tDecodeSColRef
Unexecuted instantiation: parTranslater.c:tDecodeSColRef
Unexecuted instantiation: parUtil.c:tDecodeSColRef
Unexecuted instantiation: parAstParser.c:tDecodeSColRef
Unexecuted instantiation: parAuthenticator.c:tDecodeSColRef
Unexecuted instantiation: parCalcConst.c:tDecodeSColRef
Unexecuted instantiation: parInsertSql.c:tDecodeSColRef
Unexecuted instantiation: parInsertUtil.c:tDecodeSColRef
Unexecuted instantiation: taos_lemon_sql.tab.c:tDecodeSColRef
Unexecuted instantiation: parAstCreater.c:tDecodeSColRef
Unexecuted instantiation: parInsertSml.c:tDecodeSColRef
Unexecuted instantiation: planner.c:tDecodeSColRef
Unexecuted instantiation: planLogicCreater.c:tDecodeSColRef
Unexecuted instantiation: planOptimizer.c:tDecodeSColRef
Unexecuted instantiation: planPhysiCreater.c:tDecodeSColRef
Unexecuted instantiation: planScaleOut.c:tDecodeSColRef
Unexecuted instantiation: planSpliter.c:tDecodeSColRef
Unexecuted instantiation: planUtil.c:tDecodeSColRef
Unexecuted instantiation: planValidator.c:tDecodeSColRef
Unexecuted instantiation: catalog.c:tDecodeSColRef
Unexecuted instantiation: ctgAsync.c:tDecodeSColRef
Unexecuted instantiation: ctgCache.c:tDecodeSColRef
Unexecuted instantiation: ctgDbg.c:tDecodeSColRef
Unexecuted instantiation: ctgRemote.c:tDecodeSColRef
Unexecuted instantiation: ctgRent.c:tDecodeSColRef
Unexecuted instantiation: ctgUtil.c:tDecodeSColRef
Unexecuted instantiation: functionMgt.c:tDecodeSColRef
Unexecuted instantiation: tudf.c:tDecodeSColRef
Unexecuted instantiation: builtins.c:tDecodeSColRef
Unexecuted instantiation: builtinsimpl.c:tDecodeSColRef
Unexecuted instantiation: thistogram.c:tDecodeSColRef
Unexecuted instantiation: tpercentile.c:tDecodeSColRef
Unexecuted instantiation: tavgfunction.c:tDecodeSColRef
Unexecuted instantiation: tminmax.c:tDecodeSColRef
Unexecuted instantiation: tminmaxavx.c:tDecodeSColRef
Unexecuted instantiation: filter.c:tDecodeSColRef
Unexecuted instantiation: scalar.c:tDecodeSColRef
Unexecuted instantiation: sclfunc.c:tDecodeSColRef
Unexecuted instantiation: sclvector.c:tDecodeSColRef
Unexecuted instantiation: nodesCloneFuncs.c:tDecodeSColRef
Unexecuted instantiation: nodesCodeFuncs.c:tDecodeSColRef
Unexecuted instantiation: nodesEqualFuncs.c:tDecodeSColRef
Unexecuted instantiation: nodesMatchFuncs.c:tDecodeSColRef
Unexecuted instantiation: nodesMsgFuncs.c:tDecodeSColRef
Unexecuted instantiation: nodesToSQLFuncs.c:tDecodeSColRef
Unexecuted instantiation: nodesTraverseFuncs.c:tDecodeSColRef
Unexecuted instantiation: nodesUtilFuncs.c:tDecodeSColRef
Unexecuted instantiation: queryUtil.c:tDecodeSColRef
Unexecuted instantiation: querymsg.c:tDecodeSColRef
Unexecuted instantiation: trans.c:tDecodeSColRef
Unexecuted instantiation: transCli.c:tDecodeSColRef
Unexecuted instantiation: transComm.c:tDecodeSColRef
Unexecuted instantiation: transSasl.c:tDecodeSColRef
Unexecuted instantiation: transSvr.c:tDecodeSColRef
Unexecuted instantiation: transTLS.c:tDecodeSColRef
Unexecuted instantiation: thttp.c:tDecodeSColRef
Unexecuted instantiation: geomFunc.c:tDecodeSColRef
Unexecuted instantiation: tconfig.c:tDecodeSColRef
Unexecuted instantiation: tdigest.c:tDecodeSColRef
Unexecuted instantiation: tlog.c:tDecodeSColRef
Unexecuted instantiation: tmempool.c:tDecodeSColRef
Unexecuted instantiation: mpDirect.c:tDecodeSColRef
Unexecuted instantiation: systable.c:tDecodeSColRef
Unexecuted instantiation: tdatablock.c:tDecodeSColRef
Unexecuted instantiation: tdataformat.c:tDecodeSColRef
Unexecuted instantiation: tglobal.c:tDecodeSColRef
Unexecuted instantiation: tmisce.c:tDecodeSColRef
Unexecuted instantiation: tname.c:tDecodeSColRef
Unexecuted instantiation: tpriv.c:tDecodeSColRef
Unexecuted instantiation: ttime.c:tDecodeSColRef
Unexecuted instantiation: tvariant.c:tDecodeSColRef
Unexecuted instantiation: streamMsg.c:tDecodeSColRef
Unexecuted instantiation: tmsg.c:tDecodeSColRef
Unexecuted instantiation: xnode.c:tDecodeSColRef
Unexecuted instantiation: tencrypt.c:tDecodeSColRef
Unexecuted instantiation: streamJson.c:tDecodeSColRef
1213
1214
0
static FORCE_INLINE int32_t taosEncodeSSchemaWrapper(void** buf, const SSchemaWrapper* pSW) {
1215
0
  int32_t tlen = 0;
1216
0
  tlen += taosEncodeVariantI32(buf, pSW->nCols);
1217
0
  tlen += taosEncodeVariantI32(buf, pSW->version);
1218
0
  for (int32_t i = 0; i < pSW->nCols; i++) {
1219
0
    tlen += taosEncodeSSchema(buf, &pSW->pSchema[i]);
1220
0
  }
1221
0
  return tlen;
1222
0
}
Unexecuted instantiation: sql-fuzzer.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: parser.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: parTranslater.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: parUtil.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: parAstParser.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: parAuthenticator.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: parCalcConst.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: parInsertSql.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: parInsertUtil.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: taos_lemon_sql.tab.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: parAstCreater.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: parInsertSml.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: planner.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: planLogicCreater.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: planOptimizer.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: planPhysiCreater.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: planScaleOut.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: planSpliter.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: planUtil.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: planValidator.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: catalog.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: ctgAsync.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: ctgCache.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: ctgDbg.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: ctgRemote.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: ctgRent.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: ctgUtil.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: functionMgt.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: tudf.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: builtins.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: builtinsimpl.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: thistogram.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: tpercentile.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: tavgfunction.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: tminmax.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: tminmaxavx.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: filter.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: scalar.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: sclfunc.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: sclvector.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: nodesCloneFuncs.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: nodesCodeFuncs.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: nodesEqualFuncs.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: nodesMatchFuncs.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: nodesMsgFuncs.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: nodesToSQLFuncs.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: nodesTraverseFuncs.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: nodesUtilFuncs.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: queryUtil.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: querymsg.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: trans.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: transCli.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: transComm.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: transSasl.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: transSvr.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: transTLS.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: thttp.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: geomFunc.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: tconfig.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: tdigest.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: tlog.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: tmempool.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: mpDirect.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: systable.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: tdatablock.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: tdataformat.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: tglobal.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: tmisce.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: tname.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: tpriv.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: ttime.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: tvariant.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: streamMsg.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: tmsg.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: xnode.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: tencrypt.c:taosEncodeSSchemaWrapper
Unexecuted instantiation: streamJson.c:taosEncodeSSchemaWrapper
1223
1224
0
static FORCE_INLINE void* taosDecodeSSchemaWrapper(const void* buf, SSchemaWrapper* pSW) {
1225
0
  buf = taosDecodeVariantI32(buf, &pSW->nCols);
1226
0
  buf = taosDecodeVariantI32(buf, &pSW->version);
1227
0
  if (pSW->nCols > 0) {
1228
0
    pSW->pSchema = (SSchema*)taosMemoryCalloc(pSW->nCols, sizeof(SSchema));
1229
0
    if (pSW->pSchema == NULL) {
1230
0
      return NULL;
1231
0
    }
1232
0
1233
0
    for (int32_t i = 0; i < pSW->nCols; i++) {
1234
0
      buf = taosDecodeSSchema(buf, &pSW->pSchema[i]);
1235
0
    }
1236
0
  } else {
1237
0
    pSW->pSchema = NULL;
1238
0
  }
1239
0
  return (void*)buf;
1240
0
}
Unexecuted instantiation: sql-fuzzer.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: parser.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: parTranslater.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: parUtil.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: parAstParser.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: parAuthenticator.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: parCalcConst.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: parInsertSql.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: parInsertUtil.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: taos_lemon_sql.tab.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: parAstCreater.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: parInsertSml.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: planner.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: planLogicCreater.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: planOptimizer.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: planPhysiCreater.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: planScaleOut.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: planSpliter.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: planUtil.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: planValidator.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: catalog.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: ctgAsync.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: ctgCache.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: ctgDbg.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: ctgRemote.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: ctgRent.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: ctgUtil.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: functionMgt.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: tudf.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: builtins.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: builtinsimpl.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: thistogram.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: tpercentile.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: tavgfunction.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: tminmax.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: tminmaxavx.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: filter.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: scalar.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: sclfunc.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: sclvector.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: nodesCloneFuncs.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: nodesCodeFuncs.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: nodesEqualFuncs.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: nodesMatchFuncs.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: nodesMsgFuncs.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: nodesToSQLFuncs.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: nodesTraverseFuncs.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: nodesUtilFuncs.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: queryUtil.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: querymsg.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: trans.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: transCli.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: transComm.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: transSasl.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: transSvr.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: transTLS.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: thttp.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: geomFunc.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: tconfig.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: tdigest.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: tlog.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: tmempool.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: mpDirect.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: systable.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: tdatablock.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: tdataformat.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: tglobal.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: tmisce.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: tname.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: tpriv.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: ttime.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: tvariant.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: streamMsg.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: tmsg.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: xnode.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: tencrypt.c:taosDecodeSSchemaWrapper
Unexecuted instantiation: streamJson.c:taosDecodeSSchemaWrapper
1241
1242
0
static FORCE_INLINE int32_t tEncodeSSchemaWrapper(SEncoder* pEncoder, const SSchemaWrapper* pSW) {
1243
0
  if (pSW == NULL) {
1244
0
    return TSDB_CODE_INVALID_PARA;
1245
0
  }
1246
0
  TAOS_CHECK_RETURN(tEncodeI32v(pEncoder, pSW->nCols));
1247
0
  TAOS_CHECK_RETURN(tEncodeI32v(pEncoder, pSW->version));
1248
0
  for (int32_t i = 0; i < pSW->nCols; i++) {
1249
0
    TAOS_CHECK_RETURN(tEncodeSSchema(pEncoder, &pSW->pSchema[i]));
1250
0
  }
1251
0
  return 0;
1252
0
}
Unexecuted instantiation: sql-fuzzer.c:tEncodeSSchemaWrapper
Unexecuted instantiation: parser.c:tEncodeSSchemaWrapper
Unexecuted instantiation: parTranslater.c:tEncodeSSchemaWrapper
Unexecuted instantiation: parUtil.c:tEncodeSSchemaWrapper
Unexecuted instantiation: parAstParser.c:tEncodeSSchemaWrapper
Unexecuted instantiation: parAuthenticator.c:tEncodeSSchemaWrapper
Unexecuted instantiation: parCalcConst.c:tEncodeSSchemaWrapper
Unexecuted instantiation: parInsertSql.c:tEncodeSSchemaWrapper
Unexecuted instantiation: parInsertUtil.c:tEncodeSSchemaWrapper
Unexecuted instantiation: taos_lemon_sql.tab.c:tEncodeSSchemaWrapper
Unexecuted instantiation: parAstCreater.c:tEncodeSSchemaWrapper
Unexecuted instantiation: parInsertSml.c:tEncodeSSchemaWrapper
Unexecuted instantiation: planner.c:tEncodeSSchemaWrapper
Unexecuted instantiation: planLogicCreater.c:tEncodeSSchemaWrapper
Unexecuted instantiation: planOptimizer.c:tEncodeSSchemaWrapper
Unexecuted instantiation: planPhysiCreater.c:tEncodeSSchemaWrapper
Unexecuted instantiation: planScaleOut.c:tEncodeSSchemaWrapper
Unexecuted instantiation: planSpliter.c:tEncodeSSchemaWrapper
Unexecuted instantiation: planUtil.c:tEncodeSSchemaWrapper
Unexecuted instantiation: planValidator.c:tEncodeSSchemaWrapper
Unexecuted instantiation: catalog.c:tEncodeSSchemaWrapper
Unexecuted instantiation: ctgAsync.c:tEncodeSSchemaWrapper
Unexecuted instantiation: ctgCache.c:tEncodeSSchemaWrapper
Unexecuted instantiation: ctgDbg.c:tEncodeSSchemaWrapper
Unexecuted instantiation: ctgRemote.c:tEncodeSSchemaWrapper
Unexecuted instantiation: ctgRent.c:tEncodeSSchemaWrapper
Unexecuted instantiation: ctgUtil.c:tEncodeSSchemaWrapper
Unexecuted instantiation: functionMgt.c:tEncodeSSchemaWrapper
Unexecuted instantiation: tudf.c:tEncodeSSchemaWrapper
Unexecuted instantiation: builtins.c:tEncodeSSchemaWrapper
Unexecuted instantiation: builtinsimpl.c:tEncodeSSchemaWrapper
Unexecuted instantiation: thistogram.c:tEncodeSSchemaWrapper
Unexecuted instantiation: tpercentile.c:tEncodeSSchemaWrapper
Unexecuted instantiation: tavgfunction.c:tEncodeSSchemaWrapper
Unexecuted instantiation: tminmax.c:tEncodeSSchemaWrapper
Unexecuted instantiation: tminmaxavx.c:tEncodeSSchemaWrapper
Unexecuted instantiation: filter.c:tEncodeSSchemaWrapper
Unexecuted instantiation: scalar.c:tEncodeSSchemaWrapper
Unexecuted instantiation: sclfunc.c:tEncodeSSchemaWrapper
Unexecuted instantiation: sclvector.c:tEncodeSSchemaWrapper
Unexecuted instantiation: nodesCloneFuncs.c:tEncodeSSchemaWrapper
Unexecuted instantiation: nodesCodeFuncs.c:tEncodeSSchemaWrapper
Unexecuted instantiation: nodesEqualFuncs.c:tEncodeSSchemaWrapper
Unexecuted instantiation: nodesMatchFuncs.c:tEncodeSSchemaWrapper
Unexecuted instantiation: nodesMsgFuncs.c:tEncodeSSchemaWrapper
Unexecuted instantiation: nodesToSQLFuncs.c:tEncodeSSchemaWrapper
Unexecuted instantiation: nodesTraverseFuncs.c:tEncodeSSchemaWrapper
Unexecuted instantiation: nodesUtilFuncs.c:tEncodeSSchemaWrapper
Unexecuted instantiation: queryUtil.c:tEncodeSSchemaWrapper
Unexecuted instantiation: querymsg.c:tEncodeSSchemaWrapper
Unexecuted instantiation: trans.c:tEncodeSSchemaWrapper
Unexecuted instantiation: transCli.c:tEncodeSSchemaWrapper
Unexecuted instantiation: transComm.c:tEncodeSSchemaWrapper
Unexecuted instantiation: transSasl.c:tEncodeSSchemaWrapper
Unexecuted instantiation: transSvr.c:tEncodeSSchemaWrapper
Unexecuted instantiation: transTLS.c:tEncodeSSchemaWrapper
Unexecuted instantiation: thttp.c:tEncodeSSchemaWrapper
Unexecuted instantiation: geomFunc.c:tEncodeSSchemaWrapper
Unexecuted instantiation: tconfig.c:tEncodeSSchemaWrapper
Unexecuted instantiation: tdigest.c:tEncodeSSchemaWrapper
Unexecuted instantiation: tlog.c:tEncodeSSchemaWrapper
Unexecuted instantiation: tmempool.c:tEncodeSSchemaWrapper
Unexecuted instantiation: mpDirect.c:tEncodeSSchemaWrapper
Unexecuted instantiation: systable.c:tEncodeSSchemaWrapper
Unexecuted instantiation: tdatablock.c:tEncodeSSchemaWrapper
Unexecuted instantiation: tdataformat.c:tEncodeSSchemaWrapper
Unexecuted instantiation: tglobal.c:tEncodeSSchemaWrapper
Unexecuted instantiation: tmisce.c:tEncodeSSchemaWrapper
Unexecuted instantiation: tname.c:tEncodeSSchemaWrapper
Unexecuted instantiation: tpriv.c:tEncodeSSchemaWrapper
Unexecuted instantiation: ttime.c:tEncodeSSchemaWrapper
Unexecuted instantiation: tvariant.c:tEncodeSSchemaWrapper
Unexecuted instantiation: streamMsg.c:tEncodeSSchemaWrapper
Unexecuted instantiation: tmsg.c:tEncodeSSchemaWrapper
Unexecuted instantiation: xnode.c:tEncodeSSchemaWrapper
Unexecuted instantiation: tencrypt.c:tEncodeSSchemaWrapper
Unexecuted instantiation: streamJson.c:tEncodeSSchemaWrapper
1253
1254
0
static FORCE_INLINE int32_t tDecodeSSchemaWrapper(SDecoder* pDecoder, SSchemaWrapper* pSW) {
1255
0
  if (pSW == NULL) {
1256
0
    return TSDB_CODE_INVALID_PARA;
1257
0
  }
1258
0
  TAOS_CHECK_RETURN(tDecodeI32v(pDecoder, &pSW->nCols));
1259
0
  TAOS_CHECK_RETURN(tDecodeI32v(pDecoder, &pSW->version));
1260
1261
0
  pSW->pSchema = (SSchema*)taosMemoryCalloc(pSW->nCols, sizeof(SSchema));
1262
0
  if (pSW->pSchema == NULL) {
1263
0
    TAOS_RETURN(TSDB_CODE_OUT_OF_MEMORY);
1264
0
  }
1265
0
  for (int32_t i = 0; i < pSW->nCols; i++) {
1266
0
    TAOS_CHECK_RETURN(tDecodeSSchema(pDecoder, &pSW->pSchema[i]));
1267
0
  }
1268
1269
0
  return 0;
1270
0
}
Unexecuted instantiation: sql-fuzzer.c:tDecodeSSchemaWrapper
Unexecuted instantiation: parser.c:tDecodeSSchemaWrapper
Unexecuted instantiation: parTranslater.c:tDecodeSSchemaWrapper
Unexecuted instantiation: parUtil.c:tDecodeSSchemaWrapper
Unexecuted instantiation: parAstParser.c:tDecodeSSchemaWrapper
Unexecuted instantiation: parAuthenticator.c:tDecodeSSchemaWrapper
Unexecuted instantiation: parCalcConst.c:tDecodeSSchemaWrapper
Unexecuted instantiation: parInsertSql.c:tDecodeSSchemaWrapper
Unexecuted instantiation: parInsertUtil.c:tDecodeSSchemaWrapper
Unexecuted instantiation: taos_lemon_sql.tab.c:tDecodeSSchemaWrapper
Unexecuted instantiation: parAstCreater.c:tDecodeSSchemaWrapper
Unexecuted instantiation: parInsertSml.c:tDecodeSSchemaWrapper
Unexecuted instantiation: planner.c:tDecodeSSchemaWrapper
Unexecuted instantiation: planLogicCreater.c:tDecodeSSchemaWrapper
Unexecuted instantiation: planOptimizer.c:tDecodeSSchemaWrapper
Unexecuted instantiation: planPhysiCreater.c:tDecodeSSchemaWrapper
Unexecuted instantiation: planScaleOut.c:tDecodeSSchemaWrapper
Unexecuted instantiation: planSpliter.c:tDecodeSSchemaWrapper
Unexecuted instantiation: planUtil.c:tDecodeSSchemaWrapper
Unexecuted instantiation: planValidator.c:tDecodeSSchemaWrapper
Unexecuted instantiation: catalog.c:tDecodeSSchemaWrapper
Unexecuted instantiation: ctgAsync.c:tDecodeSSchemaWrapper
Unexecuted instantiation: ctgCache.c:tDecodeSSchemaWrapper
Unexecuted instantiation: ctgDbg.c:tDecodeSSchemaWrapper
Unexecuted instantiation: ctgRemote.c:tDecodeSSchemaWrapper
Unexecuted instantiation: ctgRent.c:tDecodeSSchemaWrapper
Unexecuted instantiation: ctgUtil.c:tDecodeSSchemaWrapper
Unexecuted instantiation: functionMgt.c:tDecodeSSchemaWrapper
Unexecuted instantiation: tudf.c:tDecodeSSchemaWrapper
Unexecuted instantiation: builtins.c:tDecodeSSchemaWrapper
Unexecuted instantiation: builtinsimpl.c:tDecodeSSchemaWrapper
Unexecuted instantiation: thistogram.c:tDecodeSSchemaWrapper
Unexecuted instantiation: tpercentile.c:tDecodeSSchemaWrapper
Unexecuted instantiation: tavgfunction.c:tDecodeSSchemaWrapper
Unexecuted instantiation: tminmax.c:tDecodeSSchemaWrapper
Unexecuted instantiation: tminmaxavx.c:tDecodeSSchemaWrapper
Unexecuted instantiation: filter.c:tDecodeSSchemaWrapper
Unexecuted instantiation: scalar.c:tDecodeSSchemaWrapper
Unexecuted instantiation: sclfunc.c:tDecodeSSchemaWrapper
Unexecuted instantiation: sclvector.c:tDecodeSSchemaWrapper
Unexecuted instantiation: nodesCloneFuncs.c:tDecodeSSchemaWrapper
Unexecuted instantiation: nodesCodeFuncs.c:tDecodeSSchemaWrapper
Unexecuted instantiation: nodesEqualFuncs.c:tDecodeSSchemaWrapper
Unexecuted instantiation: nodesMatchFuncs.c:tDecodeSSchemaWrapper
Unexecuted instantiation: nodesMsgFuncs.c:tDecodeSSchemaWrapper
Unexecuted instantiation: nodesToSQLFuncs.c:tDecodeSSchemaWrapper
Unexecuted instantiation: nodesTraverseFuncs.c:tDecodeSSchemaWrapper
Unexecuted instantiation: nodesUtilFuncs.c:tDecodeSSchemaWrapper
Unexecuted instantiation: queryUtil.c:tDecodeSSchemaWrapper
Unexecuted instantiation: querymsg.c:tDecodeSSchemaWrapper
Unexecuted instantiation: trans.c:tDecodeSSchemaWrapper
Unexecuted instantiation: transCli.c:tDecodeSSchemaWrapper
Unexecuted instantiation: transComm.c:tDecodeSSchemaWrapper
Unexecuted instantiation: transSasl.c:tDecodeSSchemaWrapper
Unexecuted instantiation: transSvr.c:tDecodeSSchemaWrapper
Unexecuted instantiation: transTLS.c:tDecodeSSchemaWrapper
Unexecuted instantiation: thttp.c:tDecodeSSchemaWrapper
Unexecuted instantiation: geomFunc.c:tDecodeSSchemaWrapper
Unexecuted instantiation: tconfig.c:tDecodeSSchemaWrapper
Unexecuted instantiation: tdigest.c:tDecodeSSchemaWrapper
Unexecuted instantiation: tlog.c:tDecodeSSchemaWrapper
Unexecuted instantiation: tmempool.c:tDecodeSSchemaWrapper
Unexecuted instantiation: mpDirect.c:tDecodeSSchemaWrapper
Unexecuted instantiation: systable.c:tDecodeSSchemaWrapper
Unexecuted instantiation: tdatablock.c:tDecodeSSchemaWrapper
Unexecuted instantiation: tdataformat.c:tDecodeSSchemaWrapper
Unexecuted instantiation: tglobal.c:tDecodeSSchemaWrapper
Unexecuted instantiation: tmisce.c:tDecodeSSchemaWrapper
Unexecuted instantiation: tname.c:tDecodeSSchemaWrapper
Unexecuted instantiation: tpriv.c:tDecodeSSchemaWrapper
Unexecuted instantiation: ttime.c:tDecodeSSchemaWrapper
Unexecuted instantiation: tvariant.c:tDecodeSSchemaWrapper
Unexecuted instantiation: streamMsg.c:tDecodeSSchemaWrapper
Unexecuted instantiation: tmsg.c:tDecodeSSchemaWrapper
Unexecuted instantiation: xnode.c:tDecodeSSchemaWrapper
Unexecuted instantiation: tencrypt.c:tDecodeSSchemaWrapper
Unexecuted instantiation: streamJson.c:tDecodeSSchemaWrapper
1271
1272
0
static FORCE_INLINE int32_t tDecodeSSchemaWrapperEx(SDecoder* pDecoder, SSchemaWrapper* pSW) {
1273
0
  TAOS_CHECK_RETURN(tDecodeI32v(pDecoder, &pSW->nCols));
1274
0
  TAOS_CHECK_RETURN(tDecodeI32v(pDecoder, &pSW->version));
1275
1276
0
  pSW->pSchema = (SSchema*)tDecoderMalloc(pDecoder, pSW->nCols * sizeof(SSchema));
1277
0
  if (pSW->pSchema == NULL) {
1278
0
    TAOS_RETURN(TSDB_CODE_OUT_OF_MEMORY);
1279
0
  }
1280
0
  for (int32_t i = 0; i < pSW->nCols; i++) {
1281
0
    TAOS_CHECK_RETURN(tDecodeSSchema(pDecoder, &pSW->pSchema[i]));
1282
0
  }
1283
1284
0
  return 0;
1285
0
}
Unexecuted instantiation: sql-fuzzer.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: parser.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: parTranslater.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: parUtil.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: parAstParser.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: parAuthenticator.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: parCalcConst.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: parInsertSql.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: parInsertUtil.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: taos_lemon_sql.tab.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: parAstCreater.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: parInsertSml.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: planner.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: planLogicCreater.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: planOptimizer.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: planPhysiCreater.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: planScaleOut.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: planSpliter.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: planUtil.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: planValidator.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: catalog.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: ctgAsync.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: ctgCache.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: ctgDbg.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: ctgRemote.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: ctgRent.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: ctgUtil.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: functionMgt.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: tudf.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: builtins.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: builtinsimpl.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: thistogram.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: tpercentile.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: tavgfunction.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: tminmax.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: tminmaxavx.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: filter.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: scalar.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: sclfunc.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: sclvector.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: nodesCloneFuncs.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: nodesCodeFuncs.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: nodesEqualFuncs.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: nodesMatchFuncs.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: nodesMsgFuncs.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: nodesToSQLFuncs.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: nodesTraverseFuncs.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: nodesUtilFuncs.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: queryUtil.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: querymsg.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: trans.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: transCli.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: transComm.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: transSasl.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: transSvr.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: transTLS.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: thttp.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: geomFunc.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: tconfig.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: tdigest.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: tlog.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: tmempool.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: mpDirect.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: systable.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: tdatablock.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: tdataformat.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: tglobal.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: tmisce.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: tname.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: tpriv.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: ttime.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: tvariant.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: streamMsg.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: tmsg.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: xnode.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: tencrypt.c:tDecodeSSchemaWrapperEx
Unexecuted instantiation: streamJson.c:tDecodeSSchemaWrapperEx
1286
1287
typedef struct {
1288
  char     name[TSDB_TABLE_FNAME_LEN];
1289
  int8_t   igExists;
1290
  int8_t   source;  // TD_REQ_FROM_TAOX-taosX or TD_REQ_FROM_APP-taosClient
1291
  int8_t   reserved[6];
1292
  tb_uid_t suid;
1293
  int64_t  delay1;
1294
  int64_t  delay2;
1295
  int64_t  watermark1;
1296
  int64_t  watermark2;
1297
  int32_t  ttl;
1298
  int32_t  colVer;
1299
  int32_t  tagVer;
1300
  int32_t  numOfColumns;
1301
  int32_t  numOfTags;
1302
  int32_t  numOfFuncs;
1303
  int32_t  commentLen;
1304
  int32_t  ast1Len;
1305
  int32_t  ast2Len;
1306
  SArray*  pColumns;  // array of SFieldWithOptions
1307
  SArray*  pTags;     // array of SField
1308
  SArray*  pFuncs;
1309
  char*    pComment;
1310
  char*    pAst1;
1311
  char*    pAst2;
1312
  int64_t  deleteMark1;
1313
  int64_t  deleteMark2;
1314
  int32_t  sqlLen;
1315
  char*    sql;
1316
  int64_t  keep;
1317
  int8_t   virtualStb;
1318
  int8_t   secureDelete;
1319
  int8_t   securityLevel;
1320
} SMCreateStbReq;
1321
1322
int32_t tSerializeSMCreateStbReq(void* buf, int32_t bufLen, SMCreateStbReq* pReq);
1323
int32_t tDeserializeSMCreateStbReq(void* buf, int32_t bufLen, SMCreateStbReq* pReq);
1324
void    tFreeSMCreateStbReq(SMCreateStbReq* pReq);
1325
1326
typedef struct {
1327
  STableMetaRsp* pMeta;
1328
} SMCreateStbRsp;
1329
1330
int32_t tEncodeSMCreateStbRsp(SEncoder* pEncoder, const SMCreateStbRsp* pRsp);
1331
int32_t tDecodeSMCreateStbRsp(SDecoder* pDecoder, SMCreateStbRsp* pRsp);
1332
void    tFreeSMCreateStbRsp(SMCreateStbRsp* pRsp);
1333
1334
typedef struct {
1335
  char     name[TSDB_TABLE_FNAME_LEN];
1336
  int8_t   igNotExists;
1337
  int8_t   source;  // TD_REQ_FROM_TAOX-taosX or TD_REQ_FROM_APP-taosClient
1338
  int8_t   reserved[6];
1339
  tb_uid_t suid;
1340
  int32_t  sqlLen;
1341
  char*    sql;
1342
} SMDropStbReq;
1343
1344
int32_t tSerializeSMDropStbReq(void* buf, int32_t bufLen, SMDropStbReq* pReq);
1345
int32_t tDeserializeSMDropStbReq(void* buf, int32_t bufLen, SMDropStbReq* pReq);
1346
void    tFreeSMDropStbReq(SMDropStbReq* pReq);
1347
1348
typedef struct {
1349
  char    name[TSDB_TABLE_FNAME_LEN];
1350
  int8_t  alterType;
1351
  int32_t numOfFields;
1352
  SArray* pFields;
1353
  int32_t ttl;
1354
  int32_t commentLen;
1355
  char*   comment;
1356
  int32_t sqlLen;
1357
  char*   sql;
1358
  int64_t keep;
1359
  SArray* pTypeMods;
1360
  int8_t  secureDelete;
1361
  int8_t  securityLevel;
1362
} SMAlterStbReq;
1363
1364
int32_t tSerializeSMAlterStbReq(void* buf, int32_t bufLen, SMAlterStbReq* pReq);
1365
int32_t tDeserializeSMAlterStbReq(void* buf, int32_t bufLen, SMAlterStbReq* pReq);
1366
void    tFreeSMAltertbReq(SMAlterStbReq* pReq);
1367
1368
typedef struct SEpSet {
1369
  int8_t inUse;
1370
  int8_t numOfEps;
1371
  SEp    eps[TSDB_MAX_REPLICA];
1372
} SEpSet;
1373
1374
int32_t tEncodeSEpSet(SEncoder* pEncoder, const SEpSet* pEp);
1375
int32_t tDecodeSEpSet(SDecoder* pDecoder, SEpSet* pEp);
1376
int32_t taosEncodeSEpSet(void** buf, const SEpSet* pEp);
1377
void*   taosDecodeSEpSet(const void* buf, SEpSet* pEp);
1378
1379
int32_t tSerializeSEpSet(void* buf, int32_t bufLen, const SEpSet* pEpset);
1380
int32_t tDeserializeSEpSet(void* buf, int32_t buflen, SEpSet* pEpset);
1381
1382
typedef struct {
1383
  int8_t  connType;
1384
  int32_t pid;
1385
  int32_t totpCode;
1386
  char    app[TSDB_APP_NAME_LEN];
1387
  char    db[TSDB_DB_NAME_LEN];
1388
  char    user[TSDB_USER_LEN];
1389
  char    passwd[TSDB_PASSWORD_LEN];
1390
  char    token[TSDB_TOKEN_LEN];
1391
  int64_t startTime;
1392
  int64_t connectTime;
1393
  char    sVer[TSDB_VERSION_LEN];
1394
  char    signature[20]; // SHA1 produces a 20-byte signature
1395
} SConnectReq;
1396
1397
int32_t tSerializeSConnectReq(void* buf, int32_t bufLen, SConnectReq* pReq);
1398
int32_t tDeserializeSConnectReq(void* buf, int32_t bufLen, SConnectReq* pReq);
1399
void    tSignConnectReq(SConnectReq* pReq);
1400
int32_t tVerifyConnectReqSignature(const SConnectReq* pReq);
1401
1402
typedef struct {
1403
  int64_t       clusterId;
1404
  int32_t       acctId;
1405
  uint32_t      connId;
1406
  int32_t       dnodeNum;
1407
  int8_t        superUser;
1408
  int8_t        sysInfo;
1409
  int8_t        connType;
1410
  int8_t        enableAuditDelete;
1411
  SEpSet        epSet;
1412
  int32_t       svrTimestamp;
1413
  int32_t       passVer;
1414
  int32_t       authVer;
1415
  char          sVer[TSDB_VERSION_LEN];
1416
  char          sDetailVer[128];
1417
  int64_t       whiteListVer;
1418
  int64_t       timeWhiteListVer;
1419
  int64_t       userId;
1420
  SMonitorParas monitorParas;
1421
  char          user[TSDB_USER_LEN];
1422
  char          tokenName[TSDB_TOKEN_NAME_LEN];
1423
  int8_t        enableAuditSelect;
1424
  int8_t        enableAuditInsert;
1425
  int8_t        auditLevel;
1426
  union {
1427
    uint32_t flags;
1428
    struct {
1429
      uint32_t minSecLevel : 3;  // per-user
1430
      uint32_t maxSecLevel : 3;  // per-user
1431
      uint32_t sodInitial  : 1;  // cluster-wide: 1 = SoD still in initial phase
1432
      uint32_t macActive   : 1;  // cluster-wide: 1 = MAC mandatory mode activated
1433
      uint32_t reserved    : 24;
1434
    };
1435
  };
1436
} SConnectRsp;
1437
1438
int32_t tSerializeSConnectRsp(void* buf, int32_t bufLen, SConnectRsp* pRsp);
1439
int32_t tDeserializeSConnectRsp(void* buf, int32_t bufLen, SConnectRsp* pRsp);
1440
1441
typedef struct {
1442
  char    user[TSDB_USER_LEN];
1443
  char    pass[TSDB_PASSWORD_LEN];
1444
  int32_t maxUsers;
1445
  int32_t maxDbs;
1446
  int32_t maxTimeSeries;
1447
  int32_t maxStreams;
1448
  int32_t accessState;  // Configured only by command
1449
  int64_t maxStorage;
1450
} SCreateAcctReq, SAlterAcctReq;
1451
1452
// int32_t tSerializeSCreateAcctReq(void* buf, int32_t bufLen, SCreateAcctReq* pReq);
1453
// int32_t tDeserializeSCreateAcctReq(void* buf, int32_t bufLen, SCreateAcctReq* pReq);
1454
1455
typedef struct {
1456
  char    user[TSDB_USER_LEN];
1457
  int8_t  ignoreNotExists;
1458
  int32_t sqlLen;
1459
  char*   sql;
1460
} SDropUserReq, SDropAcctReq;
1461
1462
int32_t tSerializeSDropUserReq(void* buf, int32_t bufLen, SDropUserReq* pReq);
1463
int32_t tDeserializeSDropUserReq(void* buf, int32_t bufLen, SDropUserReq* pReq);
1464
void    tFreeSDropUserReq(SDropUserReq* pReq);
1465
1466
typedef struct {
1467
  char name[TSDB_ROLE_LEN];
1468
  union {
1469
    uint8_t flag;
1470
    struct {
1471
      uint8_t ignoreExists : 1;
1472
      uint8_t reserve : 7;
1473
    };
1474
  };
1475
  int32_t sqlLen;
1476
  char*   sql;
1477
} SCreateRoleReq;
1478
1479
int32_t tSerializeSCreateRoleReq(void* buf, int32_t bufLen, SCreateRoleReq* pReq);
1480
int32_t tDeserializeSCreateRoleReq(void* buf, int32_t bufLen, SCreateRoleReq* pReq);
1481
void    tFreeSCreateRoleReq(SCreateRoleReq* pReq);
1482
1483
typedef struct {
1484
  char name[TSDB_ROLE_LEN];
1485
  union {
1486
    uint8_t flag;
1487
    struct {
1488
      uint8_t ignoreNotExists : 1;
1489
      uint8_t reserve : 7;
1490
    };
1491
  };
1492
  int32_t sqlLen;
1493
  char*   sql;
1494
} SDropRoleReq;
1495
1496
int32_t tSerializeSDropRoleReq(void* buf, int32_t bufLen, SDropRoleReq* pReq);
1497
int32_t tDeserializeSDropRoleReq(void* buf, int32_t bufLen, SDropRoleReq* pReq);
1498
void    tFreeSDropRoleReq(SDropRoleReq* pReq);
1499
1500
typedef struct {
1501
  SPrivSet privSet;
1502
  SArray*  selectCols;  // SColIdNameKV, for table privileges
1503
  SArray*  insertCols;  // SColIdNameKV, for table privileges
1504
  SArray*  updateCols;  // SColIdNameKV, for table privileges
1505
  // delete can only specify conditions by cond and cannot specify columns
1506
  char*    cond;     // for table privileges
1507
  int32_t  condLen;  // for table privileges
1508
} SPrivSetReqArgs;
1509
1510
typedef struct {
1511
  uint8_t alterType;  // TSDB_ALTER_ROLE_LOCK, TSDB_ALTER_ROLE_ROLE, TSDB_ALTER_ROLE_PRIVILEGES
1512
  uint8_t objType;    // none, db, table, view, rsma, topic, etc.
1513
  union {
1514
    uint32_t flag;
1515
    struct {
1516
      uint32_t lock : 1;     // lock or unlock role
1517
      uint32_t add : 1;      // add or remove
1518
      uint32_t sysPriv : 1;  // system or object privileges
1519
      uint32_t objLevel : 2;
1520
      uint32_t ignoreNotExists : 1;
1521
      uint32_t reserve : 26;
1522
    };
1523
  };
1524
  union {
1525
    SPrivSetReqArgs privileges;
1526
    char            roleName[TSDB_ROLE_LEN];
1527
  };
1528
  char    principal[TSDB_ROLE_LEN];      // role or user name
1529
  char    objFName[TSDB_OBJ_FNAME_LEN];  // db
1530
  char    tblName[TSDB_TABLE_NAME_LEN];  // none, table, view, rsma, topic, etc.
1531
  int32_t sqlLen;
1532
  char*   sql;
1533
} SAlterRoleReq;
1534
1535
int32_t tSerializeSAlterRoleReq(void* buf, int32_t bufLen, SAlterRoleReq* pReq);
1536
int32_t tDeserializeSAlterRoleReq(void* buf, int32_t bufLen, SAlterRoleReq* pReq);
1537
void    tFreeSAlterRoleReq(SAlterRoleReq* pReq);
1538
1539
typedef struct {
1540
  char    algorithmId[TSDB_ENCRYPT_ALGR_NAME_LEN];
1541
  int32_t sqlLen;
1542
  char*   sql;
1543
} SDropEncryptAlgrReq;
1544
1545
int32_t tSerializeSDropEncryptAlgrReq(void* buf, int32_t bufLen, SDropEncryptAlgrReq* pReq);
1546
int32_t tDeserializeSDropEncryptAlgrReq(void* buf, int32_t bufLen, SDropEncryptAlgrReq* pReq);
1547
void    tFreeSDropEncryptAlgrReq(SDropEncryptAlgrReq* pReq);
1548
1549
typedef struct SIpV4Range {
1550
  uint32_t ip;
1551
  uint32_t mask;
1552
} SIpV4Range;
1553
1554
typedef struct SIpv6Range {
1555
  uint64_t addr[2];
1556
  uint32_t mask;
1557
} SIpV6Range;
1558
1559
typedef struct {
1560
  int8_t type;   // 0: IPv4, 1: IPv6
1561
  int8_t neg;    // only used in SIpWhiteListDual, if neg is 1, means this is a blacklist entry
1562
  union {
1563
    SIpV4Range ipV4;
1564
    SIpV6Range ipV6;
1565
  };
1566
} SIpRange;
1567
1568
typedef struct {
1569
  int32_t    num;
1570
  SIpV4Range pIpRange[];
1571
} SIpWhiteList;
1572
1573
typedef struct {
1574
  int32_t  num;
1575
  SIpRange pIpRanges[];
1576
} SIpWhiteListDual;
1577
1578
SIpWhiteListDual* cloneIpWhiteList(const SIpWhiteListDual* src);
1579
int32_t           cvtIpWhiteListToDual(SIpWhiteList* pWhiteList, SIpWhiteListDual** pWhiteListDual);
1580
int32_t           cvtIpWhiteListDualToV4(SIpWhiteListDual* pWhiteListDual, SIpWhiteList** pWhiteList);
1581
int32_t           createDefaultIp6Range(SIpRange* pRange);
1582
int32_t           createDefaultIp4Range(SIpRange* pRange);
1583
1584
typedef struct {
1585
  int32_t sessPerUser;
1586
  int32_t sessConnTime;
1587
  int32_t sessConnIdleTime;
1588
  int32_t sessMaxConcurrency;
1589
  int32_t sessMaxCallVnodeNum;
1590
} SUserSessCfg;
1591
1592
void initUserDefautSessCfg(SUserSessCfg* pCfg);
1593
// copyIpRange ensures that unused bytes are always zeroed, so that [pDst] can be used as a key in hash tables
1594
void copyIpRange(SIpRange* pDst, const SIpRange* pSrc);
1595
1596
// SDateTimeRange is used in client side during SQL statement parsing, client sends this structure
1597
// to server, and server will convert it to SDateTimeWhiteListItem for internal usage.
1598
typedef struct {
1599
  int16_t year;
1600
  int8_t month; // 1-12, when month is -1, it means day is week day and year is not used.
1601
  int8_t day;   // 1-31 or 0-6 (0 means Sunday), depends on the month value.
1602
  int8_t hour;
1603
  int8_t minute;
1604
  int8_t neg;   // this is a negative entry
1605
  int32_t duration; // duration in minute
1606
} SDateTimeRange;
1607
1608
bool isValidDateTimeRange(SDateTimeRange* pRange);
1609
int32_t tEncodeSDateTimeRange(SEncoder* pEncoder, const SDateTimeRange* pRange);
1610
int32_t tDecodeSDateTimeRange(SDecoder* pDecoder, SDateTimeRange* pRange);
1611
1612
// SDateTimeWhiteListItem is used by server internally to represent datetime ranges.
1613
typedef struct {
1614
  bool absolute;    // true: absolute datetime range; false: weekly recurring datetime range
1615
  bool neg;         // this is a negative entry
1616
  int32_t duration; // duration in seconds
1617
  int64_t start;    // absolute timestamp in seconds or weekly offset in seconds
1618
} SDateTimeWhiteListItem;
1619
1620
void DateTimeRangeToWhiteListItem(SDateTimeWhiteListItem* dst, const SDateTimeRange* src);
1621
bool isDateTimeWhiteListItemExpired(const SDateTimeWhiteListItem* item);
1622
1623
typedef struct {
1624
  int32_t num;
1625
  SDateTimeWhiteListItem ranges[];
1626
} SDateTimeWhiteList;
1627
1628
SDateTimeWhiteList* cloneDateTimeWhiteList(const SDateTimeWhiteList* src);
1629
bool isTimeInDateTimeWhiteList(const SDateTimeWhiteList *wl, int64_t tm);
1630
1631
1632
typedef struct {
1633
  int8_t createType;
1634
1635
  int8_t hasSessionPerUser;
1636
  int8_t hasConnectTime;
1637
  int8_t hasConnectIdleTime;
1638
  int8_t hasCallPerSession;
1639
  int8_t hasVnodePerCall;
1640
  int8_t hasFailedLoginAttempts;
1641
  int8_t hasPasswordLifeTime;
1642
  int8_t hasPasswordReuseTime;
1643
  int8_t hasPasswordReuseMax;
1644
  int8_t hasPasswordLockTime;
1645
  int8_t hasPasswordGraceTime;
1646
  int8_t hasInactiveAccountTime;
1647
  int8_t hasAllowTokenNum;
1648
  int8_t hasSecurityLevel;
1649
1650
  int8_t superUser;  // denote if it is a super user or not
1651
  int8_t ignoreExists;
1652
1653
  char   user[TSDB_USER_LEN];
1654
  char   pass[TSDB_USER_PASSWORD_LONGLEN];
1655
  char   totpseed[TSDB_USER_TOTPSEED_MAX_LEN + 1];
1656
1657
  int8_t sysInfo;
1658
  int8_t createDb;
1659
  int8_t isImport;
1660
  int8_t changepass;
1661
  int8_t enable;
1662
  int8_t minSecLevel;
1663
  int8_t maxSecLevel;
1664
1665
  int8_t negIpRanges;
1666
  int8_t negTimeRanges;
1667
1668
  int32_t sessionPerUser;
1669
  int32_t connectTime;
1670
  int32_t connectIdleTime;
1671
  int32_t callPerSession;
1672
  int32_t vnodePerCall;
1673
  int32_t failedLoginAttempts;
1674
  int32_t passwordLifeTime;
1675
  int32_t passwordReuseTime;
1676
  int32_t passwordReuseMax;
1677
  int32_t passwordLockTime;
1678
  int32_t passwordGraceTime;
1679
  int32_t inactiveAccountTime;
1680
  int32_t allowTokenNum;
1681
1682
  int32_t         numIpRanges;
1683
  SIpRange*       pIpDualRanges;
1684
  int32_t         numTimeRanges;
1685
  SDateTimeRange* pTimeRanges;
1686
1687
  int32_t sqlLen;
1688
  char*   sql;
1689
} SCreateUserReq;
1690
1691
int32_t tSerializeSCreateUserReq(void* buf, int32_t bufLen, SCreateUserReq* pReq);
1692
int32_t tDeserializeSCreateUserReq(void* buf, int32_t bufLen, SCreateUserReq* pReq);
1693
void    tFreeSCreateUserReq(SCreateUserReq* pReq);
1694
1695
typedef struct {
1696
  char    algorithmId[TSDB_ENCRYPT_ALGR_NAME_LEN];
1697
  char    name[TSDB_ENCRYPT_ALGR_NAME_LEN];
1698
  char    desc[TSDB_ENCRYPT_ALGR_DESC_LEN];
1699
  char    type[TSDB_ENCRYPT_ALGR_TYPE_LEN];
1700
  char    osslAlgrName[TSDB_ENCRYPT_ALGR_NAME_LEN];
1701
  int32_t sqlLen;
1702
  char*   sql;
1703
} SCreateEncryptAlgrReq;
1704
1705
int32_t tSerializeSCreateEncryptAlgrReq(void* buf, int32_t bufLen, SCreateEncryptAlgrReq* pReq);
1706
int32_t tDeserializeSCreateEncryptAlgrReq(void* buf, int32_t bufLen, SCreateEncryptAlgrReq* pReq);
1707
void    tFreeSCreateEncryptAlgrReq(SCreateEncryptAlgrReq* pReq);
1708
1709
typedef struct {
1710
  int32_t dnodeId;
1711
  int64_t analVer;
1712
} SRetrieveAnalyticsAlgoReq;
1713
1714
typedef struct {
1715
  int64_t   ver;
1716
  SHashObj* hash;  // algoname:algotype -> SAnalUrl
1717
} SRetrieveAnalyticAlgoRsp;
1718
1719
int32_t tSerializeRetrieveAnalyticAlgoReq(void* buf, int32_t bufLen, SRetrieveAnalyticsAlgoReq* pReq);
1720
int32_t tDeserializeRetrieveAnalyticAlgoReq(void* buf, int32_t bufLen, SRetrieveAnalyticsAlgoReq* pReq);
1721
int32_t tSerializeRetrieveAnalyticAlgoRsp(void* buf, int32_t bufLen, SRetrieveAnalyticAlgoRsp* pRsp);
1722
int32_t tDeserializeRetrieveAnalyticAlgoRsp(void* buf, int32_t bufLen, SRetrieveAnalyticAlgoRsp* pRsp);
1723
void    tFreeRetrieveAnalyticAlgoRsp(SRetrieveAnalyticAlgoRsp* pRsp);
1724
1725
typedef struct {
1726
  int8_t alterType;
1727
1728
  int8_t isView;
1729
1730
  int8_t hasPassword;
1731
  int8_t hasTotpseed;
1732
  int8_t hasEnable;
1733
  int8_t hasSysinfo;
1734
  int8_t hasCreatedb;
1735
  int8_t hasChangepass;
1736
  int8_t hasSessionPerUser;
1737
  int8_t hasConnectTime;
1738
  int8_t hasConnectIdleTime;
1739
  int8_t hasCallPerSession;
1740
  int8_t hasVnodePerCall;
1741
  int8_t hasFailedLoginAttempts;
1742
  int8_t hasPasswordLifeTime;
1743
  int8_t hasPasswordReuseTime;
1744
  int8_t hasPasswordReuseMax;
1745
  int8_t hasPasswordLockTime;
1746
  int8_t hasPasswordGraceTime;
1747
  int8_t hasInactiveAccountTime;
1748
  int8_t hasAllowTokenNum;
1749
  int8_t hasSecurityLevel;
1750
1751
  int8_t enable;
1752
  int8_t sysinfo;
1753
  int8_t createdb;
1754
  int8_t changepass;
1755
  int8_t minSecLevel;
1756
  int8_t maxSecLevel;
1757
1758
  char   user[TSDB_USER_LEN];
1759
  char   pass[TSDB_USER_PASSWORD_LONGLEN];
1760
  char   totpseed[TSDB_USER_TOTPSEED_MAX_LEN + 1];
1761
  int32_t sessionPerUser;
1762
  int32_t connectTime;
1763
  int32_t connectIdleTime;
1764
  int32_t callPerSession;
1765
  int32_t vnodePerCall;
1766
  int32_t failedLoginAttempts;
1767
  int32_t passwordLifeTime;
1768
  int32_t passwordReuseTime;
1769
  int32_t passwordReuseMax;
1770
  int32_t passwordLockTime;
1771
  int32_t passwordGraceTime;
1772
  int32_t inactiveAccountTime;
1773
  int32_t allowTokenNum;
1774
1775
  int32_t         numIpRanges;
1776
  int32_t         numTimeRanges;
1777
  int32_t         numDropIpRanges;
1778
  int32_t         numDropTimeRanges;
1779
  SIpRange*       pIpRanges;
1780
  SDateTimeRange* pTimeRanges;
1781
  SIpRange*       pDropIpRanges;
1782
  SDateTimeRange* pDropTimeRanges;
1783
  SPrivSet        privileges;
1784
1785
  char        objname[TSDB_OBJ_FNAME_LEN];  // db or topic
1786
  char        tabName[TSDB_TABLE_NAME_LEN];
1787
  char*       tagCond;
1788
  int32_t     tagCondLen;
1789
  int32_t     sqlLen;
1790
  char*       sql;
1791
} SAlterUserReq;
1792
1793
int32_t tSerializeSAlterUserReq(void* buf, int32_t bufLen, SAlterUserReq* pReq);
1794
int32_t tDeserializeSAlterUserReq(void* buf, int32_t bufLen, SAlterUserReq* pReq);
1795
void    tFreeSAlterUserReq(SAlterUserReq* pReq);
1796
1797
typedef struct {
1798
  char    name[TSDB_TOKEN_NAME_LEN];
1799
  char    user[TSDB_USER_LEN];
1800
  int8_t  enable;
1801
  int8_t  ignoreExists;
1802
  int32_t ttl;
1803
  char    provider[TSDB_TOKEN_PROVIDER_LEN];
1804
  char    extraInfo[TSDB_TOKEN_EXTRA_INFO_LEN];
1805
1806
  int32_t sqlLen;
1807
  char*   sql;
1808
} SCreateTokenReq;
1809
1810
int32_t tSerializeSCreateTokenReq(void* buf, int32_t bufLen, SCreateTokenReq* pReq);
1811
int32_t tDeserializeSCreateTokenReq(void* buf, int32_t bufLen, SCreateTokenReq* pReq);
1812
void    tFreeSCreateTokenReq(SCreateTokenReq* pReq);
1813
1814
typedef struct {
1815
  char name[TSDB_TOKEN_NAME_LEN];
1816
  char user[TSDB_USER_LEN];
1817
  char token[TSDB_TOKEN_LEN];
1818
} SCreateTokenRsp;
1819
1820
int32_t tSerializeSCreateTokenResp(void* buf, int32_t bufLen, SCreateTokenRsp* pRsp);
1821
int32_t tDeserializeSCreateTokenResp(void* buf, int32_t bufLen, SCreateTokenRsp* pRsp);
1822
void    tFreeSCreateTokenResp(SCreateTokenRsp* pRsp);
1823
1824
typedef struct {
1825
  char    name[TSDB_TOKEN_NAME_LEN];
1826
1827
  int8_t hasEnable;
1828
  int8_t hasTtl;
1829
  int8_t hasProvider;
1830
  int8_t hasExtraInfo;
1831
1832
  int8_t  enable;
1833
  int32_t ttl;
1834
  char    provider[TSDB_TOKEN_PROVIDER_LEN];
1835
  char    extraInfo[TSDB_TOKEN_EXTRA_INFO_LEN];
1836
1837
  int32_t     sqlLen;
1838
  char*       sql;
1839
} SAlterTokenReq;
1840
1841
int32_t tSerializeSAlterTokenReq(void* buf, int32_t bufLen, SAlterTokenReq* pReq);
1842
int32_t tDeserializeSAlterTokenReq(void* buf, int32_t bufLen, SAlterTokenReq* pReq);
1843
void    tFreeSAlterTokenReq(SAlterTokenReq* pReq);
1844
1845
typedef struct {
1846
  char    name[TSDB_TOKEN_NAME_LEN];
1847
  int8_t  ignoreNotExists;
1848
  int32_t sqlLen;
1849
  char*   sql;
1850
} SDropTokenReq;
1851
1852
int32_t tSerializeSDropTokenReq(void* buf, int32_t bufLen, SDropTokenReq* pReq);
1853
int32_t tDeserializeSDropTokenReq(void* buf, int32_t bufLen, SDropTokenReq* pReq);
1854
void    tFreeSDropTokenReq(SDropTokenReq* pReq);
1855
1856
typedef struct {
1857
  char    user[TSDB_USER_LEN];
1858
  int32_t sqlLen;
1859
  char*   sql;
1860
} SCreateTotpSecretReq;
1861
1862
int32_t tSerializeSCreateTotpSecretReq(void* buf, int32_t bufLen, SCreateTotpSecretReq* pReq);
1863
int32_t tDeserializeSCreateTotpSecretReq(void* buf, int32_t bufLen, SCreateTotpSecretReq* pReq);
1864
void    tFreeSCreateTotpSecretReq(SCreateTotpSecretReq* pReq);
1865
1866
typedef struct {
1867
  char user[TSDB_USER_LEN];
1868
  char totpSecret[(TSDB_TOTP_SECRET_LEN * 8 + 4) / 5 + 1];  // base32 encoded totp secret + null terminator
1869
} SCreateTotpSecretRsp;
1870
1871
int32_t tSerializeSCreateTotpSecretRsp(void* buf, int32_t bufLen, SCreateTotpSecretRsp* pRsp);
1872
int32_t tDeserializeSCreateTotpSecretRsp(void* buf, int32_t bufLen, SCreateTotpSecretRsp* pRsp);
1873
1874
typedef SCreateTotpSecretReq SDropTotpSecretReq;
1875
0
#define tSerializeSDropTotpSecretReq tSerializeSCreateTotpSecretReq
1876
#define tDeserializeSDropTotpSecretReq tDeserializeSCreateTotpSecretReq
1877
0
#define tFreeSDropTotpSecretReq tFreeSCreateTotpSecretReq
1878
1879
typedef struct {
1880
  char user[TSDB_USER_LEN];
1881
} SGetUserAuthReq;
1882
1883
int32_t tSerializeSGetUserAuthReq(void* buf, int32_t bufLen, SGetUserAuthReq* pReq);
1884
int32_t tDeserializeSGetUserAuthReq(void* buf, int32_t bufLen, SGetUserAuthReq* pReq);
1885
1886
typedef struct {
1887
  int8_t  enabled;
1888
  int32_t expireTime;
1889
} STokenStatus;
1890
1891
typedef struct {
1892
  char    user[TSDB_USER_LEN];
1893
  int64_t userId;
1894
  int32_t version;
1895
  int32_t passVer;
1896
  int8_t  superAuth;
1897
  int8_t  sysInfo;
1898
  int8_t  enable;
1899
  int8_t  dropped;
1900
  union {
1901
    uint8_t flags;
1902
    struct {
1903
      uint8_t minSecLevel    : 3;
1904
      uint8_t withInsertCond : 1;
1905
      uint8_t maxSecLevel    : 3;
1906
      uint8_t reserved       : 1;
1907
    };
1908
  };
1909
  SPrivSet  sysPrivs;
1910
  SHashObj* objPrivs;
1911
  SHashObj* selectTbs;
1912
  SHashObj* insertTbs;
1913
  SHashObj* deleteTbs;
1914
  SHashObj* ownedDbs;
1915
  int64_t   whiteListVer;
1916
1917
  SUserSessCfg sessCfg;
1918
  int64_t      timeWhiteListVer;
1919
  SHashObj*    tokens;
1920
} SGetUserAuthRsp;
1921
1922
int32_t tSerializeSGetUserAuthRsp(void* buf, int32_t bufLen, SGetUserAuthRsp* pRsp);
1923
int32_t tDeserializeSGetUserAuthRsp(void* buf, int32_t bufLen, SGetUserAuthRsp* pRsp);
1924
void    tFreeSGetUserAuthRsp(SGetUserAuthRsp* pRsp);
1925
1926
int32_t tSerializePrivSysObjPolicies(SEncoder* pEncoder, SPrivSet* sysPriv, SHashObj* pHash);
1927
int32_t tDeserializePrivSysObjPolicies(SDecoder* pDecoder, SPrivSet* sysPriv, SHashObj** pHash);
1928
int32_t tSerializePrivTblPolicies(SEncoder* pEncoder, SHashObj* pHash);
1929
int32_t tDeserializePrivTblPolicies(SDecoder* pDecoder, SHashObj** pHash);
1930
1931
int32_t tSerializeIpRange(SEncoder* encoder, SIpRange* pRange);
1932
int32_t tDeserializeIpRange(SDecoder* decoder, SIpRange* pRange, bool supportNeg);
1933
typedef struct {
1934
  int64_t ver;
1935
  char    user[TSDB_USER_LEN];
1936
  int32_t numOfRange;
1937
  union {
1938
    SIpV4Range* pIpRanges;
1939
    SIpRange*   pIpDualRanges;
1940
  };
1941
} SUpdateUserIpWhite;
1942
1943
typedef struct {
1944
  int64_t             ver;
1945
  int                 numOfUser;
1946
  SUpdateUserIpWhite* pUserIpWhite;
1947
} SUpdateIpWhite;
1948
1949
int32_t tSerializeSUpdateIpWhite(void* buf, int32_t bufLen, SUpdateIpWhite* pReq);
1950
int32_t tDeserializeSUpdateIpWhite(void* buf, int32_t bufLen, SUpdateIpWhite* pReq);
1951
void    tFreeSUpdateIpWhiteReq(SUpdateIpWhite* pReq);
1952
int32_t cloneSUpdateIpWhiteReq(SUpdateIpWhite* pReq, SUpdateIpWhite** pUpdate);
1953
1954
int32_t tSerializeSUpdateIpWhiteDual(void* buf, int32_t bufLen, SUpdateIpWhite* pReq);
1955
int32_t tDeserializeSUpdateIpWhiteDual(void* buf, int32_t bufLen, SUpdateIpWhite* pReq);
1956
void    tFreeSUpdateIpWhiteDualReq(SUpdateIpWhite* pReq);
1957
1958
1959
// SRetrieveWhiteListReq is used to retrieve both ip and datetime whitelist, but the
1960
// corresponding response struct is different.
1961
typedef struct {
1962
  int64_t ver;
1963
} SRetrieveWhiteListReq;
1964
1965
int32_t tSerializeRetrieveWhiteListReq(void* buf, int32_t bufLen, SRetrieveWhiteListReq* pReq);
1966
int32_t tDeserializeRetrieveWhiteListReq(void* buf, int32_t bufLen, SRetrieveWhiteListReq* pReq);
1967
1968
1969
// SGetUserWhiteListReq is used to get both ip and datetime whitelist, but the
1970
// corresponding response struct is different.
1971
typedef struct {
1972
  char user[TSDB_USER_LEN];
1973
} SGetUserWhiteListReq;
1974
1975
int32_t tSerializeSGetUserWhiteListReq(void* buf, int32_t bufLen, SGetUserWhiteListReq* pReq);
1976
int32_t tDeserializeSGetUserWhiteListReq(void* buf, int32_t bufLen, SGetUserWhiteListReq* pReq);
1977
1978
typedef struct {
1979
  char    user[TSDB_USER_LEN];
1980
  int32_t numWhiteLists;
1981
  union {
1982
    SIpV4Range* pWhiteLists;
1983
    SIpRange*   pWhiteListsDual;
1984
  };
1985
} SGetUserIpWhiteListRsp;
1986
1987
int32_t tIpStrToUint(const SIpAddr* addr, SIpRange* range);
1988
int32_t tIpUintToStr(const SIpRange* range, SIpAddr* addr);
1989
int32_t tIpRangeSetMask(SIpRange* range, int32_t mask);
1990
void    tIpRangeSetDefaultMask(SIpRange* range);
1991
1992
int32_t tSerializeSGetUserIpWhiteListRsp(void* buf, int32_t bufLen, SGetUserIpWhiteListRsp* pRsp);
1993
int32_t tDeserializeSGetUserIpWhiteListRsp(void* buf, int32_t bufLen, SGetUserIpWhiteListRsp* pRsp);
1994
void    tFreeSGetUserIpWhiteListRsp(SGetUserIpWhiteListRsp* pRsp);
1995
1996
int32_t tSerializeSGetUserIpWhiteListDualRsp(void* buf, int32_t bufLen, SGetUserIpWhiteListRsp* pRsp);
1997
int32_t tDeserializeSGetUserIpWhiteListDualRsp(void* buf, int32_t bufLen, SGetUserIpWhiteListRsp* pRsp);
1998
void    tFreeSGetUserIpWhiteListDualRsp(SGetUserIpWhiteListRsp* pRsp);
1999
2000
typedef struct {
2001
  int64_t ver;
2002
  char    user[TSDB_USER_LEN];
2003
  int32_t numWhiteLists;
2004
  SDateTimeWhiteListItem* pWhiteLists;
2005
} SUserDateTimeWhiteList;
2006
2007
2008
int32_t tSerializeSUserDateTimeWhiteList(void* buf, int32_t bufLen, SUserDateTimeWhiteList* pRsp);
2009
int32_t tDeserializeSUserDateTimeWhiteList(void* buf, int32_t bufLen, SUserDateTimeWhiteList* pRsp);
2010
void    tFreeSUserDateTimeWhiteList(SUserDateTimeWhiteList* pRsp);
2011
int32_t cloneSUserDateTimeWhiteList(const SUserDateTimeWhiteList* src, SUserDateTimeWhiteList* dest);
2012
2013
typedef struct {
2014
  int64_t             ver;
2015
  int                 numOfUser;
2016
  SUserDateTimeWhiteList *pUsers;
2017
} SRetrieveDateTimeWhiteListRsp;
2018
2019
int32_t tSerializeSRetrieveDateTimeWhiteListRsp(void* buf, int32_t bufLen, SRetrieveDateTimeWhiteListRsp* pRsp);
2020
int32_t tDeserializeSRetrieveDateTimeWhiteListRsp(void* buf, int32_t bufLen, SRetrieveDateTimeWhiteListRsp* pRsp);
2021
void    tFreeSRetrieveDateTimeWhiteListRsp(SRetrieveDateTimeWhiteListRsp* pRsp);
2022
int32_t cloneDataTimeWhiteListRsp(const SRetrieveDateTimeWhiteListRsp* src, SRetrieveDateTimeWhiteListRsp** dest);
2023
2024
/*
2025
 * for client side struct, only column id, type, bytes are necessary
2026
 * But for data in vnode side, we need all the following information.
2027
 */
2028
typedef struct {
2029
  union {
2030
    col_id_t colId;
2031
    int16_t  slotId;
2032
  };
2033
2034
  uint8_t precision;
2035
  uint8_t scale;
2036
  int32_t bytes;
2037
  int8_t  type;
2038
  uint8_t pk;
2039
  bool    noData;
2040
} SColumnInfo;
2041
2042
typedef struct STimeWindow {
2043
  TSKEY skey;
2044
  TSKEY ekey;
2045
} STimeWindow;
2046
2047
typedef struct SQueryHint {
2048
  bool batchScan;
2049
} SQueryHint;
2050
2051
typedef struct {
2052
  int32_t tsOffset;       // offset value in current msg body, NOTE: ts list is compressed
2053
  int32_t tsLen;          // total length of ts comp block
2054
  int32_t tsNumOfBlocks;  // ts comp block numbers
2055
  int32_t tsOrder;        // ts comp block order
2056
} STsBufInfo;
2057
2058
typedef struct {
2059
  void*       timezone;
2060
  char        intervalUnit;
2061
  char        slidingUnit;
2062
  char        offsetUnit;
2063
  int8_t      precision;
2064
  int64_t     interval;
2065
  int64_t     sliding;
2066
  int64_t     offset;
2067
  STimeWindow timeRange;
2068
} SInterval;
2069
2070
typedef struct STbVerInfo {
2071
  char    tbFName[TSDB_TABLE_FNAME_LEN];
2072
  int32_t sversion;
2073
  int32_t tversion;
2074
  int32_t rversion;  // virtual table's column ref's version
2075
} STbVerInfo;
2076
2077
typedef struct {
2078
  int32_t code;
2079
  int64_t affectedRows;
2080
  SArray* tbVerInfo;  // STbVerInfo
2081
} SQueryTableRsp;
2082
2083
int32_t tSerializeSQueryTableRsp(void* buf, int32_t bufLen, SQueryTableRsp* pRsp);
2084
2085
int32_t tDeserializeSQueryTableRsp(void* buf, int32_t bufLen, SQueryTableRsp* pRsp);
2086
2087
typedef struct {
2088
  SMsgHead header;
2089
  char     dbFName[TSDB_DB_FNAME_LEN];
2090
  char     tbName[TSDB_TABLE_NAME_LEN];
2091
} STableCfgReq;
2092
2093
typedef struct {
2094
  char        tbName[TSDB_TABLE_NAME_LEN];
2095
  char        stbName[TSDB_TABLE_NAME_LEN];
2096
  char        dbFName[TSDB_DB_FNAME_LEN];
2097
  int32_t     numOfTags;
2098
  int32_t     numOfColumns;
2099
  int8_t      tableType;
2100
  int64_t     delay1;
2101
  int64_t     delay2;
2102
  int64_t     watermark1;
2103
  int64_t     watermark2;
2104
  int32_t     ttl;
2105
  int32_t     keep;
2106
  int64_t     ownerId;
2107
  SArray*     pFuncs;
2108
  int32_t     commentLen;
2109
  char*       pComment;
2110
  SSchema*    pSchemas;
2111
  int32_t     tagsLen;
2112
  char*       pTags;
2113
  SSchemaExt* pSchemaExt;
2114
  union {
2115
    uint8_t flag;
2116
    struct {
2117
      uint8_t virtualStb : 1;  // no compatibility problem for little-endian arch
2118
      uint8_t isAudit : 1;
2119
      uint8_t securityLevel : 3;
2120
      uint8_t reserve : 3;
2121
    };
2122
  };
2123
  SColRef* pColRefs;
2124
  int32_t  numOfTagRefs;
2125
  SColRef* pTagRefs;
2126
  int8_t   secureDelete;
2127
} STableCfg;
2128
2129
typedef STableCfg STableCfgRsp;
2130
2131
int32_t tSerializeSTableCfgReq(void* buf, int32_t bufLen, STableCfgReq* pReq);
2132
int32_t tDeserializeSTableCfgReq(void* buf, int32_t bufLen, STableCfgReq* pReq);
2133
2134
int32_t tSerializeSTableCfgRsp(void* buf, int32_t bufLen, STableCfgRsp* pRsp);
2135
int32_t tDeserializeSTableCfgRsp(void* buf, int32_t bufLen, STableCfgRsp* pRsp);
2136
void    tFreeSTableCfgRsp(STableCfgRsp* pRsp);
2137
2138
typedef struct {
2139
  SMsgHead header;
2140
  tb_uid_t suid;
2141
} SVSubTablesReq;
2142
2143
int32_t tSerializeSVSubTablesReq(void* buf, int32_t bufLen, SVSubTablesReq* pReq);
2144
int32_t tDeserializeSVSubTablesReq(void* buf, int32_t bufLen, SVSubTablesReq* pReq);
2145
2146
typedef struct {
2147
  int32_t vgId;
2148
  SArray* pTables;  // SArray<SVCTableRefCols*>
2149
} SVSubTablesRsp;
2150
2151
int32_t tSerializeSVSubTablesRsp(void* buf, int32_t bufLen, SVSubTablesRsp* pRsp);
2152
int32_t tDeserializeSVSubTablesRsp(void* buf, int32_t bufLen, SVSubTablesRsp* pRsp);
2153
void    tDestroySVSubTablesRsp(void* rsp);
2154
2155
typedef struct {
2156
  SMsgHead header;
2157
  tb_uid_t suid;
2158
} SVStbRefDbsReq;
2159
2160
int32_t tSerializeSVStbRefDbsReq(void* buf, int32_t bufLen, SVStbRefDbsReq* pReq);
2161
int32_t tDeserializeSVStbRefDbsReq(void* buf, int32_t bufLen, SVStbRefDbsReq* pReq);
2162
2163
typedef struct {
2164
  int32_t vgId;
2165
  SArray* pDbs;  // SArray<char* (db name)>
2166
} SVStbRefDbsRsp;
2167
2168
int32_t tSerializeSVStbRefDbsRsp(void* buf, int32_t bufLen, SVStbRefDbsRsp* pRsp);
2169
int32_t tDeserializeSVStbRefDbsRsp(void* buf, int32_t bufLen, SVStbRefDbsRsp* pRsp);
2170
void    tDestroySVStbRefDbsRsp(void* rsp);
2171
2172
typedef struct {
2173
  char    db[TSDB_DB_FNAME_LEN];
2174
  int32_t numOfVgroups;
2175
  int32_t numOfStables;  // single_stable
2176
  int32_t buffer;        // MB
2177
  int32_t pageSize;
2178
  int32_t pages;
2179
  int32_t cacheLastSize;
2180
  int32_t cacheLastShardBits;  // Number of shards for last cache LRU, -1 for auto
2181
  int32_t daysPerFile;
2182
  int32_t daysToKeep0;
2183
  int32_t daysToKeep1;
2184
  int32_t daysToKeep2;
2185
  int32_t keepTimeOffset;
2186
  int32_t minRows;
2187
  int32_t maxRows;
2188
  int32_t walFsyncPeriod;
2189
  int8_t  walLevel;
2190
  int8_t  precision;  // time resolution
2191
  int8_t  compression;
2192
  int8_t  replications;
2193
  int8_t  strict;
2194
  int8_t  cacheLast;
2195
  int8_t  schemaless;
2196
  int8_t  ignoreExist;
2197
  int32_t numOfRetensions;
2198
  SArray* pRetensions;  // SRetention
2199
  int32_t walRetentionPeriod;
2200
  int64_t walRetentionSize;
2201
  int32_t walRollPeriod;
2202
  int64_t walSegmentSize;
2203
  int32_t sstTrigger;
2204
  int16_t hashPrefix;
2205
  int16_t hashSuffix;
2206
  int32_t ssChunkSize;
2207
  int32_t ssKeepLocal;
2208
  int8_t  ssCompact;
2209
  int32_t tsdbPageSize;
2210
  int32_t sqlLen;
2211
  char*   sql;
2212
  int8_t  withArbitrator;
2213
  int8_t  encryptAlgorithm;
2214
  char    dnodeListStr[TSDB_DNODE_LIST_LEN];
2215
  // 1. add auto-compact parameters
2216
  int32_t compactInterval;    // minutes
2217
  int32_t compactStartTime;   // minutes
2218
  int32_t compactEndTime;     // minutes
2219
  int8_t  compactTimeOffset;  // hour
2220
  char    encryptAlgrName[TSDB_ENCRYPT_ALGR_NAME_LEN];
2221
  int8_t  isAudit;
2222
  int8_t  allowDrop;
2223
  int8_t  secureDelete;
2224
  int8_t  securityLevel;
2225
} SCreateDbReq;
2226
2227
int32_t tSerializeSCreateDbReq(void* buf, int32_t bufLen, SCreateDbReq* pReq);
2228
int32_t tDeserializeSCreateDbReq(void* buf, int32_t bufLen, SCreateDbReq* pReq);
2229
void    tFreeSCreateDbReq(SCreateDbReq* pReq);
2230
2231
typedef struct {
2232
  char    db[TSDB_DB_FNAME_LEN];
2233
  int32_t buffer;
2234
  int32_t pageSize;
2235
  int32_t pages;
2236
  int32_t cacheLastSize;
2237
  int32_t cacheLastShardBits;  // Number of shards for last cache LRU, -1 for auto
2238
  int32_t daysPerFile;
2239
  int32_t daysToKeep0;
2240
  int32_t daysToKeep1;
2241
  int32_t daysToKeep2;
2242
  int32_t keepTimeOffset;
2243
  int32_t walFsyncPeriod;
2244
  int8_t  walLevel;
2245
  int8_t  strict;
2246
  int8_t  cacheLast;
2247
  int8_t  replications;
2248
  int32_t sstTrigger;
2249
  int32_t minRows;
2250
  int32_t walRetentionPeriod;
2251
  int32_t walRetentionSize;
2252
  int32_t ssKeepLocal;
2253
  int8_t  ssCompact;
2254
  int32_t sqlLen;
2255
  char*   sql;
2256
  int8_t  withArbitrator;
2257
  // 1. add auto-compact parameters
2258
  int32_t compactInterval;
2259
  int32_t compactStartTime;
2260
  int32_t compactEndTime;
2261
  int8_t  compactTimeOffset;
2262
  char    encryptAlgrName[TSDB_ENCRYPT_ALGR_NAME_LEN];
2263
  int8_t  isAudit;
2264
  int8_t  allowDrop;
2265
  int8_t  secureDelete;  
2266
  int8_t  securityLevel;
2267
} SAlterDbReq;
2268
2269
int32_t tSerializeSAlterDbReq(void* buf, int32_t bufLen, SAlterDbReq* pReq);
2270
int32_t tDeserializeSAlterDbReq(void* buf, int32_t bufLen, SAlterDbReq* pReq);
2271
void    tFreeSAlterDbReq(SAlterDbReq* pReq);
2272
2273
typedef struct {
2274
  char    db[TSDB_DB_FNAME_LEN];
2275
  int8_t  ignoreNotExists;
2276
  int8_t  force;
2277
  int32_t sqlLen;
2278
  char*   sql;
2279
} SDropDbReq;
2280
2281
int32_t tSerializeSDropDbReq(void* buf, int32_t bufLen, SDropDbReq* pReq);
2282
int32_t tDeserializeSDropDbReq(void* buf, int32_t bufLen, SDropDbReq* pReq);
2283
void    tFreeSDropDbReq(SDropDbReq* pReq);
2284
2285
typedef struct {
2286
  char    db[TSDB_DB_FNAME_LEN];
2287
  int64_t uid;
2288
} SDropDbRsp;
2289
2290
int32_t tSerializeSDropDbRsp(void* buf, int32_t bufLen, SDropDbRsp* pRsp);
2291
int32_t tDeserializeSDropDbRsp(void* buf, int32_t bufLen, SDropDbRsp* pRsp);
2292
2293
typedef struct {
2294
  char    name[TSDB_MOUNT_NAME_LEN];
2295
  int64_t uid;
2296
} SDropMountRsp;
2297
2298
int32_t tSerializeSDropMountRsp(void* buf, int32_t bufLen, SDropMountRsp* pRsp);
2299
int32_t tDeserializeSDropMountRsp(void* buf, int32_t bufLen, SDropMountRsp* pRsp);
2300
2301
typedef struct {
2302
  char    db[TSDB_DB_FNAME_LEN];
2303
  int64_t dbId;
2304
  int32_t vgVersion;
2305
  int32_t numOfTable;  // unit is TSDB_TABLE_NUM_UNIT
2306
  int64_t stateTs;     // ms
2307
} SUseDbReq;
2308
2309
int32_t tSerializeSUseDbReq(void* buf, int32_t bufLen, SUseDbReq* pReq);
2310
int32_t tDeserializeSUseDbReq(void* buf, int32_t bufLen, SUseDbReq* pReq);
2311
2312
typedef struct {
2313
  char    db[TSDB_DB_FNAME_LEN];
2314
  int64_t uid;
2315
  int32_t vgVersion;
2316
  int32_t vgNum;
2317
  int16_t hashPrefix;
2318
  int16_t hashSuffix;
2319
  int8_t  hashMethod;
2320
  union {
2321
    uint8_t flags;
2322
    struct {
2323
      uint8_t isMount : 1;  // TS-5868
2324
      uint8_t padding : 7;
2325
    };
2326
  };
2327
  SArray* pVgroupInfos;  // Array of SVgroupInfo
2328
  int32_t errCode;
2329
  int64_t stateTs;  // ms
2330
} SUseDbRsp;
2331
2332
int32_t tSerializeSUseDbRsp(void* buf, int32_t bufLen, const SUseDbRsp* pRsp);
2333
int32_t tDeserializeSUseDbRsp(void* buf, int32_t bufLen, SUseDbRsp* pRsp);
2334
int32_t tSerializeSUseDbRspImp(SEncoder* pEncoder, const SUseDbRsp* pRsp);
2335
int32_t tDeserializeSUseDbRspImp(SDecoder* pDecoder, SUseDbRsp* pRsp);
2336
void    tFreeSUsedbRsp(SUseDbRsp* pRsp);
2337
2338
typedef struct {
2339
  char db[TSDB_DB_FNAME_LEN];
2340
} SDbCfgReq;
2341
2342
int32_t tSerializeSDbCfgReq(void* buf, int32_t bufLen, SDbCfgReq* pReq);
2343
int32_t tDeserializeSDbCfgReq(void* buf, int32_t bufLen, SDbCfgReq* pReq);
2344
2345
typedef struct {
2346
  char db[TSDB_DB_FNAME_LEN];
2347
} SSsMigrateDbReq;
2348
2349
int32_t tSerializeSSsMigrateDbReq(void* buf, int32_t bufLen, SSsMigrateDbReq* pReq);
2350
int32_t tDeserializeSSsMigrateDbReq(void* buf, int32_t bufLen, SSsMigrateDbReq* pReq);
2351
2352
typedef struct {
2353
  int32_t ssMigrateId;
2354
  bool    bAccepted;
2355
} SSsMigrateDbRsp;
2356
2357
int32_t tSerializeSSsMigrateDbRsp(void* buf, int32_t bufLen, SSsMigrateDbRsp* pRsp);
2358
int32_t tDeserializeSSsMigrateDbRsp(void* buf, int32_t bufLen, SSsMigrateDbRsp* pRsp);
2359
2360
// Request and response for TDMT_VND_LIST_SSMIGRATE_FILESETS
2361
typedef struct {
2362
  int32_t ssMigrateId;
2363
} SListSsMigrateFileSetsReq;
2364
2365
int32_t tSerializeSListSsMigrateFileSetsReq(void* buf, int32_t bufLen, SListSsMigrateFileSetsReq* pReq);
2366
int32_t tDeserializeSListSsMigrateFileSetsReq(void* buf, int32_t bufLen, SListSsMigrateFileSetsReq* pReq);
2367
2368
typedef struct {
2369
  int32_t ssMigrateId;
2370
  int32_t vgId;       // vgroup id
2371
  SArray* pFileSets;  // SArray<int32_t>
2372
} SListSsMigrateFileSetsRsp;
2373
2374
int32_t tSerializeSListSsMigrateFileSetsRsp(void* buf, int32_t bufLen, SListSsMigrateFileSetsRsp* pRsp);
2375
int32_t tDeserializeSListSsMigrateFileSetsRsp(void* buf, int32_t bufLen, SListSsMigrateFileSetsRsp* pRsp);
2376
void    tFreeSListSsMigrateFileSetsRsp(SListSsMigrateFileSetsRsp* pRsp);
2377
2378
// Request and response for TDMT_VND_SSMIGRATE_FILESET
2379
typedef struct {
2380
  int32_t ssMigrateId;
2381
  int32_t nodeId;  // node id of the leader vnode, filled by vnode
2382
  int32_t fid;
2383
  int64_t startTimeSec;
2384
} SSsMigrateFileSetReq;
2385
2386
int32_t tSerializeSSsMigrateFileSetReq(void* buf, int32_t bufLen, SSsMigrateFileSetReq* pReq);
2387
int32_t tDeserializeSSsMigrateFileSetReq(void* buf, int32_t bufLen, SSsMigrateFileSetReq* pReq);
2388
2389
typedef struct {
2390
  int32_t ssMigrateId;
2391
  int32_t nodeId;  // node id of the leader vnode
2392
  int32_t vgId;
2393
  int32_t fid;
2394
} SSsMigrateFileSetRsp;
2395
2396
int32_t tSerializeSSsMigrateFileSetRsp(void* buf, int32_t bufLen, SSsMigrateFileSetRsp* pRsp);
2397
int32_t tDeserializeSSsMigrateFileSetRsp(void* buf, int32_t bufLen, SSsMigrateFileSetRsp* pRsp);
2398
2399
#define SSMIGRATE_FILESET_STATE_IN_PROGRESS 0
2400
#define SSMIGRATE_FILESET_STATE_SUCCEEDED   1
2401
#define SSMIGRATE_FILESET_STATE_COMPACT     2
2402
#define SSMIGRATE_FILESET_STATE_SKIPPED     3
2403
#define SSMIGRATE_FILESET_STATE_FAILED      4
2404
2405
// Request and response for TDMT_VND_QUERY_SSMIGRATE_PROGRESS and TDMT_VND_FOLLOWER_SSMIGRATE
2406
// Note this struct is reused as both request and response in TDMT_VND_QUERY_SSMIGRATE_PROGRESS,
2407
// while as a request, the 'state' field is not used.
2408
// This struct is also used in TDMT_VND_FOLLOWER_SSMIGRATE as request, which don't need a response.
2409
typedef struct {
2410
  int32_t ssMigrateId;  // ss migrate id
2411
  int32_t nodeId;       // node id of the leader vnode
2412
  int32_t vgId;         // vgroup id
2413
  int32_t fid;          // file set id
2414
  int32_t state;        // SSMIGRATE_FILESET_STATE_*
2415
} SSsMigrateProgress;
2416
2417
int tSerializeSSsMigrateProgress(void* buf, int32_t bufLen, SSsMigrateProgress* pProgress);
2418
int tDeserializeSSsMigrateProgress(void* buf, int32_t bufLen, SSsMigrateProgress* pProgress);
2419
2420
// Request for TDMT_MND_KILL_SSMIGRATE
2421
typedef struct {
2422
  int32_t ssMigrateId;
2423
  int32_t sqlLen;
2424
  char*   sql;
2425
} SKillSsMigrateReq;
2426
2427
int32_t tSerializeSKillSsMigrateReq(void* buf, int32_t bufLen, SKillSsMigrateReq* pReq);
2428
int32_t tDeserializeSKillSsMigrateReq(void* buf, int32_t bufLen, SKillSsMigrateReq* pReq);
2429
void    tFreeSKillSsMigrateReq(SKillSsMigrateReq* pReq);
2430
2431
// Request for TDMT_VND_KILL_SSMIGRATE
2432
typedef struct {
2433
  int32_t ssMigrateId;
2434
} SVnodeKillSsMigrateReq;
2435
2436
int32_t tSerializeSVnodeKillSsMigrateReq(void* buf, int32_t bufLen, SVnodeKillSsMigrateReq* pReq);
2437
int32_t tDeserializeSVnodeKillSsMigrateReq(void* buf, int32_t bufLen, SVnodeKillSsMigrateReq* pReq);
2438
2439
typedef struct {
2440
  int32_t vgId;
2441
  int64_t keepVersion;
2442
} SMndSetVgroupKeepVersionReq;
2443
2444
int32_t tSerializeSMndSetVgroupKeepVersionReq(void* buf, int32_t bufLen, SMndSetVgroupKeepVersionReq* pReq);
2445
int32_t tDeserializeSMndSetVgroupKeepVersionReq(void* buf, int32_t bufLen, SMndSetVgroupKeepVersionReq* pReq);
2446
2447
typedef struct {
2448
  int32_t timestampSec;
2449
  int32_t ttlDropMaxCount;
2450
  int32_t nUids;
2451
  SArray* pTbUids;
2452
} SVDropTtlTableReq;
2453
2454
int32_t tSerializeSVDropTtlTableReq(void* buf, int32_t bufLen, SVDropTtlTableReq* pReq);
2455
int32_t tDeserializeSVDropTtlTableReq(void* buf, int32_t bufLen, SVDropTtlTableReq* pReq);
2456
2457
typedef struct {
2458
  char    db[TSDB_DB_FNAME_LEN];
2459
  int64_t dbId;
2460
  int64_t ownerId;
2461
  int32_t cfgVersion;
2462
  int32_t numOfVgroups;
2463
  int32_t numOfStables;
2464
  int32_t buffer;
2465
  int32_t cacheSize;
2466
  int32_t cacheShardBits;
2467
  int32_t pageSize;
2468
  int32_t pages;
2469
  int32_t daysPerFile;
2470
  int32_t daysToKeep0;
2471
  int32_t daysToKeep1;
2472
  int32_t daysToKeep2;
2473
  int32_t keepTimeOffset;
2474
  int32_t minRows;
2475
  int32_t maxRows;
2476
  int32_t walFsyncPeriod;
2477
  int16_t hashPrefix;
2478
  int16_t hashSuffix;
2479
  int8_t  hashMethod;
2480
  int8_t  walLevel;
2481
  int8_t  precision;
2482
  int8_t  compression;
2483
  int8_t  replications;
2484
  int8_t  strict;
2485
  int8_t  cacheLast;
2486
  int8_t  encryptAlgr;
2487
  char    algorithmsId[TSDB_ENCRYPT_ALGR_NAME_LEN];
2488
  int32_t ssChunkSize;
2489
  int32_t ssKeepLocal;
2490
  int8_t  ssCompact;
2491
  union {
2492
    uint8_t flags;
2493
    struct {
2494
      uint8_t isMount : 1;    // TS-5868
2495
      uint8_t allowDrop : 1;  // TS-7232
2496
      uint8_t securityLevel : 3;   // 6671585124
2497
      uint8_t padding : 3;
2498
    };
2499
  };
2500
  int8_t  compactTimeOffset;
2501
  int32_t compactInterval;
2502
  int32_t compactStartTime;
2503
  int32_t compactEndTime;
2504
  int32_t tsdbPageSize;
2505
  int32_t walRetentionPeriod;
2506
  int32_t walRollPeriod;
2507
  int64_t walRetentionSize;
2508
  int64_t walSegmentSize;
2509
  int32_t numOfRetensions;
2510
  SArray* pRetensions;
2511
  int8_t  schemaless;
2512
  int16_t sstTrigger;
2513
  int8_t  withArbitrator;
2514
  int8_t  isAudit;
2515
  int8_t  secureDelete;
2516
} SDbCfgRsp;
2517
2518
typedef SDbCfgRsp SDbCfgInfo;
2519
2520
int32_t tSerializeSDbCfgRspImpl(SEncoder* encoder, const SDbCfgRsp* pRsp);
2521
int32_t tSerializeSDbCfgRsp(void* buf, int32_t bufLen, const SDbCfgRsp* pRsp);
2522
int32_t tDeserializeSDbCfgRsp(void* buf, int32_t bufLen, SDbCfgRsp* pRsp);
2523
int32_t tDeserializeSDbCfgRspImpl(SDecoder* decoder, SDbCfgRsp* pRsp);
2524
void    tFreeSDbCfgRsp(SDbCfgRsp* pRsp);
2525
2526
typedef struct {
2527
  int32_t rowNum;
2528
} SQnodeListReq;
2529
2530
int32_t tSerializeSQnodeListReq(void* buf, int32_t bufLen, SQnodeListReq* pReq);
2531
int32_t tDeserializeSQnodeListReq(void* buf, int32_t bufLen, SQnodeListReq* pReq);
2532
2533
typedef struct {
2534
  int32_t rowNum;
2535
} SDnodeListReq;
2536
2537
int32_t tSerializeSDnodeListReq(void* buf, int32_t bufLen, SDnodeListReq* pReq);
2538
2539
typedef struct {
2540
  int32_t useless;  // useless
2541
} SServerVerReq;
2542
2543
int32_t tSerializeSServerVerReq(void* buf, int32_t bufLen, SServerVerReq* pReq);
2544
// int32_t tDeserializeSServerVerReq(void* buf, int32_t bufLen, SServerVerReq* pReq);
2545
2546
typedef struct {
2547
  char ver[TSDB_VERSION_LEN];
2548
} SServerVerRsp;
2549
2550
int32_t tSerializeSServerVerRsp(void* buf, int32_t bufLen, SServerVerRsp* pRsp);
2551
int32_t tDeserializeSServerVerRsp(void* buf, int32_t bufLen, SServerVerRsp* pRsp);
2552
2553
typedef struct SQueryNodeAddr {
2554
  int32_t nodeId;  // vgId or qnodeId
2555
  SEpSet  epSet;
2556
} SQueryNodeAddr;
2557
2558
typedef struct {
2559
  SQueryNodeAddr addr;
2560
  uint64_t       load;
2561
} SQueryNodeLoad;
2562
2563
typedef struct {
2564
  SArray* qnodeList;  // SArray<SQueryNodeLoad>
2565
} SQnodeListRsp;
2566
2567
int32_t tSerializeSQnodeListRsp(void* buf, int32_t bufLen, SQnodeListRsp* pRsp);
2568
int32_t tDeserializeSQnodeListRsp(void* buf, int32_t bufLen, SQnodeListRsp* pRsp);
2569
void    tFreeSQnodeListRsp(SQnodeListRsp* pRsp);
2570
2571
2572
typedef struct SDownstreamSourceNode {
2573
  ENodeType      type;
2574
  SQueryNodeAddr addr;
2575
  uint64_t       clientId;
2576
  uint64_t       taskId;
2577
  uint64_t       sId;
2578
  uint64_t       srcTaskId;
2579
  int32_t        execId;
2580
  int32_t        fetchMsgType;
2581
  bool           localExec;
2582
} SDownstreamSourceNode;
2583
2584
2585
2586
typedef struct SDNodeAddr {
2587
  int32_t nodeId;  // dnodeId
2588
  SEpSet  epSet;
2589
} SDNodeAddr;
2590
2591
typedef struct {
2592
  SArray* dnodeList;  // SArray<SDNodeAddr>
2593
} SDnodeListRsp;
2594
2595
int32_t tSerializeSDnodeListRsp(void* buf, int32_t bufLen, SDnodeListRsp* pRsp);
2596
int32_t tDeserializeSDnodeListRsp(void* buf, int32_t bufLen, SDnodeListRsp* pRsp);
2597
void    tFreeSDnodeListRsp(SDnodeListRsp* pRsp);
2598
2599
typedef struct {
2600
  SArray* pTsmas;  // SArray<STableTSMAInfo*>
2601
} STableTSMAInfoRsp;
2602
2603
typedef struct {
2604
  SUseDbRsp*         useDbRsp;
2605
  SDbCfgRsp*         cfgRsp;
2606
  STableTSMAInfoRsp* pTsmaRsp;
2607
  int32_t            dbTsmaVersion;
2608
  char               db[TSDB_DB_FNAME_LEN];
2609
  int64_t            dbId;
2610
} SDbHbRsp;
2611
2612
typedef struct {
2613
  SArray* pArray;  // Array of SDbHbRsp
2614
} SDbHbBatchRsp;
2615
2616
int32_t tSerializeSDbHbBatchRsp(void* buf, int32_t bufLen, SDbHbBatchRsp* pRsp);
2617
int32_t tDeserializeSDbHbBatchRsp(void* buf, int32_t bufLen, SDbHbBatchRsp* pRsp);
2618
void    tFreeSDbHbBatchRsp(SDbHbBatchRsp* pRsp);
2619
2620
typedef struct {
2621
  SArray* pArray;  // Array of SGetUserAuthRsp
2622
} SUserAuthBatchRsp;
2623
2624
int32_t tSerializeSUserAuthBatchRsp(void* buf, int32_t bufLen, SUserAuthBatchRsp* pRsp);
2625
int32_t tDeserializeSUserAuthBatchRsp(void* buf, int32_t bufLen, SUserAuthBatchRsp* pRsp);
2626
void    tFreeSUserAuthBatchRsp(SUserAuthBatchRsp* pRsp);
2627
2628
typedef struct {
2629
  char        db[TSDB_DB_FNAME_LEN];
2630
  STimeWindow timeRange;
2631
  int32_t     sqlLen;
2632
  char*       sql;
2633
  SArray*     vgroupIds;
2634
  int32_t     compactId;
2635
  int8_t      metaOnly;
2636
  int8_t      force;
2637
} SCompactDbReq;
2638
2639
int32_t tSerializeSCompactDbReq(void* buf, int32_t bufLen, SCompactDbReq* pReq);
2640
int32_t tDeserializeSCompactDbReq(void* buf, int32_t bufLen, SCompactDbReq* pReq);
2641
void    tFreeSCompactDbReq(SCompactDbReq* pReq);
2642
2643
typedef struct {
2644
  union {
2645
    int32_t compactId;
2646
    int32_t id;
2647
  };
2648
  int8_t bAccepted;
2649
} SCompactDbRsp;
2650
2651
int32_t tSerializeSCompactDbRsp(void* buf, int32_t bufLen, SCompactDbRsp* pRsp);
2652
int32_t tDeserializeSCompactDbRsp(void* buf, int32_t bufLen, SCompactDbRsp* pRsp);
2653
2654
typedef struct {
2655
  union {
2656
    int32_t compactId;
2657
    int32_t id;
2658
  };
2659
  int8_t  force;
2660
  int32_t sqlLen;
2661
  char*   sql;
2662
} SKillCompactReq;
2663
2664
int32_t tSerializeSKillCompactReq(void* buf, int32_t bufLen, SKillCompactReq* pReq);
2665
int32_t tDeserializeSKillCompactReq(void* buf, int32_t bufLen, SKillCompactReq* pReq);
2666
void    tFreeSKillCompactReq(SKillCompactReq* pReq);
2667
2668
typedef SCompactDbRsp   STrimDbRsp;         // reuse structs
2669
typedef SKillCompactReq SKillRetentionReq;  // reuse structs
2670
2671
typedef struct {
2672
  char    name[TSDB_FUNC_NAME_LEN];
2673
  int8_t  igExists;
2674
  int8_t  funcType;
2675
  int8_t  scriptType;
2676
  int8_t  outputType;
2677
  int32_t outputLen;
2678
  int32_t bufSize;
2679
  int32_t codeLen;
2680
  int64_t signature;
2681
  char*   pComment;
2682
  char*   pCode;
2683
  int8_t  orReplace;
2684
} SCreateFuncReq;
2685
2686
int32_t tSerializeSCreateFuncReq(void* buf, int32_t bufLen, SCreateFuncReq* pReq);
2687
int32_t tDeserializeSCreateFuncReq(void* buf, int32_t bufLen, SCreateFuncReq* pReq);
2688
void    tFreeSCreateFuncReq(SCreateFuncReq* pReq);
2689
2690
typedef struct {
2691
  char   name[TSDB_FUNC_NAME_LEN];
2692
  int8_t igNotExists;
2693
} SDropFuncReq;
2694
2695
int32_t tSerializeSDropFuncReq(void* buf, int32_t bufLen, SDropFuncReq* pReq);
2696
int32_t tDeserializeSDropFuncReq(void* buf, int32_t bufLen, SDropFuncReq* pReq);
2697
2698
typedef struct {
2699
  int32_t numOfFuncs;
2700
  bool    ignoreCodeComment;
2701
  SArray* pFuncNames;
2702
} SRetrieveFuncReq;
2703
2704
int32_t tSerializeSRetrieveFuncReq(void* buf, int32_t bufLen, SRetrieveFuncReq* pReq);
2705
int32_t tDeserializeSRetrieveFuncReq(void* buf, int32_t bufLen, SRetrieveFuncReq* pReq);
2706
void    tFreeSRetrieveFuncReq(SRetrieveFuncReq* pReq);
2707
2708
typedef struct {
2709
  char    name[TSDB_FUNC_NAME_LEN];
2710
  int8_t  funcType;
2711
  int8_t  scriptType;
2712
  int8_t  outputType;
2713
  int32_t outputLen;
2714
  int32_t bufSize;
2715
  int64_t signature;
2716
  int32_t commentSize;
2717
  int32_t codeSize;
2718
  char*   pComment;
2719
  char*   pCode;
2720
} SFuncInfo;
2721
2722
typedef struct {
2723
  int32_t funcVersion;
2724
  int64_t funcCreatedTime;
2725
} SFuncExtraInfo;
2726
2727
typedef struct {
2728
  int32_t numOfFuncs;
2729
  SArray* pFuncInfos;
2730
  SArray* pFuncExtraInfos;
2731
} SRetrieveFuncRsp;
2732
2733
int32_t tSerializeSRetrieveFuncRsp(void* buf, int32_t bufLen, SRetrieveFuncRsp* pRsp);
2734
int32_t tDeserializeSRetrieveFuncRsp(void* buf, int32_t bufLen, SRetrieveFuncRsp* pRsp);
2735
void    tFreeSFuncInfo(SFuncInfo* pInfo);
2736
void    tFreeSRetrieveFuncRsp(SRetrieveFuncRsp* pRsp);
2737
2738
typedef struct {
2739
  int32_t       statusInterval;
2740
  /*
2741
    Local timezone UTC offset in seconds (east-positive, e.g. +28800 for
2742
    Asia/Shanghai).  Derived from taosGetLocalTimezoneOffset() on each
2743
    status report.  Paired with the timezone string in
2744
    mndCheckClusterCfgPara: a mismatch is reported only when both the
2745
    timezone string AND this offset differ.
2746
  */
2747
  int64_t       checkTime;
2748
  char          timezone[TD_TIMEZONE_LEN];  // tsTimezone
2749
  char          locale[TD_LOCALE_LEN];      // tsLocale
2750
  char          charset[TD_LOCALE_LEN];     // tsCharset
2751
  int8_t        ttlChangeOnWrite;
2752
  int8_t        enableWhiteList;
2753
  int8_t        encryptionKeyStat;
2754
  uint32_t      encryptionKeyChksum;
2755
  SMonitorParas monitorParas;
2756
  int32_t       statusIntervalMs;
2757
} SClusterCfg;
2758
2759
typedef struct {
2760
  int32_t openVnodes;
2761
  int32_t dropVnodes;
2762
  int32_t totalVnodes;
2763
  int32_t masterNum;
2764
  int64_t numOfSelectReqs;
2765
  int64_t numOfInsertReqs;
2766
  int64_t numOfInsertSuccessReqs;
2767
  int64_t numOfBatchInsertReqs;
2768
  int64_t numOfBatchInsertSuccessReqs;
2769
  int64_t errors;
2770
} SVnodesStat;
2771
2772
typedef struct {
2773
  int32_t vgId;
2774
  int8_t  syncState;
2775
  int8_t  syncRestore;
2776
  int64_t syncTerm;
2777
  int64_t roleTimeMs;
2778
  int64_t startTimeMs;
2779
  int8_t  syncCanRead;
2780
  int64_t cacheUsage;
2781
  int64_t numOfTables;
2782
  int64_t numOfTimeSeries;
2783
  int64_t totalStorage;
2784
  int64_t compStorage;
2785
  int64_t pointsWritten;
2786
  int64_t numOfSelectReqs;
2787
  int64_t numOfInsertReqs;
2788
  int64_t numOfInsertSuccessReqs;
2789
  int64_t numOfBatchInsertReqs;
2790
  int64_t numOfBatchInsertSuccessReqs;
2791
  int32_t numOfCachedTables;
2792
  int32_t learnerProgress;  // use one reservered
2793
  int64_t syncAppliedIndex;
2794
  int64_t syncCommitIndex;
2795
  int64_t bufferSegmentUsed;
2796
  int64_t bufferSegmentSize;
2797
  int32_t snapSeq;
2798
  int64_t syncTotalIndex;
2799
} SVnodeLoad;
2800
2801
typedef struct {
2802
  int64_t total_requests;
2803
  int64_t total_rows;
2804
  int64_t total_bytes;
2805
  double  write_size;
2806
  double  cache_hit_ratio;
2807
  int64_t rpc_queue_wait;
2808
  int64_t preprocess_time;
2809
2810
  int64_t memory_table_size;
2811
  int64_t commit_count;
2812
  int64_t merge_count;
2813
  double  commit_time;
2814
  double  merge_time;
2815
  int64_t block_commit_time;
2816
  int64_t memtable_wait_time;
2817
} SVnodeMetrics;
2818
2819
typedef struct {
2820
  int32_t     vgId;
2821
  int64_t     numOfTables;
2822
  int64_t     memSize;
2823
  int64_t     l1Size;
2824
  int64_t     l2Size;
2825
  int64_t     l3Size;
2826
  int64_t     cacheSize;
2827
  int64_t     walSize;
2828
  int64_t     metaSize;
2829
  int64_t     rawDataSize;
2830
  int64_t     ssSize;
2831
  const char* dbname;
2832
  int8_t      estimateRawData;
2833
} SDbSizeStatisInfo;
2834
2835
typedef struct {
2836
  int32_t vgId;
2837
  int64_t nTimeSeries;
2838
} SVnodeLoadLite;
2839
2840
typedef struct {
2841
  int8_t  syncState;
2842
  int64_t syncTerm;
2843
  int8_t  syncRestore;
2844
  int64_t roleTimeMs;
2845
} SMnodeLoad;
2846
2847
typedef struct {
2848
  int32_t dnodeId;
2849
  int64_t numOfProcessedQuery;
2850
  int64_t numOfProcessedCQuery;
2851
  int64_t numOfProcessedFetch;
2852
  int64_t numOfProcessedDrop;
2853
  int64_t numOfProcessedNotify;
2854
  int64_t numOfProcessedHb;
2855
  int64_t numOfProcessedDelete;
2856
  int64_t cacheDataSize;
2857
  int64_t numOfQueryInQueue;
2858
  int64_t numOfFetchInQueue;
2859
  int64_t timeInQueryQueue;
2860
  int64_t timeInFetchQueue;
2861
} SQnodeLoad;
2862
2863
typedef struct {
2864
  int32_t     sver;      // software version
2865
  int64_t     dnodeVer;  // dnode table version in sdb
2866
  int32_t     dnodeId;
2867
  int64_t     clusterId;
2868
  int64_t     rebootTime;
2869
  int64_t     updateTime;
2870
  float       numOfCores;
2871
  int32_t     numOfSupportVnodes;
2872
  int32_t     numOfDiskCfg;
2873
  int64_t     memTotal;
2874
  int64_t     memAvail;
2875
  char        dnodeEp[TSDB_EP_LEN];
2876
  char        machineId[TSDB_MACHINE_ID_LEN + 1];
2877
  SMnodeLoad  mload;
2878
  SQnodeLoad  qload;
2879
  SClusterCfg clusterCfg;
2880
  SArray*     pVloads;  // array of SVnodeLoad
2881
  int32_t     statusSeq;
2882
  int64_t     ipWhiteVer;
2883
  int64_t     timeWhiteVer;
2884
  int64_t     analVer;
2885
  int64_t     timestamp;
2886
  char        auditDB[TSDB_DB_FNAME_LEN];
2887
  char        auditToken[TSDB_TOKEN_LEN];
2888
  SEpSet      auditEpSet;
2889
  int32_t     auditVgId;
2890
} SStatusReq;
2891
2892
int32_t tSerializeSStatusReq(void* buf, int32_t bufLen, SStatusReq* pReq);
2893
int32_t tDeserializeSStatusReq(void* buf, int32_t bufLen, SStatusReq* pReq);
2894
void    tFreeSStatusReq(SStatusReq* pReq);
2895
2896
typedef struct {
2897
  int32_t forceReadConfig;
2898
  int32_t cver;
2899
  SArray* array;
2900
} SConfigReq;
2901
2902
int32_t tSerializeSConfigReq(void* buf, int32_t bufLen, SConfigReq* pReq);
2903
int32_t tDeserializeSConfigReq(void* buf, int32_t bufLen, SConfigReq* pReq);
2904
void    tFreeSConfigReq(SConfigReq* pReq);
2905
2906
typedef struct {
2907
  int32_t dnodeId;
2908
  char    machineId[TSDB_MACHINE_ID_LEN + 1];
2909
} SDnodeInfoReq;
2910
2911
int32_t tSerializeSDnodeInfoReq(void* buf, int32_t bufLen, SDnodeInfoReq* pReq);
2912
int32_t tDeserializeSDnodeInfoReq(void* buf, int32_t bufLen, SDnodeInfoReq* pReq);
2913
2914
typedef enum {
2915
  MONITOR_TYPE_COUNTER = 0,
2916
  MONITOR_TYPE_SLOW_LOG = 1,
2917
} MONITOR_TYPE;
2918
2919
typedef struct {
2920
  int32_t      contLen;
2921
  char*        pCont;
2922
  MONITOR_TYPE type;
2923
} SStatisReq;
2924
2925
int32_t tSerializeSStatisReq(void* buf, int32_t bufLen, SStatisReq* pReq);
2926
int32_t tDeserializeSStatisReq(void* buf, int32_t bufLen, SStatisReq* pReq);
2927
void    tFreeSStatisReq(SStatisReq* pReq);
2928
2929
typedef struct {
2930
  char    db[TSDB_DB_FNAME_LEN];
2931
  char    table[TSDB_TABLE_NAME_LEN];
2932
  char    operation[AUDIT_OPERATION_LEN];
2933
  int32_t sqlLen;
2934
  char*   pSql;
2935
  double  duration;
2936
  int64_t affectedRows;
2937
} SAuditReq;
2938
int32_t tSerializeSAuditReq(void* buf, int32_t bufLen, SAuditReq* pReq);
2939
int32_t tDeserializeSAuditReq(void* buf, int32_t bufLen, SAuditReq* pReq);
2940
void    tFreeSAuditReq(SAuditReq* pReq);
2941
2942
typedef struct {
2943
  SArray* auditArr;
2944
} SBatchAuditReq;
2945
int32_t tSerializeSBatchAuditReq(void* buf, int32_t bufLen, SBatchAuditReq* pReq);
2946
int32_t tDeserializeSBatchAuditReq(void* buf, int32_t bufLen, SBatchAuditReq* pReq);
2947
void    tFreeSBatchAuditReq(SBatchAuditReq* pReq);
2948
2949
typedef struct {
2950
  int32_t dnodeId;
2951
  int64_t clusterId;
2952
  SArray* pVloads;
2953
} SNotifyReq;
2954
2955
int32_t tSerializeSNotifyReq(void* buf, int32_t bufLen, SNotifyReq* pReq);
2956
int32_t tDeserializeSNotifyReq(void* buf, int32_t bufLen, SNotifyReq* pReq);
2957
void    tFreeSNotifyReq(SNotifyReq* pReq);
2958
2959
typedef struct {
2960
  int32_t dnodeId;
2961
  int64_t clusterId;
2962
} SDnodeCfg;
2963
2964
typedef struct {
2965
  int32_t id;
2966
  int8_t  isMnode;
2967
  SEp     ep;
2968
} SDnodeEp;
2969
2970
typedef struct {
2971
  int32_t id;
2972
  int8_t  isMnode;
2973
  int8_t  offlineReason;
2974
  SEp     ep;
2975
  char    active[TSDB_ACTIVE_KEY_LEN];
2976
  char    connActive[TSDB_CONN_ACTIVE_KEY_LEN];
2977
} SDnodeInfo;
2978
2979
typedef struct {
2980
  int64_t   dnodeVer;
2981
  SDnodeCfg dnodeCfg;
2982
  SArray*   pDnodeEps;  // Array of SDnodeEp
2983
  int32_t   statusSeq;
2984
  int64_t   ipWhiteVer;
2985
  int64_t   analVer;
2986
  int64_t   timeWhiteVer;
2987
  char      auditDB[TSDB_DB_FNAME_LEN];
2988
  char      auditToken[TSDB_TOKEN_LEN];
2989
  SEpSet    auditEpSet;
2990
  int32_t   auditVgId;
2991
} SStatusRsp;
2992
2993
int32_t tSerializeSStatusRsp(void* buf, int32_t bufLen, SStatusRsp* pRsp);
2994
int32_t tDeserializeSStatusRsp(void* buf, int32_t bufLen, SStatusRsp* pRsp);
2995
void    tFreeSStatusRsp(SStatusRsp* pRsp);
2996
2997
typedef struct {
2998
  int32_t forceReadConfig;
2999
  int32_t isConifgVerified;
3000
  int32_t isVersionVerified;
3001
  int32_t cver;
3002
  SArray* array;
3003
} SConfigRsp;
3004
3005
int32_t tSerializeSConfigRsp(void* buf, int32_t bufLen, SConfigRsp* pRsp);
3006
int32_t tDeserializeSConfigRsp(void* buf, int32_t bufLen, SConfigRsp* pRsp);
3007
void    tFreeSConfigRsp(SConfigRsp* pRsp);
3008
3009
typedef struct {
3010
  int32_t dnodeId;
3011
  int32_t keyVersion;  // Local key version
3012
} SKeySyncReq;
3013
3014
int32_t tSerializeSKeySyncReq(void* buf, int32_t bufLen, SKeySyncReq* pReq);
3015
int32_t tDeserializeSKeySyncReq(void* buf, int32_t bufLen, SKeySyncReq* pReq);
3016
3017
typedef struct {
3018
  int32_t keyVersion;        // mnode's key version
3019
  int8_t  needUpdate;        // 1 if dnode needs to update keys
3020
  int32_t encryptionKeyStatus;  // Encryption key status (TSDB_ENCRYPT_KEY_STAT_*)
3021
  char    svrKey[129];       // Server key (if needUpdate)
3022
  char    dbKey[129];        // Database key (if needUpdate)
3023
  char    cfgKey[129];       // Config key (if needUpdate)
3024
  char    metaKey[129];      // Metadata key (if needUpdate)
3025
  char    dataKey[129];      // Data key (if needUpdate)
3026
  int32_t algorithm;         // Encryption algorithm for master keys
3027
  int32_t cfgAlgorithm;      // Encryption algorithm for CFG_KEY
3028
  int32_t metaAlgorithm;     // Encryption algorithm for META_KEY
3029
  int64_t createTime;        // Key creation time
3030
  int64_t svrKeyUpdateTime;  // Server key update time
3031
  int64_t dbKeyUpdateTime;   // Database key update time
3032
} SKeySyncRsp;
3033
3034
int32_t tSerializeSKeySyncRsp(void* buf, int32_t bufLen, SKeySyncRsp* pRsp);
3035
int32_t tDeserializeSKeySyncRsp(void* buf, int32_t bufLen, SKeySyncRsp* pRsp);
3036
3037
typedef struct {
3038
  int32_t reserved;
3039
} SMTimerReq;
3040
3041
int32_t tSerializeSMTimerMsg(void* buf, int32_t bufLen, SMTimerReq* pReq);
3042
// int32_t tDeserializeSMTimerMsg(void* buf, int32_t bufLen, SMTimerReq* pReq);
3043
3044
typedef struct SOrphanTask {
3045
  int64_t streamId;
3046
  int32_t taskId;
3047
  int32_t nodeId;
3048
} SOrphanTask;
3049
3050
typedef struct SMStreamDropOrphanMsg {
3051
  SArray* pList;  // SArray<SOrphanTask>
3052
} SMStreamDropOrphanMsg;
3053
3054
int32_t tSerializeDropOrphanTaskMsg(void* buf, int32_t bufLen, SMStreamDropOrphanMsg* pMsg);
3055
int32_t tDeserializeDropOrphanTaskMsg(void* buf, int32_t bufLen, SMStreamDropOrphanMsg* pMsg);
3056
void    tDestroyDropOrphanTaskMsg(SMStreamDropOrphanMsg* pMsg);
3057
3058
typedef struct {
3059
  int32_t  id;
3060
  uint16_t port;                 // node sync Port
3061
  char     fqdn[TSDB_FQDN_LEN];  // node FQDN
3062
} SReplica;
3063
3064
typedef struct {
3065
  int32_t  vgId;
3066
  char     db[TSDB_DB_FNAME_LEN];
3067
  int64_t  dbUid;
3068
  int32_t  vgVersion;
3069
  int32_t  numOfStables;
3070
  int32_t  buffer;
3071
  int32_t  pageSize;
3072
  int32_t  pages;
3073
  int32_t  cacheLastSize;
3074
  int32_t  cacheLastShardBits;  // Number of shards for last cache LRU, -1 for auto
3075
  int32_t  daysPerFile;
3076
  int32_t  daysToKeep0;
3077
  int32_t  daysToKeep1;
3078
  int32_t  daysToKeep2;
3079
  int32_t  keepTimeOffset;
3080
  int32_t  minRows;
3081
  int32_t  maxRows;
3082
  int32_t  walFsyncPeriod;
3083
  uint32_t hashBegin;
3084
  uint32_t hashEnd;
3085
  int8_t   hashMethod;
3086
  int8_t   walLevel;
3087
  int8_t   precision;
3088
  int8_t   compression;
3089
  int8_t   strict;
3090
  int8_t   cacheLast;
3091
  int8_t   isTsma;
3092
  int8_t   replica;
3093
  int8_t   selfIndex;
3094
  SReplica replicas[TSDB_MAX_REPLICA];
3095
  int32_t  numOfRetensions;
3096
  SArray*  pRetensions;  // SRetention
3097
  void*    pTsma;
3098
  int32_t  walRetentionPeriod;
3099
  int64_t  walRetentionSize;
3100
  int32_t  walRollPeriod;
3101
  int64_t  walSegmentSize;
3102
  int16_t  sstTrigger;
3103
  int16_t  hashPrefix;
3104
  int16_t  hashSuffix;
3105
  int32_t  tsdbPageSize;
3106
  int32_t  ssChunkSize;
3107
  int32_t  ssKeepLocal;
3108
  int8_t   ssCompact;
3109
  int64_t  reserved[6];
3110
  int8_t   learnerReplica;
3111
  int8_t   learnerSelfIndex;
3112
  SReplica learnerReplicas[TSDB_MAX_LEARNER_REPLICA];
3113
  int32_t  changeVersion;
3114
  int8_t   encryptAlgorithm;
3115
  char     encryptAlgrName[TSDB_ENCRYPT_ALGR_NAME_LEN];
3116
  union {
3117
    uint8_t flags;
3118
    struct {
3119
      uint8_t isAudit : 1;
3120
      uint8_t allowDrop : 1;
3121
      uint8_t securityLevel : 3;   // 6671585124
3122
      uint8_t padding : 3;
3123
    };
3124
  };
3125
  int8_t secureDelete;
3126
} SCreateVnodeReq;
3127
3128
int32_t tSerializeSCreateVnodeReq(void* buf, int32_t bufLen, SCreateVnodeReq* pReq);
3129
int32_t tDeserializeSCreateVnodeReq(void* buf, int32_t bufLen, SCreateVnodeReq* pReq);
3130
int32_t tFreeSCreateVnodeReq(SCreateVnodeReq* pReq);
3131
3132
typedef struct {
3133
  union {
3134
    int32_t compactId;
3135
    int32_t id;
3136
  };
3137
  int32_t vgId;
3138
  int32_t dnodeId;
3139
} SQueryCompactProgressReq;
3140
3141
int32_t tSerializeSQueryCompactProgressReq(void* buf, int32_t bufLen, SQueryCompactProgressReq* pReq);
3142
int32_t tDeserializeSQueryCompactProgressReq(void* buf, int32_t bufLen, SQueryCompactProgressReq* pReq);
3143
3144
typedef struct {
3145
  union {
3146
    int32_t compactId;
3147
    int32_t id;
3148
  };
3149
  int32_t vgId;
3150
  int32_t dnodeId;
3151
  int32_t numberFileset;
3152
  int32_t finished;
3153
  int32_t progress;
3154
  int64_t remainingTime;
3155
} SQueryCompactProgressRsp;
3156
3157
int32_t tSerializeSQueryCompactProgressRsp(void* buf, int32_t bufLen, SQueryCompactProgressRsp* pReq);
3158
int32_t tDeserializeSQueryCompactProgressRsp(void* buf, int32_t bufLen, SQueryCompactProgressRsp* pReq);
3159
3160
typedef SQueryCompactProgressReq SQueryRetentionProgressReq;
3161
typedef SQueryCompactProgressRsp SQueryRetentionProgressRsp;
3162
3163
typedef struct {
3164
  int32_t vgId;
3165
  int32_t dnodeId;
3166
  int64_t dbUid;
3167
  char    db[TSDB_DB_FNAME_LEN];
3168
  int64_t reserved[8];
3169
} SDropVnodeReq;
3170
3171
int32_t tSerializeSDropVnodeReq(void* buf, int32_t bufLen, SDropVnodeReq* pReq);
3172
int32_t tDeserializeSDropVnodeReq(void* buf, int32_t bufLen, SDropVnodeReq* pReq);
3173
3174
typedef struct {
3175
  char    colName[TSDB_COL_NAME_LEN];
3176
  char    stb[TSDB_TABLE_FNAME_LEN];
3177
  int64_t stbUid;
3178
  int64_t dbUid;
3179
  int64_t reserved[8];
3180
} SDropIndexReq;
3181
3182
int32_t tSerializeSDropIdxReq(void* buf, int32_t bufLen, SDropIndexReq* pReq);
3183
int32_t tDeserializeSDropIdxReq(void* buf, int32_t bufLen, SDropIndexReq* pReq);
3184
3185
typedef struct {
3186
  int64_t dbUid;
3187
  char    db[TSDB_DB_FNAME_LEN];
3188
  union {
3189
    int64_t compactStartTime;
3190
    int64_t startTime;
3191
  };
3192
3193
  STimeWindow tw;
3194
  union {
3195
    int32_t compactId;
3196
    int32_t id;
3197
  };
3198
  int8_t metaOnly;
3199
  union {
3200
    uint16_t flags;
3201
    struct {
3202
      uint16_t optrType : 3;     // ETsdbOpType
3203
      uint16_t triggerType : 1;  // ETriggerType 0 manual, 1 auto
3204
      uint16_t reserved : 12;
3205
    };
3206
  };
3207
  int8_t force;  // force compact
3208
} SCompactVnodeReq;
3209
3210
int32_t tSerializeSCompactVnodeReq(void* buf, int32_t bufLen, SCompactVnodeReq* pReq);
3211
int32_t tDeserializeSCompactVnodeReq(void* buf, int32_t bufLen, SCompactVnodeReq* pReq);
3212
3213
typedef struct {
3214
  union {
3215
    int32_t compactId;
3216
    int32_t taskId;
3217
  };
3218
  int32_t vgId;
3219
  int32_t dnodeId;
3220
} SVKillCompactReq;
3221
3222
int32_t tSerializeSVKillCompactReq(void* buf, int32_t bufLen, SVKillCompactReq* pReq);
3223
int32_t tDeserializeSVKillCompactReq(void* buf, int32_t bufLen, SVKillCompactReq* pReq);
3224
3225
typedef SVKillCompactReq SVKillRetentionReq;
3226
3227
typedef struct {
3228
  char        db[TSDB_DB_FNAME_LEN];
3229
  int32_t     maxSpeed;
3230
  int32_t     sqlLen;
3231
  char*       sql;
3232
  SArray*     vgroupIds;
3233
  STimeWindow tw;  // unit is second
3234
  union {
3235
    uint32_t flags;
3236
    struct {
3237
      uint32_t optrType : 3;     // ETsdbOpType
3238
      uint32_t triggerType : 1;  // ETriggerType 0 manual, 1 auto
3239
      uint32_t reserved : 28;
3240
    };
3241
  };
3242
} STrimDbReq;
3243
3244
int32_t tSerializeSTrimDbReq(void* buf, int32_t bufLen, STrimDbReq* pReq);
3245
int32_t tDeserializeSTrimDbReq(void* buf, int32_t bufLen, STrimDbReq* pReq);
3246
void    tFreeSTrimDbReq(STrimDbReq* pReq);
3247
3248
typedef SCompactVnodeReq SVTrimDbReq;  // reuse SCompactVnodeReq, add task monitor since 3.3.8.0
3249
3250
int32_t tSerializeSVTrimDbReq(void* buf, int32_t bufLen, SVTrimDbReq* pReq);
3251
int32_t tDeserializeSVTrimDbReq(void* buf, int32_t bufLen, SVTrimDbReq* pReq);
3252
3253
typedef struct {
3254
  int32_t vgVersion;
3255
  int32_t buffer;
3256
  int32_t pageSize;
3257
  int32_t pages;
3258
  int32_t cacheLastSize;
3259
  int32_t cacheLastShardBits;  // Number of shards for last cache LRU, -1 for auto
3260
  int32_t daysPerFile;
3261
  int32_t daysToKeep0;
3262
  int32_t daysToKeep1;
3263
  int32_t daysToKeep2;
3264
  int32_t keepTimeOffset;
3265
  int32_t walFsyncPeriod;
3266
  int8_t  walLevel;
3267
  int8_t  strict;
3268
  int8_t  cacheLast;
3269
  int64_t reserved[7];
3270
  // 1st modification
3271
  int16_t sttTrigger;
3272
  int32_t minRows;
3273
  // 2nd modification
3274
  int32_t walRetentionPeriod;
3275
  int32_t walRetentionSize;
3276
  int32_t ssKeepLocal;
3277
  int8_t  ssCompact;
3278
  int8_t  allowDrop;
3279
  int8_t  secureDelete;
3280
  int8_t  securityLevel;
3281
} SAlterVnodeConfigReq;
3282
3283
int32_t tSerializeSAlterVnodeConfigReq(void* buf, int32_t bufLen, SAlterVnodeConfigReq* pReq);
3284
int32_t tDeserializeSAlterVnodeConfigReq(void* buf, int32_t bufLen, SAlterVnodeConfigReq* pReq);
3285
3286
typedef struct {
3287
  int32_t  vgId;
3288
  int8_t   strict;
3289
  int8_t   selfIndex;
3290
  int8_t   replica;
3291
  SReplica replicas[TSDB_MAX_REPLICA];
3292
  int64_t  reserved[8];
3293
  int8_t   learnerSelfIndex;
3294
  int8_t   learnerReplica;
3295
  SReplica learnerReplicas[TSDB_MAX_LEARNER_REPLICA];
3296
  int32_t  changeVersion;
3297
  int32_t  electBaseLine;
3298
} SAlterVnodeReplicaReq, SAlterVnodeTypeReq, SCheckLearnCatchupReq, SAlterVnodeElectBaselineReq;
3299
3300
int32_t tSerializeSAlterVnodeReplicaReq(void* buf, int32_t bufLen, SAlterVnodeReplicaReq* pReq);
3301
int32_t tDeserializeSAlterVnodeReplicaReq(void* buf, int32_t bufLen, SAlterVnodeReplicaReq* pReq);
3302
3303
typedef struct {
3304
  int32_t vgId;
3305
  int8_t  disable;
3306
} SDisableVnodeWriteReq;
3307
3308
int32_t tSerializeSDisableVnodeWriteReq(void* buf, int32_t bufLen, SDisableVnodeWriteReq* pReq);
3309
int32_t tDeserializeSDisableVnodeWriteReq(void* buf, int32_t bufLen, SDisableVnodeWriteReq* pReq);
3310
3311
typedef struct {
3312
  int32_t  srcVgId;
3313
  int32_t  dstVgId;
3314
  uint32_t hashBegin;
3315
  uint32_t hashEnd;
3316
  int32_t  changeVersion;
3317
  int32_t  reserved;
3318
} SAlterVnodeHashRangeReq;
3319
3320
int32_t tSerializeSAlterVnodeHashRangeReq(void* buf, int32_t bufLen, SAlterVnodeHashRangeReq* pReq);
3321
int32_t tDeserializeSAlterVnodeHashRangeReq(void* buf, int32_t bufLen, SAlterVnodeHashRangeReq* pReq);
3322
3323
0
#define REQ_OPT_TBNAME 0x0
3324
0
#define REQ_OPT_TBUID  0x01
3325
typedef struct {
3326
  SMsgHead header;
3327
  char     dbFName[TSDB_DB_FNAME_LEN];
3328
  char     tbName[TSDB_TABLE_NAME_LEN];
3329
  uint8_t  option;
3330
  uint8_t  autoCreateCtb;
3331
} STableInfoReq;
3332
3333
int32_t tSerializeSTableInfoReq(void* buf, int32_t bufLen, STableInfoReq* pReq);
3334
int32_t tDeserializeSTableInfoReq(void* buf, int32_t bufLen, STableInfoReq* pReq);
3335
3336
typedef struct {
3337
  int8_t  metaClone;  // create local clone of the cached table meta
3338
  int32_t numOfVgroups;
3339
  int32_t numOfTables;
3340
  int32_t numOfUdfs;
3341
  char    tableNames[];
3342
} SMultiTableInfoReq;
3343
3344
// todo refactor
3345
typedef struct SVgroupInfo {
3346
  int32_t  vgId;
3347
  uint32_t hashBegin;
3348
  uint32_t hashEnd;
3349
  SEpSet   epSet;
3350
  union {
3351
    int32_t numOfTable;  // unit is TSDB_TABLE_NUM_UNIT
3352
    int32_t taskId;      // used in stream
3353
  };
3354
} SVgroupInfo;
3355
3356
typedef struct {
3357
  int32_t     numOfVgroups;
3358
  SVgroupInfo vgroups[];
3359
} SVgroupsInfo;
3360
3361
typedef struct {
3362
  STableMetaRsp* pMeta;
3363
} SMAlterStbRsp;
3364
3365
int32_t tEncodeSMAlterStbRsp(SEncoder* pEncoder, const SMAlterStbRsp* pRsp);
3366
int32_t tDecodeSMAlterStbRsp(SDecoder* pDecoder, SMAlterStbRsp* pRsp);
3367
void    tFreeSMAlterStbRsp(SMAlterStbRsp* pRsp);
3368
3369
int32_t tSerializeSTableMetaRsp(void* buf, int32_t bufLen, STableMetaRsp* pRsp);
3370
int32_t tDeserializeSTableMetaRsp(void* buf, int32_t bufLen, STableMetaRsp* pRsp);
3371
void    tFreeSTableMetaRsp(void* pRsp);
3372
void    tFreeSTableIndexRsp(void* info);
3373
3374
typedef struct {
3375
  SArray* pMetaRsp;   // Array of STableMetaRsp
3376
  SArray* pIndexRsp;  // Array of STableIndexRsp;
3377
} SSTbHbRsp;
3378
3379
int32_t tSerializeSSTbHbRsp(void* buf, int32_t bufLen, SSTbHbRsp* pRsp);
3380
int32_t tDeserializeSSTbHbRsp(void* buf, int32_t bufLen, SSTbHbRsp* pRsp);
3381
void    tFreeSSTbHbRsp(SSTbHbRsp* pRsp);
3382
3383
typedef struct {
3384
  SArray* pViewRsp;  // Array of SViewMetaRsp*;
3385
} SViewHbRsp;
3386
3387
int32_t tSerializeSViewHbRsp(void* buf, int32_t bufLen, SViewHbRsp* pRsp);
3388
int32_t tDeserializeSViewHbRsp(void* buf, int32_t bufLen, SViewHbRsp* pRsp);
3389
void    tFreeSViewHbRsp(SViewHbRsp* pRsp);
3390
3391
typedef struct {
3392
  int32_t numOfTables;
3393
  int32_t numOfVgroup;
3394
  int32_t numOfUdf;
3395
  int32_t contLen;
3396
  int8_t  compressed;  // denote if compressed or not
3397
  int32_t rawLen;      // size before compress
3398
  uint8_t metaClone;   // make meta clone after retrieve meta from mnode
3399
  char    meta[];
3400
} SMultiTableMeta;
3401
3402
typedef struct {
3403
  int32_t dataLen;
3404
  char    name[TSDB_TABLE_FNAME_LEN];
3405
  char*   data;
3406
} STagData;
3407
3408
typedef struct {
3409
  int32_t  opType;
3410
  uint32_t valLen;
3411
  char*    val;
3412
} SShowVariablesReq;
3413
3414
int32_t tSerializeSShowVariablesReq(void* buf, int32_t bufLen, SShowVariablesReq* pReq);
3415
int32_t tDeserializeSShowVariablesReq(void* buf, int32_t bufLen, SShowVariablesReq* pReq);
3416
void    tFreeSShowVariablesReq(SShowVariablesReq* pReq);
3417
3418
typedef struct {
3419
  char name[TSDB_CONFIG_OPTION_LEN + 1];
3420
  char value[TSDB_CONFIG_PATH_LEN + 1];
3421
  char scope[TSDB_CONFIG_SCOPE_LEN + 1];
3422
  char category[TSDB_CONFIG_CATEGORY_LEN + 1];
3423
  char info[TSDB_CONFIG_INFO_LEN + 1];
3424
} SVariablesInfo;
3425
3426
typedef struct {
3427
  SArray* variables;  // SArray<SVariablesInfo>
3428
} SShowVariablesRsp;
3429
3430
int32_t tSerializeSShowVariablesRsp(void* buf, int32_t bufLen, SShowVariablesRsp* pReq);
3431
int32_t tDeserializeSShowVariablesRsp(void* buf, int32_t bufLen, SShowVariablesRsp* pReq);
3432
3433
void tFreeSShowVariablesRsp(SShowVariablesRsp* pRsp);
3434
3435
/*
3436
 * sql: show tables like '%a_%'
3437
 * payload is the query condition, e.g., '%a_%'
3438
 * payloadLen is the length of payload
3439
 */
3440
typedef struct {
3441
  int32_t type;
3442
  char    db[TSDB_DB_FNAME_LEN];
3443
  int32_t payloadLen;
3444
  char*   payload;
3445
} SShowReq;
3446
3447
int32_t tSerializeSShowReq(void* buf, int32_t bufLen, SShowReq* pReq);
3448
// int32_t tDeserializeSShowReq(void* buf, int32_t bufLen, SShowReq* pReq);
3449
void tFreeSShowReq(SShowReq* pReq);
3450
3451
typedef struct {
3452
  int64_t       showId;
3453
  STableMetaRsp tableMeta;
3454
} SShowRsp, SVShowTablesRsp;
3455
3456
// int32_t tSerializeSShowRsp(void* buf, int32_t bufLen, SShowRsp* pRsp);
3457
// int32_t tDeserializeSShowRsp(void* buf, int32_t bufLen, SShowRsp* pRsp);
3458
// void    tFreeSShowRsp(SShowRsp* pRsp);
3459
3460
typedef struct {
3461
  char    db[TSDB_DB_FNAME_LEN];
3462
  char    tb[TSDB_TABLE_NAME_LEN];
3463
  char    user[TSDB_USER_LEN];
3464
  char    filterTb[TSDB_TABLE_NAME_LEN];  // for ins_columns
3465
  int64_t showId;
3466
  int64_t compactId;  // for compact
3467
  bool    withFull;   // for show users full
3468
} SRetrieveTableReq;
3469
3470
typedef struct SSysTableSchema {
3471
  int8_t   type;
3472
  col_id_t colId;
3473
  int32_t  bytes;
3474
} SSysTableSchema;
3475
3476
int32_t tSerializeSRetrieveTableReq(void* buf, int32_t bufLen, SRetrieveTableReq* pReq);
3477
int32_t tDeserializeSRetrieveTableReq(void* buf, int32_t bufLen, SRetrieveTableReq* pReq);
3478
3479
#define RETRIEVE_TABLE_RSP_VERSION         0
3480
#define RETRIEVE_TABLE_RSP_TMQ_VERSION     1
3481
#define RETRIEVE_TABLE_RSP_TMQ_RAW_VERSION 2
3482
3483
typedef struct {
3484
  int64_t useconds;
3485
  int8_t  completed;  // all results are returned to client
3486
  int8_t  precision;
3487
  int8_t  compressed;
3488
  int8_t  streamBlockType;
3489
  int32_t payloadLen;
3490
  int32_t compLen;
3491
  int32_t numOfBlocks;
3492
  int64_t numOfRows;  // from int32_t change to int64_t
3493
  int64_t numOfCols;
3494
  int64_t skey;
3495
  int64_t ekey;
3496
  int64_t version;                         // for stream
3497
  TSKEY   watermark;                       // for stream
3498
  char    parTbName[TSDB_TABLE_NAME_LEN];  // for stream
3499
  char    data[];
3500
} SRetrieveTableRsp;
3501
3502
#define PAYLOAD_PREFIX_LEN ((sizeof(int32_t)) << 1)
3503
3504
#define SET_PAYLOAD_LEN(_p, _compLen, _fullLen) \
3505
  do {                                          \
3506
    ((int32_t*)(_p))[0] = (_compLen);           \
3507
    ((int32_t*)(_p))[1] = (_fullLen);           \
3508
  } while (0);
3509
3510
typedef struct {
3511
  int64_t version;
3512
  int64_t numOfRows;
3513
  int8_t  compressed;
3514
  int8_t  precision;
3515
  char    data[];
3516
} SRetrieveTableRspForTmq;
3517
3518
typedef struct {
3519
  int64_t handle;
3520
  int64_t useconds;
3521
  int8_t  completed;  // all results are returned to client
3522
  int8_t  precision;
3523
  int8_t  compressed;
3524
  int32_t compLen;
3525
  int32_t numOfRows;
3526
  int32_t fullLen;
3527
  char    data[];
3528
} SRetrieveMetaTableRsp;
3529
3530
typedef struct SExplainExecInfo {
3531
  /* the number of rows returned */
3532
  uint64_t numOfRows;
3533
  uint32_t verboseLen;
3534
  void*    verboseInfo;
3535
3536
  /* the timestamp when the operator is created */
3537
  TSKEY    execCreate;
3538
  /* the first timestamp when the operator's next interface is called */
3539
  TSKEY    execStart;
3540
  /* the timestamp when the first row is returned */
3541
  TSKEY    execFirstRow;
3542
  /* the timestamp when the last row is returned */
3543
  TSKEY    execLastRow;
3544
  /* the number of times the operator's next interface is called */
3545
  uint32_t execTimes;
3546
  /**
3547
    the time elapsed for executing the operator's next interface,
3548
    not including waiting time for data from downstream
3549
  */
3550
  TSKEY    execElapsed;
3551
  /* the time elapsed for waiting for data from downstream */
3552
  TSKEY    inputWaitElapsed;
3553
  /* the time elapsed for waiting call from upstream */
3554
  TSKEY    outputWaitElapsed;
3555
  /* the number of rows input */
3556
  uint64_t inputRows;
3557
3558
  int32_t  vgId;
3559
} SExplainExecInfo;
3560
3561
typedef struct {
3562
  int32_t           numOfPlans;
3563
  SExplainExecInfo* subplanInfo;
3564
} SExplainRsp;
3565
3566
typedef struct {
3567
  SExplainRsp rsp;
3568
  uint64_t    qId;
3569
  uint64_t    cId;
3570
  uint64_t    tId;
3571
  int64_t     rId;
3572
  int32_t     eId;
3573
} SExplainLocalRsp;
3574
3575
typedef struct STableScanAnalyzeInfo {
3576
  int64_t totalBlocks;
3577
  int64_t fileLoadBlocks;
3578
  double  fileLoadElapsed;
3579
  int64_t sttLoadBlocks;
3580
  double  sttLoadElapsed;
3581
  int64_t memLoadBlocks;
3582
  double  memLoadElapsed;
3583
  int64_t smaLoadBlocks;
3584
  double  smaLoadElapsed;
3585
  int64_t composedBlocks;
3586
  double  composedElapsed;
3587
  
3588
  uint64_t checkRows;
3589
3590
  uint64_t skipBlocks;
3591
  uint64_t filterOutBlocks;
3592
  double   filterTime;
3593
} STableScanAnalyzeInfo;
3594
3595
int32_t tSerializeSExplainRsp(void* buf, int32_t bufLen, SExplainRsp* pRsp);
3596
int32_t tDeserializeSExplainRsp(void* buf, int32_t bufLen, SExplainRsp* pRsp);
3597
void    tFreeSExplainRsp(SExplainRsp* pRsp);
3598
3599
typedef struct {
3600
  char    config[TSDB_DNODE_CONFIG_LEN];
3601
  char    value[TSDB_CLUSTER_VALUE_LEN];
3602
  int32_t sqlLen;
3603
  char*   sql;
3604
} SMCfgClusterReq;
3605
3606
int32_t tSerializeSMCfgClusterReq(void* buf, int32_t bufLen, SMCfgClusterReq* pReq);
3607
int32_t tDeserializeSMCfgClusterReq(void* buf, int32_t bufLen, SMCfgClusterReq* pReq);
3608
void    tFreeSMCfgClusterReq(SMCfgClusterReq* pReq);
3609
3610
typedef struct {
3611
  char    fqdn[TSDB_FQDN_LEN];  // end point, hostname:port
3612
  int32_t port;
3613
  int32_t sqlLen;
3614
  char*   sql;
3615
} SCreateDnodeReq;
3616
3617
int32_t tSerializeSCreateDnodeReq(void* buf, int32_t bufLen, SCreateDnodeReq* pReq);
3618
int32_t tDeserializeSCreateDnodeReq(void* buf, int32_t bufLen, SCreateDnodeReq* pReq);
3619
void    tFreeSCreateDnodeReq(SCreateDnodeReq* pReq);
3620
3621
typedef struct {
3622
  int32_t dnodeId;
3623
  char    fqdn[TSDB_FQDN_LEN];
3624
  int32_t port;
3625
  int8_t  force;
3626
  int8_t  unsafe;
3627
  int32_t sqlLen;
3628
  char*   sql;
3629
} SDropDnodeReq;
3630
3631
int32_t tSerializeSDropDnodeReq(void* buf, int32_t bufLen, SDropDnodeReq* pReq);
3632
int32_t tDeserializeSDropDnodeReq(void* buf, int32_t bufLen, SDropDnodeReq* pReq);
3633
void    tFreeSDropDnodeReq(SDropDnodeReq* pReq);
3634
3635
enum {
3636
  RESTORE_TYPE__ALL = 1,
3637
  RESTORE_TYPE__MNODE,
3638
  RESTORE_TYPE__VNODE,
3639
  RESTORE_TYPE__QNODE,
3640
};
3641
3642
typedef struct {
3643
  int32_t dnodeId;
3644
  int8_t  restoreType;
3645
  int32_t sqlLen;
3646
  char*   sql;
3647
  int32_t vgId;
3648
} SRestoreDnodeReq;
3649
3650
int32_t tSerializeSRestoreDnodeReq(void* buf, int32_t bufLen, SRestoreDnodeReq* pReq);
3651
int32_t tDeserializeSRestoreDnodeReq(void* buf, int32_t bufLen, SRestoreDnodeReq* pReq);
3652
void    tFreeSRestoreDnodeReq(SRestoreDnodeReq* pReq);
3653
3654
typedef struct {
3655
  int32_t dnodeId;
3656
  char    config[TSDB_DNODE_CONFIG_LEN];
3657
  char    value[TSDB_DNODE_VALUE_LEN];
3658
  int32_t sqlLen;
3659
  char*   sql;
3660
} SMCfgDnodeReq;
3661
3662
int32_t tSerializeSMCfgDnodeReq(void* buf, int32_t bufLen, SMCfgDnodeReq* pReq);
3663
int32_t tDeserializeSMCfgDnodeReq(void* buf, int32_t bufLen, SMCfgDnodeReq* pReq);
3664
void    tFreeSMCfgDnodeReq(SMCfgDnodeReq* pReq);
3665
3666
typedef struct {
3667
  int8_t  keyType;  // 0: SVR_KEY, 1: DB_KEY
3668
  char    newKey[ENCRYPT_KEY_LEN + 1];
3669
  int32_t sqlLen;
3670
  char*   sql;
3671
} SMAlterEncryptKeyReq;
3672
3673
int32_t tSerializeSMAlterEncryptKeyReq(void* buf, int32_t bufLen, SMAlterEncryptKeyReq* pReq);
3674
int32_t tDeserializeSMAlterEncryptKeyReq(void* buf, int32_t bufLen, SMAlterEncryptKeyReq* pReq);
3675
void    tFreeSMAlterEncryptKeyReq(SMAlterEncryptKeyReq* pReq);
3676
3677
typedef struct {
3678
  int32_t days;
3679
  char    strategy[ENCRYPT_KEY_EXPIRE_STRATEGY_LEN + 1];
3680
  int32_t sqlLen;
3681
  char*   sql;
3682
} SMAlterKeyExpirationReq;
3683
3684
int32_t tSerializeSMAlterKeyExpirationReq(void* buf, int32_t bufLen, SMAlterKeyExpirationReq* pReq);
3685
int32_t tDeserializeSMAlterKeyExpirationReq(void* buf, int32_t bufLen, SMAlterKeyExpirationReq* pReq);
3686
void    tFreeSMAlterKeyExpirationReq(SMAlterKeyExpirationReq* pReq);
3687
3688
typedef struct {
3689
  char    config[TSDB_DNODE_CONFIG_LEN];
3690
  char    value[TSDB_DNODE_VALUE_LEN];
3691
  int32_t version;
3692
} SDCfgDnodeReq;
3693
3694
int32_t tSerializeSDCfgDnodeReq(void* buf, int32_t bufLen, SDCfgDnodeReq* pReq);
3695
int32_t tDeserializeSDCfgDnodeReq(void* buf, int32_t bufLen, SDCfgDnodeReq* pReq);
3696
3697
typedef struct {
3698
  int32_t dnodeId;
3699
  int32_t sqlLen;
3700
  char*   sql;
3701
} SMCreateMnodeReq, SMDropMnodeReq, SDDropMnodeReq, SMCreateQnodeReq, SMDropQnodeReq, SDCreateQnodeReq, SDDropQnodeReq,
3702
    SMCreateSnodeReq, SMDropSnodeReq, SDDropSnodeReq;
3703
3704
int32_t tSerializeSCreateDropMQSNodeReq(void* buf, int32_t bufLen, SMCreateQnodeReq* pReq);
3705
int32_t tDeserializeSCreateDropMQSNodeReq(void* buf, int32_t bufLen, SMCreateQnodeReq* pReq);
3706
3707
typedef struct {
3708
  int32_t nodeId;
3709
  SEpSet  epSet;
3710
} SNodeEpSet;
3711
3712
typedef struct {
3713
  int32_t    snodeId;
3714
  SNodeEpSet leaders[2];
3715
  SNodeEpSet replica;
3716
  int32_t    sqlLen;
3717
  char*      sql;
3718
} SDCreateSnodeReq;
3719
3720
int32_t tSerializeSDCreateSNodeReq(void* buf, int32_t bufLen, SDCreateSnodeReq* pReq);
3721
int32_t tDeserializeSDCreateSNodeReq(void* buf, int32_t bufLen, SDCreateSnodeReq* pReq);
3722
void    tFreeSDCreateSnodeReq(SDCreateSnodeReq* pReq);
3723
3724
void tFreeSMCreateQnodeReq(SMCreateQnodeReq* pReq);
3725
void tFreeSDDropQnodeReq(SDDropQnodeReq* pReq);
3726
typedef struct {
3727
  int8_t   replica;
3728
  SReplica replicas[TSDB_MAX_REPLICA];
3729
  int8_t   learnerReplica;
3730
  SReplica learnerReplicas[TSDB_MAX_LEARNER_REPLICA];
3731
  int64_t  lastIndex;
3732
  int8_t   encrypted;  // Whether sdb.data is encrypted (0=false, 1=true)
3733
} SDCreateMnodeReq, SDAlterMnodeReq, SDAlterMnodeTypeReq;
3734
3735
int32_t tSerializeSDCreateMnodeReq(void* buf, int32_t bufLen, SDCreateMnodeReq* pReq);
3736
int32_t tDeserializeSDCreateMnodeReq(void* buf, int32_t bufLen, SDCreateMnodeReq* pReq);
3737
3738
typedef struct {
3739
  int32_t urlLen;
3740
  int32_t sqlLen;
3741
  char*   url;
3742
  char*   sql;
3743
} SMCreateAnodeReq;
3744
3745
int32_t tSerializeSMCreateAnodeReq(void* buf, int32_t bufLen, SMCreateAnodeReq* pReq);
3746
int32_t tDeserializeSMCreateAnodeReq(void* buf, int32_t bufLen, SMCreateAnodeReq* pReq);
3747
void    tFreeSMCreateAnodeReq(SMCreateAnodeReq* pReq);
3748
3749
typedef struct {
3750
  int32_t anodeId;
3751
  int32_t sqlLen;
3752
  char*   sql;
3753
} SMDropAnodeReq, SMUpdateAnodeReq;
3754
3755
int32_t tSerializeSMDropAnodeReq(void* buf, int32_t bufLen, SMDropAnodeReq* pReq);
3756
int32_t tDeserializeSMDropAnodeReq(void* buf, int32_t bufLen, SMDropAnodeReq* pReq);
3757
void    tFreeSMDropAnodeReq(SMDropAnodeReq* pReq);
3758
int32_t tSerializeSMUpdateAnodeReq(void* buf, int32_t bufLen, SMUpdateAnodeReq* pReq);
3759
int32_t tDeserializeSMUpdateAnodeReq(void* buf, int32_t bufLen, SMUpdateAnodeReq* pReq);
3760
void    tFreeSMUpdateAnodeReq(SMUpdateAnodeReq* pReq);
3761
3762
typedef struct {
3763
  int32_t dnodeId;
3764
  int32_t bnodeProto;
3765
  int32_t sqlLen;
3766
  char*   sql;
3767
} SMCreateBnodeReq, SDCreateBnodeReq;
3768
3769
int32_t tSerializeSMCreateBnodeReq(void* buf, int32_t bufLen, SMCreateBnodeReq* pReq);
3770
int32_t tDeserializeSMCreateBnodeReq(void* buf, int32_t bufLen, SMCreateBnodeReq* pReq);
3771
void    tFreeSMCreateBnodeReq(SMCreateBnodeReq* pReq);
3772
3773
typedef struct {
3774
  int32_t dnodeId;
3775
  int32_t sqlLen;
3776
  char*   sql;
3777
} SMDropBnodeReq, SDDropBnodeReq;
3778
3779
int32_t tSerializeSMDropBnodeReq(void* buf, int32_t bufLen, SMDropBnodeReq* pReq);
3780
int32_t tDeserializeSMDropBnodeReq(void* buf, int32_t bufLen, SMDropBnodeReq* pReq);
3781
void    tFreeSMDropBnodeReq(SMDropBnodeReq* pReq);
3782
3783
typedef struct {
3784
  bool        shouldFree;
3785
  int32_t     len;
3786
  const char* ptr;
3787
} CowStr;
3788
/**
3789
 * @brief Create a CowStr object.
3790
 *
3791
 * @param len: length of the string.
3792
 * @param ptr: pointer to the string input.
3793
 * @param shouldClone: whether to clone the string.
3794
 * @return CowStr object.
3795
 */
3796
CowStr xCreateCowStr(int32_t len, const char* ptr, bool shouldClone);
3797
/**
3798
 * @brief Set a CowStr object with given string.
3799
 *
3800
 * @param cow: pointer to the CowStr object.
3801
 * @param len: length of the string.
3802
 * @param ptr: pointer to the string input.
3803
 * @param shouldFree: whether to free the string.
3804
 */
3805
void xSetCowStr(CowStr* cow, int32_t len, const char* ptr, bool shouldFree);
3806
/**
3807
 * @brief Clone a CowStr object without copy the string.
3808
 *
3809
 * @param cow: pointer to the CowStr object.
3810
 * @return CowStr object.
3811
 */
3812
CowStr xCloneRefCowStr(CowStr* cow);
3813
/**
3814
 * @brief Convert a CowStr object to a string.
3815
 *
3816
 * @param cow: pointer to the CowStr object.
3817
 */
3818
char* xCowStrToStr(CowStr* cow);
3819
/**
3820
 * @brief Deallocate a CowStr object. Clears the string and resets length to 0.
3821
 *
3822
 * @param cow: pointer to the CowStr object.
3823
 */
3824
void xFreeCowStr(CowStr* cow);
3825
/**
3826
 * @brief Encode and push a CowStr object into the encoder.
3827
 *
3828
 * @param encoder
3829
 * @param cow
3830
 * @return int32_t
3831
 */
3832
int32_t xEncodeCowStr(SEncoder* encoder, CowStr* cow);
3833
/**
3834
 * @brief Decode a CowStr from the encoder.
3835
 *
3836
 * @param decoder
3837
 * @param cow
3838
 * @param shouldClone
3839
 * @return int32_t
3840
 */
3841
int32_t xDecodeCowStr(SDecoder* decoder, CowStr* cow, bool shouldClone);
3842
3843
typedef struct {
3844
  int32_t sqlLen;
3845
  int32_t urlLen;
3846
  int32_t userLen;
3847
  int32_t passLen;
3848
  int32_t passIsMd5;
3849
  char*   sql;
3850
  char*   url;
3851
  char*   user;
3852
  char*   pass;
3853
  CowStr  token;
3854
} SMCreateXnodeReq, SDCreateXnodeReq;
3855
3856
int32_t tSerializeSMCreateXnodeReq(void* buf, int32_t bufLen, SMCreateXnodeReq* pReq);
3857
int32_t tDeserializeSMCreateXnodeReq(void* buf, int32_t bufLen, SMCreateXnodeReq* pReq);
3858
void    tFreeSMCreateXnodeReq(SMCreateXnodeReq* pReq);
3859
3860
typedef struct {
3861
  int32_t xnodeId;
3862
  int32_t force;
3863
  int32_t urlLen;
3864
  int32_t sqlLen;
3865
  char*   url;
3866
  char*   sql;
3867
} SMDropXnodeReq, SDDropXnodeReq;
3868
3869
int32_t tSerializeSMDropXnodeReq(void* buf, int32_t bufLen, SMDropXnodeReq* pReq);
3870
int32_t tDeserializeSMDropXnodeReq(void* buf, int32_t bufLen, SMDropXnodeReq* pReq);
3871
void    tFreeSMDropXnodeReq(SMDropXnodeReq* pReq);
3872
3873
typedef struct {
3874
  int32_t id;
3875
  CowStr  token;
3876
  CowStr  user;
3877
  CowStr  pass;
3878
  int32_t urlLen;
3879
  int32_t sqlLen;
3880
  char*   url;
3881
  char*   sql;
3882
} SMUpdateXnodeReq;
3883
int32_t tSerializeSMUpdateXnodeReq(void* buf, int32_t bufLen, SMUpdateXnodeReq* pReq);
3884
int32_t tDeserializeSMUpdateXnodeReq(void* buf, int32_t bufLen, SMUpdateXnodeReq* pReq);
3885
void    tFreeSMUpdateXnodeReq(SMUpdateXnodeReq* pReq);
3886
3887
typedef struct {
3888
  int32_t xnodeId;
3889
  int32_t sqlLen;
3890
  char*   sql;
3891
} SMDrainXnodeReq;
3892
int32_t tSerializeSMDrainXnodeReq(void* buf, int32_t bufLen, SMDrainXnodeReq* pReq);
3893
int32_t tDeserializeSMDrainXnodeReq(void* buf, int32_t bufLen, SMDrainXnodeReq* pReq);
3894
void    tFreeSMDrainXnodeReq(SMDrainXnodeReq* pReq);
3895
typedef enum {
3896
  XNODE_TASK_SOURCE_DSN = 1,
3897
  XNODE_TASK_SOURCE_DATABASE,
3898
  XNODE_TASK_SOURCE_TOPIC,
3899
} ENodeXTaskSourceType;
3900
3901
typedef enum {
3902
  XNODE_TASK_SINK_DSN = 1,
3903
  XNODE_TASK_SINK_DATABASE,
3904
} ENodeXTaskSinkType;
3905
3906
typedef struct {
3907
  ENodeXTaskSourceType type;
3908
  CowStr               cstr;
3909
} xTaskSource;
3910
/**
3911
 * @brief Deallocate a xTaskSource object.
3912
 *
3913
 * @param source ptr
3914
 */
3915
void xFreeTaskSource(xTaskSource* source);
3916
/**
3917
 * @brief Create a xTaskSource object with cloned source string.
3918
 *
3919
 * @param sourceType: source type.
3920
 * @param len: length of source string.
3921
 * @param source: source string ptr.
3922
 * @return xTaskSource object
3923
 */
3924
xTaskSource xCreateClonedTaskSource(ENodeXTaskSourceType sourceType, int32_t len, char* ptr);
3925
xTaskSource xCloneTaskSourceRef(xTaskSource* source);
3926
xTaskSource xCreateTaskSource(ENodeXTaskSourceType sourceType, int32_t len, char* ptr);
3927
const char* xGetTaskSourceTypeAsStr(xTaskSource* source);
3928
const char* xGetTaskSourceStr(xTaskSource* source);
3929
int32_t     xSerializeTaskSource(SEncoder* encoder, xTaskSource* source);
3930
int32_t     xDeserializeTaskSource(SDecoder* decoder, xTaskSource* source);
3931
3932
typedef struct {
3933
  ENodeXTaskSinkType type;
3934
  CowStr             cstr;
3935
} xTaskSink;
3936
/**
3937
 * @brief Deallocate a xTaskSink object.
3938
 *
3939
 * @param sink ptr
3940
 */
3941
void xFreeTaskSink(xTaskSink* sink);
3942
/**
3943
 * @brief Create a xTaskSink object with cloned name string.
3944
 *
3945
 * @param sinkType: sink type.
3946
 * @param len: length of sink string.
3947
 * @param ptr: sink string ptr.
3948
 * @return xTaskSink object
3949
 */
3950
xTaskSink   xCreateClonedTaskSink(ENodeXTaskSinkType sinkType, int32_t len, char* ptr);
3951
xTaskSink   xCreateTaskSink(ENodeXTaskSinkType sinkType, int32_t len, char* ptr);
3952
xTaskSink   xCloneTaskSinkRef(xTaskSink* sink);
3953
const char* xGetTaskSinkTypeAsStr(xTaskSink* sink);
3954
const char* xGetTaskSinkStr(xTaskSink* sink);
3955
int32_t     xSerializeTaskSink(SEncoder* encoder, xTaskSink* sink);
3956
int32_t     xDeserializeTaskSink(SDecoder* decoder, xTaskSink* sink);
3957
3958
typedef struct {
3959
  int32_t via;
3960
  CowStr  parser;
3961
  // CowStr  reason;
3962
  CowStr  trigger;
3963
  CowStr  health;
3964
  int32_t optionsNum;
3965
  CowStr  options[TSDB_XNODE_TASK_OPTIONS_MAX_NUM];
3966
} xTaskOptions;
3967
/**
3968
 * @brief Deallocate a xTaskOptions object.
3969
 *
3970
 * @param options ptr
3971
 */
3972
void    xFreeTaskOptions(xTaskOptions* options);
3973
void    printXnodeTaskOptions(xTaskOptions* options);
3974
int32_t xSerializeTaskOptions(SEncoder* encoder, xTaskOptions* options);
3975
int32_t xDeserializeTaskOptions(SDecoder* decoder, xTaskOptions* options);
3976
3977
typedef struct {
3978
  int32_t sqlLen;
3979
  char*   sql;
3980
  int32_t      xnodeId;
3981
  CowStr       name;
3982
  xTaskSource  source;
3983
  xTaskSink    sink;
3984
  xTaskOptions options;
3985
} SMCreateXnodeTaskReq;
3986
int32_t tSerializeSMCreateXnodeTaskReq(void* buf, int32_t bufLen, SMCreateXnodeTaskReq* pReq);
3987
int32_t tDeserializeSMCreateXnodeTaskReq(void* buf, int32_t bufLen, SMCreateXnodeTaskReq* pReq);
3988
void    tFreeSMCreateXnodeTaskReq(SMCreateXnodeTaskReq* pReq);
3989
3990
typedef struct {
3991
  int32_t     tid;
3992
  CowStr      name;
3993
  int32_t     via;
3994
  int32_t     xnodeId;
3995
  CowStr      status;
3996
  xTaskSource source;
3997
  xTaskSink   sink;
3998
  CowStr      parser;
3999
  CowStr      reason;
4000
  CowStr      updateName;
4001
  CowStr      labels;
4002
  int32_t     sqlLen;
4003
  char*       sql;
4004
} SMUpdateXnodeTaskReq;
4005
int32_t tSerializeSMUpdateXnodeTaskReq(void* buf, int32_t bufLen, SMUpdateXnodeTaskReq* pReq);
4006
int32_t tDeserializeSMUpdateXnodeTaskReq(void* buf, int32_t bufLen, SMUpdateXnodeTaskReq* pReq);
4007
void    tFreeSMUpdateXnodeTaskReq(SMUpdateXnodeTaskReq* pReq);
4008
4009
typedef struct {
4010
  int32_t id;
4011
  bool    force;
4012
  CowStr  name;
4013
  int32_t sqlLen;
4014
  char*   sql;
4015
} SMDropXnodeTaskReq;
4016
int32_t tSerializeSMDropXnodeTaskReq(void* buf, int32_t bufLen, SMDropXnodeTaskReq* pReq);
4017
int32_t tDeserializeSMDropXnodeTaskReq(void* buf, int32_t bufLen, SMDropXnodeTaskReq* pReq);
4018
void    tFreeSMDropXnodeTaskReq(SMDropXnodeTaskReq* pReq);
4019
4020
typedef struct {
4021
  int32_t tid;
4022
  CowStr  name;
4023
  int32_t sqlLen;
4024
  char*   sql;
4025
} SMStartXnodeTaskReq, SMStopXnodeTaskReq;
4026
int32_t tSerializeSMStartXnodeTaskReq(void* buf, int32_t bufLen, SMStartXnodeTaskReq* pReq);
4027
int32_t tDeserializeSMStartXnodeTaskReq(void* buf, int32_t bufLen, SMStartXnodeTaskReq* pReq);
4028
void    tFreeSMStartXnodeTaskReq(SMStartXnodeTaskReq* pReq);
4029
4030
int32_t tSerializeSMStopXnodeTaskReq(void* buf, int32_t bufLen, SMStopXnodeTaskReq* pReq);
4031
int32_t tDeserializeSMStopXnodeTaskReq(void* buf, int32_t bufLen, SMStopXnodeTaskReq* pReq);
4032
void    tFreeSMStopXnodeTaskReq(SMStopXnodeTaskReq* pReq);
4033
4034
typedef struct {
4035
  int32_t tid;
4036
  int32_t via;
4037
  int32_t xnodeId;
4038
  CowStr  status;
4039
  CowStr  config;
4040
  CowStr  reason;
4041
  int32_t sqlLen;
4042
  char*   sql;
4043
} SMCreateXnodeJobReq;
4044
int32_t tSerializeSMCreateXnodeJobReq(void* buf, int32_t bufLen, SMCreateXnodeJobReq* pReq);
4045
int32_t tDeserializeSMCreateXnodeJobReq(void* buf, int32_t bufLen, SMCreateXnodeJobReq* pReq);
4046
void    tFreeSMCreateXnodeJobReq(SMCreateXnodeJobReq* pReq);
4047
4048
typedef struct {
4049
  int32_t jid;
4050
  int32_t via;
4051
  int32_t xnodeId;
4052
  CowStr  status;
4053
  int32_t configLen;
4054
  int32_t reasonLen;
4055
  int32_t sqlLen;
4056
  char*   config;
4057
  char*   reason;
4058
  char*   sql;
4059
} SMUpdateXnodeJobReq;
4060
int32_t tSerializeSMUpdateXnodeJobReq(void* buf, int32_t bufLen, SMUpdateXnodeJobReq* pReq);
4061
int32_t tDeserializeSMUpdateXnodeJobReq(void* buf, int32_t bufLen, SMUpdateXnodeJobReq* pReq);
4062
void    tFreeSMUpdateXnodeJobReq(SMUpdateXnodeJobReq* pReq);
4063
4064
typedef struct {
4065
  int32_t jid;
4066
  int32_t xnodeId;
4067
  int32_t sqlLen;
4068
  char*   sql;
4069
} SMRebalanceXnodeJobReq;
4070
int32_t tSerializeSMRebalanceXnodeJobReq(void* buf, int32_t bufLen, SMRebalanceXnodeJobReq* pReq);
4071
int32_t tDeserializeSMRebalanceXnodeJobReq(void* buf, int32_t bufLen, SMRebalanceXnodeJobReq* pReq);
4072
void    tFreeSMRebalanceXnodeJobReq(SMRebalanceXnodeJobReq* pReq);
4073
4074
typedef struct {
4075
  CowStr  ast;
4076
  int32_t sqlLen;
4077
  char*   sql;
4078
} SMRebalanceXnodeJobsWhereReq;
4079
int32_t tSerializeSMRebalanceXnodeJobsWhereReq(void* buf, int32_t bufLen, SMRebalanceXnodeJobsWhereReq* pReq);
4080
int32_t tDeserializeSMRebalanceXnodeJobsWhereReq(void* buf, int32_t bufLen, SMRebalanceXnodeJobsWhereReq* pReq);
4081
void    tFreeSMRebalanceXnodeJobsWhereReq(SMRebalanceXnodeJobsWhereReq* pReq);
4082
4083
typedef struct {
4084
  int32_t jid;
4085
  CowStr  ast;
4086
  int32_t sqlLen;
4087
  char*   sql;
4088
} SMDropXnodeJobReq;
4089
int32_t tSerializeSMDropXnodeJobReq(void* buf, int32_t bufLen, SMDropXnodeJobReq* pReq);
4090
int32_t tDeserializeSMDropXnodeJobReq(void* buf, int32_t bufLen, SMDropXnodeJobReq* pReq);
4091
void    tFreeSMDropXnodeJobReq(SMDropXnodeJobReq* pReq);
4092
4093
typedef struct {
4094
  int32_t      sqlLen;
4095
  char*        sql;
4096
  CowStr       name;
4097
  CowStr       status;
4098
  xTaskOptions options;
4099
} SMCreateXnodeAgentReq;
4100
int32_t tSerializeSMCreateXnodeAgentReq(void* buf, int32_t bufLen, SMCreateXnodeAgentReq* pReq);
4101
int32_t tDeserializeSMCreateXnodeAgentReq(void* buf, int32_t bufLen, SMCreateXnodeAgentReq* pReq);
4102
void    tFreeSMCreateXnodeAgentReq(SMCreateXnodeAgentReq* pReq);
4103
4104
typedef struct {
4105
  int32_t      sqlLen;
4106
  char*        sql;
4107
  int32_t      id;
4108
  CowStr       name;
4109
  xTaskOptions options;
4110
} SMUpdateXnodeAgentReq;
4111
int32_t tSerializeSMUpdateXnodeAgentReq(void* buf, int32_t bufLen, SMUpdateXnodeAgentReq* pReq);
4112
int32_t tDeserializeSMUpdateXnodeAgentReq(void* buf, int32_t bufLen, SMUpdateXnodeAgentReq* pReq);
4113
void    tFreeSMUpdateXnodeAgentReq(SMUpdateXnodeAgentReq* pReq);
4114
4115
typedef SMDropXnodeTaskReq SMDropXnodeAgentReq;
4116
int32_t                    tSerializeSMDropXnodeAgentReq(void* buf, int32_t bufLen, SMDropXnodeAgentReq* pReq);
4117
int32_t                    tDeserializeSMDropXnodeAgentReq(void* buf, int32_t bufLen, SMDropXnodeAgentReq* pReq);
4118
void                       tFreeSMDropXnodeAgentReq(SMDropXnodeAgentReq* pReq);
4119
4120
typedef struct {
4121
  int32_t vgId;
4122
  int32_t hbSeq;
4123
} SVArbHbReqMember;
4124
4125
typedef struct {
4126
  int32_t dnodeId;
4127
  char*   arbToken;
4128
  int64_t arbTerm;
4129
  SArray* hbMembers;  // SVArbHbReqMember
4130
} SVArbHeartBeatReq;
4131
4132
int32_t tSerializeSVArbHeartBeatReq(void* buf, int32_t bufLen, SVArbHeartBeatReq* pReq);
4133
int32_t tDeserializeSVArbHeartBeatReq(void* buf, int32_t bufLen, SVArbHeartBeatReq* pReq);
4134
void    tFreeSVArbHeartBeatReq(SVArbHeartBeatReq* pReq);
4135
4136
typedef struct {
4137
  int32_t vgId;
4138
  char    memberToken[TSDB_ARB_TOKEN_SIZE];
4139
  int32_t hbSeq;
4140
} SVArbHbRspMember;
4141
4142
typedef struct {
4143
  char    arbToken[TSDB_ARB_TOKEN_SIZE];
4144
  int32_t dnodeId;
4145
  SArray* hbMembers;  // SVArbHbRspMember
4146
} SVArbHeartBeatRsp;
4147
4148
int32_t tSerializeSVArbHeartBeatRsp(void* buf, int32_t bufLen, SVArbHeartBeatRsp* pRsp);
4149
int32_t tDeserializeSVArbHeartBeatRsp(void* buf, int32_t bufLen, SVArbHeartBeatRsp* pRsp);
4150
void    tFreeSVArbHeartBeatRsp(SVArbHeartBeatRsp* pRsp);
4151
4152
typedef struct {
4153
  char*   arbToken;
4154
  int64_t arbTerm;
4155
  char*   member0Token;
4156
  char*   member1Token;
4157
} SVArbCheckSyncReq;
4158
4159
int32_t tSerializeSVArbCheckSyncReq(void* buf, int32_t bufLen, SVArbCheckSyncReq* pReq);
4160
int32_t tDeserializeSVArbCheckSyncReq(void* buf, int32_t bufLen, SVArbCheckSyncReq* pReq);
4161
void    tFreeSVArbCheckSyncReq(SVArbCheckSyncReq* pRsp);
4162
4163
typedef struct {
4164
  char*   arbToken;
4165
  char*   member0Token;
4166
  char*   member1Token;
4167
  int32_t vgId;
4168
  int32_t errCode;
4169
} SVArbCheckSyncRsp;
4170
4171
int32_t tSerializeSVArbCheckSyncRsp(void* buf, int32_t bufLen, SVArbCheckSyncRsp* pRsp);
4172
int32_t tDeserializeSVArbCheckSyncRsp(void* buf, int32_t bufLen, SVArbCheckSyncRsp* pRsp);
4173
void    tFreeSVArbCheckSyncRsp(SVArbCheckSyncRsp* pRsp);
4174
4175
typedef struct {
4176
  char*   arbToken;
4177
  int64_t arbTerm;
4178
  char*   memberToken;
4179
  int8_t  force;
4180
} SVArbSetAssignedLeaderReq;
4181
4182
int32_t tSerializeSVArbSetAssignedLeaderReq(void* buf, int32_t bufLen, SVArbSetAssignedLeaderReq* pReq);
4183
int32_t tDeserializeSVArbSetAssignedLeaderReq(void* buf, int32_t bufLen, SVArbSetAssignedLeaderReq* pReq);
4184
void    tFreeSVArbSetAssignedLeaderReq(SVArbSetAssignedLeaderReq* pReq);
4185
4186
typedef struct {
4187
  char* data;
4188
} SVAuditRecordReq;
4189
int32_t tSerializeSVAuditRecordReq(void* buf, int32_t bufLen, SVAuditRecordReq* pReq);
4190
int32_t tDeserializeSVAuditRecordReq(void* buf, int32_t bufLen, SVAuditRecordReq* pReq);
4191
void    tFreeSVAuditRecordReq(SVAuditRecordReq* pReq);
4192
4193
typedef struct {
4194
  char*   arbToken;
4195
  char*   memberToken;
4196
  int32_t vgId;
4197
} SVArbSetAssignedLeaderRsp;
4198
4199
int32_t tSerializeSVArbSetAssignedLeaderRsp(void* buf, int32_t bufLen, SVArbSetAssignedLeaderRsp* pRsp);
4200
int32_t tDeserializeSVArbSetAssignedLeaderRsp(void* buf, int32_t bufLen, SVArbSetAssignedLeaderRsp* pRsp);
4201
void    tFreeSVArbSetAssignedLeaderRsp(SVArbSetAssignedLeaderRsp* pRsp);
4202
4203
typedef struct {
4204
  int32_t dnodeId;
4205
  char*   token;
4206
} SMArbUpdateGroupMember;
4207
4208
typedef struct {
4209
  int32_t dnodeId;
4210
  char*   token;
4211
  int8_t  acked;
4212
} SMArbUpdateGroupAssigned;
4213
4214
typedef struct {
4215
  int32_t                  vgId;
4216
  int64_t                  dbUid;
4217
  SMArbUpdateGroupMember   members[2];
4218
  int8_t                   isSync;
4219
  int8_t                   assignedAcked;
4220
  SMArbUpdateGroupAssigned assignedLeader;
4221
  int64_t                  version;
4222
  int32_t                  code;
4223
  int64_t                  updateTimeMs;
4224
} SMArbUpdateGroup;
4225
4226
typedef struct {
4227
  SArray* updateArray;  // SMArbUpdateGroup
4228
} SMArbUpdateGroupBatchReq;
4229
4230
int32_t tSerializeSMArbUpdateGroupBatchReq(void* buf, int32_t bufLen, SMArbUpdateGroupBatchReq* pReq);
4231
int32_t tDeserializeSMArbUpdateGroupBatchReq(void* buf, int32_t bufLen, SMArbUpdateGroupBatchReq* pReq);
4232
void    tFreeSMArbUpdateGroupBatchReq(SMArbUpdateGroupBatchReq* pReq);
4233
4234
typedef struct {
4235
  char queryStrId[TSDB_QUERY_ID_LEN];
4236
} SKillQueryReq;
4237
4238
int32_t tSerializeSKillQueryReq(void* buf, int32_t bufLen, SKillQueryReq* pReq);
4239
int32_t tDeserializeSKillQueryReq(void* buf, int32_t bufLen, SKillQueryReq* pReq);
4240
4241
typedef struct {
4242
  uint32_t connId;
4243
} SKillConnReq;
4244
4245
int32_t tSerializeSKillConnReq(void* buf, int32_t bufLen, SKillConnReq* pReq);
4246
int32_t tDeserializeSKillConnReq(void* buf, int32_t bufLen, SKillConnReq* pReq);
4247
4248
typedef struct {
4249
  int32_t transId;
4250
} SKillTransReq;
4251
4252
int32_t tSerializeSKillTransReq(void* buf, int32_t bufLen, SKillTransReq* pReq);
4253
int32_t tDeserializeSKillTransReq(void* buf, int32_t bufLen, SKillTransReq* pReq);
4254
4255
typedef struct {
4256
  int32_t useless;  // useless
4257
  int32_t sqlLen;
4258
  char*   sql;
4259
} SBalanceVgroupReq;
4260
4261
int32_t tSerializeSBalanceVgroupReq(void* buf, int32_t bufLen, SBalanceVgroupReq* pReq);
4262
int32_t tDeserializeSBalanceVgroupReq(void* buf, int32_t bufLen, SBalanceVgroupReq* pReq);
4263
void    tFreeSBalanceVgroupReq(SBalanceVgroupReq* pReq);
4264
4265
typedef struct {
4266
  int32_t useless;  // useless
4267
  int32_t sqlLen;
4268
  char*   sql;
4269
} SAssignLeaderReq;
4270
4271
int32_t tSerializeSAssignLeaderReq(void* buf, int32_t bufLen, SAssignLeaderReq* pReq);
4272
int32_t tDeserializeSAssignLeaderReq(void* buf, int32_t bufLen, SAssignLeaderReq* pReq);
4273
void    tFreeSAssignLeaderReq(SAssignLeaderReq* pReq);
4274
typedef struct {
4275
  int32_t vgId1;
4276
  int32_t vgId2;
4277
} SMergeVgroupReq;
4278
4279
int32_t tSerializeSMergeVgroupReq(void* buf, int32_t bufLen, SMergeVgroupReq* pReq);
4280
int32_t tDeserializeSMergeVgroupReq(void* buf, int32_t bufLen, SMergeVgroupReq* pReq);
4281
4282
typedef struct {
4283
  int32_t vgId;
4284
  int32_t dnodeId1;
4285
  int32_t dnodeId2;
4286
  int32_t dnodeId3;
4287
  int32_t sqlLen;
4288
  char*   sql;
4289
} SRedistributeVgroupReq;
4290
4291
int32_t tSerializeSRedistributeVgroupReq(void* buf, int32_t bufLen, SRedistributeVgroupReq* pReq);
4292
int32_t tDeserializeSRedistributeVgroupReq(void* buf, int32_t bufLen, SRedistributeVgroupReq* pReq);
4293
void    tFreeSRedistributeVgroupReq(SRedistributeVgroupReq* pReq);
4294
4295
typedef struct {
4296
  int32_t reserved;
4297
  int32_t vgId;
4298
  int32_t sqlLen;
4299
  char*   sql;
4300
  char    db[TSDB_DB_FNAME_LEN];
4301
} SBalanceVgroupLeaderReq;
4302
4303
int32_t tSerializeSBalanceVgroupLeaderReq(void* buf, int32_t bufLen, SBalanceVgroupLeaderReq* pReq);
4304
int32_t tDeserializeSBalanceVgroupLeaderReq(void* buf, int32_t bufLen, SBalanceVgroupLeaderReq* pReq);
4305
void    tFreeSBalanceVgroupLeaderReq(SBalanceVgroupLeaderReq* pReq);
4306
4307
typedef struct {
4308
  int32_t vgId;
4309
} SForceBecomeFollowerReq;
4310
4311
int32_t tSerializeSForceBecomeFollowerReq(void* buf, int32_t bufLen, SForceBecomeFollowerReq* pReq);
4312
// int32_t tDeserializeSForceBecomeFollowerReq(void* buf, int32_t bufLen, SForceBecomeFollowerReq* pReq);
4313
4314
typedef struct {
4315
  int32_t vgId;
4316
  bool    force;
4317
} SSplitVgroupReq;
4318
4319
int32_t tSerializeSSplitVgroupReq(void* buf, int32_t bufLen, SSplitVgroupReq* pReq);
4320
int32_t tDeserializeSSplitVgroupReq(void* buf, int32_t bufLen, SSplitVgroupReq* pReq);
4321
4322
typedef struct {
4323
  char user[TSDB_USER_LEN];
4324
  char spi;
4325
  char encrypt;
4326
  char secret[TSDB_PASSWORD_LEN];
4327
  char ckey[TSDB_PASSWORD_LEN];
4328
} SAuthReq, SAuthRsp;
4329
4330
// int32_t tSerializeSAuthReq(void* buf, int32_t bufLen, SAuthReq* pReq);
4331
// int32_t tDeserializeSAuthReq(void* buf, int32_t bufLen, SAuthReq* pReq);
4332
4333
typedef struct {
4334
  int32_t statusCode;
4335
  char    details[1024];
4336
} SServerStatusRsp;
4337
4338
int32_t tSerializeSServerStatusRsp(void* buf, int32_t bufLen, SServerStatusRsp* pRsp);
4339
int32_t tDeserializeSServerStatusRsp(void* buf, int32_t bufLen, SServerStatusRsp* pRsp);
4340
4341
/**
4342
 * The layout of the query message payload is as following:
4343
 * +--------------------+---------------------------------+
4344
 * |Sql statement       | Physical plan                   |
4345
 * |(denoted by sqlLen) |(In JSON, denoted by contentLen) |
4346
 * +--------------------+---------------------------------+
4347
 */
4348
typedef struct SSubQueryMsg {
4349
  SMsgHead header;
4350
  uint64_t sId;
4351
  uint64_t queryId;
4352
  uint64_t clientId;
4353
  uint64_t taskId;
4354
  int64_t  refId;
4355
  int32_t  execId;
4356
  int32_t  msgMask;
4357
  int32_t  subQType;
4358
  int8_t   taskType;
4359
  int8_t   explain;
4360
  int8_t   needFetch;
4361
  int8_t   compress;
4362
  uint32_t sqlLen;
4363
  char*    sql;
4364
  uint32_t msgLen;
4365
  char*    msg;
4366
  SArray*  subEndPoints;  // subJobs's endpoints, element is SDownstreamSourceNode*
4367
} SSubQueryMsg;
4368
4369
int32_t tSerializeSSubQueryMsg(void* buf, int32_t bufLen, SSubQueryMsg* pReq);
4370
int32_t tDeserializeSSubQueryMsg(void* buf, int32_t bufLen, SSubQueryMsg* pReq);
4371
void    tFreeSSubQueryMsg(SSubQueryMsg* pReq);
4372
4373
typedef struct {
4374
  SMsgHead header;
4375
  uint64_t sId;
4376
  uint64_t queryId;
4377
  uint64_t taskId;
4378
} SSinkDataReq;
4379
4380
typedef struct {
4381
  SMsgHead header;
4382
  uint64_t sId;
4383
  uint64_t queryId;
4384
  uint64_t clientId;
4385
  uint64_t taskId;
4386
  int32_t  execId;
4387
  int32_t  taskType;
4388
} SQueryContinueReq;
4389
4390
typedef struct {
4391
  SMsgHead header;
4392
  uint64_t sId;
4393
  uint64_t queryId;
4394
  uint64_t taskId;
4395
} SResReadyReq;
4396
4397
typedef struct {
4398
  int32_t code;
4399
  char    tbFName[TSDB_TABLE_FNAME_LEN];
4400
  int32_t sversion;
4401
  int32_t tversion;
4402
} SResReadyRsp;
4403
4404
typedef enum { OP_GET_PARAM = 1, OP_NOTIFY_PARAM } SOperatorParamType;
4405
4406
typedef struct SOperatorParam {
4407
  int32_t opType;
4408
  int32_t downstreamIdx;
4409
  void*   value;
4410
  SArray* pChildren;  // SArray<SOperatorParam*>
4411
  bool    reUse;
4412
} SOperatorParam;
4413
4414
void freeOperatorParam(SOperatorParam* pParam, SOperatorParamType type);
4415
4416
// virtual table's colId to origin table's colname
4417
typedef struct SColIdNameKV {
4418
  col_id_t colId;
4419
  char     colName[TSDB_COL_NAME_LEN];
4420
} SColIdNameKV;
4421
4422
#define COL_MASK_ON   ((int8_t)0x1)
4423
#define IS_MASK_ON(c) (((c)->flags & 0x01) == COL_MASK_ON)
4424
#define COL_SET_MASK_ON(c)     \
4425
  do {                         \
4426
    (c)->flags |= COL_MASK_ON; \
4427
  } while (0)
4428
4429
typedef struct SColNameFlag {
4430
  col_id_t colId;
4431
  char     colName[TSDB_COL_NAME_LEN];
4432
  int8_t   flags;  // 0x01: COL_MASK_ON
4433
} SColNameFlag;
4434
4435
typedef struct SColIdPair {
4436
  col_id_t  vtbColId;
4437
  col_id_t  orgColId;
4438
  SDataType type;
4439
} SColIdPair;
4440
4441
typedef struct SColIdSlotIdPair {
4442
  int32_t  vtbSlotId;
4443
  col_id_t orgColId;
4444
} SColIdSlotIdPair;
4445
4446
typedef struct SOrgTbInfo {
4447
  int32_t vgId;
4448
  char    tbName[TSDB_TABLE_FNAME_LEN];
4449
  SArray* colMap;  // SArray<SColIdNameKV>
4450
} SOrgTbInfo;
4451
4452
void destroySOrgTbInfo(void *info);
4453
4454
typedef enum {
4455
  DYN_TYPE_STB_JOIN = 1,
4456
  DYN_TYPE_VSTB_SINGLE_SCAN,
4457
  DYN_TYPE_VSTB_BATCH_SCAN,
4458
  DYN_TYPE_VSTB_WIN_SCAN,
4459
} ETableScanDynType;
4460
4461
typedef enum {
4462
  DYN_TYPE_SCAN_PARAM = 1,
4463
  NOTIFY_TYPE_SCAN_PARAM,
4464
} ETableScanGetParamType;
4465
4466
typedef struct STableScanOperatorParam {
4467
  ETableScanGetParamType paramType;
4468
  /* for building scan data source */
4469
  bool                   tableSeq;
4470
  bool                   isNewParam;
4471
  uint64_t               groupid;
4472
  SArray*                pUidList;
4473
  SOrgTbInfo*            pOrgTbInfo;
4474
  SArray*                pBatchTbInfo;  // SArray<SOrgTbInfo>
4475
  SArray*                pTagList;
4476
  STimeWindow            window;
4477
  ETableScanDynType      dynType;
4478
  /* for notifying source step done */
4479
  bool                   notifyToProcess;  // received notify STEP DONE message
4480
  TSKEY                  notifyTs;         // notify timestamp
4481
} STableScanOperatorParam;
4482
4483
typedef struct STagScanOperatorParam {
4484
  tb_uid_t vcUid;
4485
} STagScanOperatorParam;
4486
4487
typedef struct SRefColIdGroup {
4488
  SArray* pSlotIdList;  // SArray<int32_t>
4489
} SRefColIdGroup;
4490
4491
typedef struct SVTableScanOperatorParam {
4492
  uint64_t        uid;
4493
  STimeWindow     window;
4494
  SOperatorParam* pTagScanOp;
4495
  SArray*         pOpParamArray;  // SArray<SOperatorParam>
4496
  SArray*         pRefColGroups;  // SArray<SRefColIdGroup>
4497
} SVTableScanOperatorParam;
4498
4499
typedef struct SMergeOperatorParam {
4500
  int32_t         winNum;
4501
} SMergeOperatorParam;
4502
4503
typedef struct SAggOperatorParam {
4504
  bool            needCleanRes;
4505
} SAggOperatorParam;
4506
4507
typedef struct SExternalWindowOperatorParam {
4508
  SArray*         ExtWins;  // SArray<SExtWinTimeWindow>
4509
} SExternalWindowOperatorParam;
4510
4511
typedef struct SDynQueryCtrlOperatorParam {
4512
  STimeWindow    window;
4513
} SDynQueryCtrlOperatorParam;
4514
4515
struct SStreamRuntimeFuncInfo;
4516
typedef struct {
4517
  SMsgHead        header;
4518
  uint64_t        sId;
4519
  uint64_t        queryId;
4520
  uint64_t        clientId;
4521
  uint64_t        taskId;
4522
  uint64_t        srcTaskId;  // used for subQ
4523
  uint64_t        blockIdx;   // used for subQ
4524
  int32_t         execId;
4525
  SOperatorParam* pOpParam;
4526
4527
  // used for new-stream
4528
  struct SStreamRuntimeFuncInfo* pStRtFuncInfo;
4529
  bool                           reset;
4530
  bool                           dynTbname;
4531
  // used for new-stream
4532
} SResFetchReq;
4533
4534
int32_t tSerializeSResFetchReq(void* buf, int32_t bufLen, SResFetchReq* pReq, bool needStreamRtInfo, bool needStreamGrpInfo);
4535
int32_t tDeserializeSResFetchReq(void* buf, int32_t bufLen, SResFetchReq* pReq);
4536
void    tDestroySResFetchReq(SResFetchReq* pReq);
4537
typedef struct {
4538
  SMsgHead header;
4539
  uint64_t clientId;
4540
} SSchTasksStatusReq;
4541
4542
typedef struct {
4543
  uint64_t queryId;
4544
  uint64_t clientId;
4545
  uint64_t taskId;
4546
  int64_t  refId;
4547
  int32_t  subJobId;
4548
  int32_t  execId;
4549
  int8_t   status;
4550
} STaskStatus;
4551
4552
typedef struct {
4553
  int64_t refId;
4554
  SArray* taskStatus;  // SArray<STaskStatus>
4555
} SSchedulerStatusRsp;
4556
4557
typedef struct {
4558
  uint64_t queryId;
4559
  uint64_t taskId;
4560
  int8_t   action;
4561
} STaskAction;
4562
4563
typedef struct SQueryNodeEpId {
4564
  int32_t nodeId;  // vgId or qnodeId
4565
  SEp     ep;
4566
} SQueryNodeEpId;
4567
4568
typedef struct {
4569
  SMsgHead       header;
4570
  uint64_t       clientId;
4571
  SQueryNodeEpId epId;
4572
  SArray*        taskAction;  // SArray<STaskAction>
4573
} SSchedulerHbReq;
4574
4575
int32_t tSerializeSSchedulerHbReq(void* buf, int32_t bufLen, SSchedulerHbReq* pReq);
4576
int32_t tDeserializeSSchedulerHbReq(void* buf, int32_t bufLen, SSchedulerHbReq* pReq);
4577
void    tFreeSSchedulerHbReq(SSchedulerHbReq* pReq);
4578
4579
typedef struct {
4580
  SQueryNodeEpId epId;
4581
  SArray*        taskStatus;  // SArray<STaskStatus>
4582
} SSchedulerHbRsp;
4583
4584
int32_t tSerializeSSchedulerHbRsp(void* buf, int32_t bufLen, SSchedulerHbRsp* pRsp);
4585
int32_t tDeserializeSSchedulerHbRsp(void* buf, int32_t bufLen, SSchedulerHbRsp* pRsp);
4586
void    tFreeSSchedulerHbRsp(SSchedulerHbRsp* pRsp);
4587
4588
typedef struct {
4589
  SMsgHead header;
4590
  uint64_t sId;
4591
  uint64_t queryId;
4592
  uint64_t clientId;
4593
  uint64_t taskId;
4594
  int64_t  refId;
4595
  int32_t  execId;
4596
} STaskCancelReq;
4597
4598
typedef struct {
4599
  int32_t code;
4600
} STaskCancelRsp;
4601
4602
typedef struct {
4603
  SMsgHead header;
4604
  uint64_t sId;
4605
  uint64_t queryId;
4606
  uint64_t clientId;
4607
  uint64_t taskId;
4608
  int64_t  refId;
4609
  int32_t  execId;
4610
} STaskDropReq;
4611
4612
int32_t tSerializeSTaskDropReq(void* buf, int32_t bufLen, STaskDropReq* pReq);
4613
int32_t tDeserializeSTaskDropReq(void* buf, int32_t bufLen, STaskDropReq* pReq);
4614
4615
typedef enum {
4616
  TASK_NOTIFY_FINISHED = 1,
4617
} ETaskNotifyType;
4618
4619
typedef struct {
4620
  SMsgHead        header;
4621
  uint64_t        sId;
4622
  uint64_t        queryId;
4623
  uint64_t        clientId;
4624
  uint64_t        taskId;
4625
  int64_t         refId;
4626
  int32_t         execId;
4627
  ETaskNotifyType type;
4628
} STaskNotifyReq;
4629
4630
int32_t tSerializeSTaskNotifyReq(void* buf, int32_t bufLen, STaskNotifyReq* pReq);
4631
int32_t tDeserializeSTaskNotifyReq(void* buf, int32_t bufLen, STaskNotifyReq* pReq);
4632
4633
int32_t tSerializeSQueryTableRsp(void* buf, int32_t bufLen, SQueryTableRsp* pRsp);
4634
int32_t tDeserializeSQueryTableRsp(void* buf, int32_t bufLen, SQueryTableRsp* pRsp);
4635
4636
typedef struct {
4637
  int32_t code;
4638
} STaskDropRsp;
4639
4640
#define STREAM_TRIGGER_AT_ONCE                 1
4641
#define STREAM_TRIGGER_WINDOW_CLOSE            2
4642
#define STREAM_TRIGGER_MAX_DELAY               3
4643
#define STREAM_TRIGGER_FORCE_WINDOW_CLOSE      4
4644
#define STREAM_TRIGGER_CONTINUOUS_WINDOW_CLOSE 5
4645
4646
#define STREAM_DEFAULT_IGNORE_EXPIRED 1
4647
#define STREAM_FILL_HISTORY_ON        1
4648
#define STREAM_FILL_HISTORY_OFF       0
4649
#define STREAM_DEFAULT_FILL_HISTORY   STREAM_FILL_HISTORY_OFF
4650
#define STREAM_DEFAULT_IGNORE_UPDATE  1
4651
#define STREAM_CREATE_STABLE_TRUE     1
4652
#define STREAM_CREATE_STABLE_FALSE    0
4653
4654
typedef struct SVgroupVer {
4655
  int32_t vgId;
4656
  int64_t ver;
4657
} SVgroupVer;
4658
4659
enum {
4660
  TOPIC_SUB_TYPE__DB = 1,
4661
  TOPIC_SUB_TYPE__TABLE,
4662
  TOPIC_SUB_TYPE__COLUMN,
4663
};
4664
4665
#define DEFAULT_MAX_POLL_INTERVAL  300000
4666
#define DEFAULT_SESSION_TIMEOUT    12000
4667
#define DEFAULT_MAX_POLL_WAIT_TIME 1000
4668
#define DEFAULT_MIN_POLL_ROWS      4096
4669
4670
typedef struct {
4671
  char   name[TSDB_TOPIC_FNAME_LEN];  // accout.topic
4672
  int8_t igExists;
4673
  int8_t subType;
4674
  int8_t withMeta;
4675
  char*  sql;
4676
  char   subDbName[TSDB_DB_FNAME_LEN];
4677
  char*  ast;
4678
  char   subStbName[TSDB_TABLE_FNAME_LEN];
4679
  int8_t reload;
4680
} SCMCreateTopicReq;
4681
4682
int32_t tSerializeSCMCreateTopicReq(void* buf, int32_t bufLen, const SCMCreateTopicReq* pReq);
4683
int32_t tDeserializeSCMCreateTopicReq(void* buf, int32_t bufLen, SCMCreateTopicReq* pReq);
4684
void    tFreeSCMCreateTopicReq(SCMCreateTopicReq* pReq);
4685
4686
typedef struct {
4687
  int64_t consumerId;
4688
} SMqConsumerRecoverMsg, SMqConsumerClearMsg;
4689
4690
typedef struct {
4691
  int64_t consumerId;
4692
  char    cgroup[TSDB_CGROUP_LEN];
4693
  char    clientId[TSDB_CLIENT_ID_LEN];
4694
  char    user[TSDB_USER_LEN];
4695
  char    fqdn[TSDB_FQDN_LEN];
4696
  SArray* topicNames;  // SArray<char**>
4697
4698
  int8_t  withTbName;
4699
  int8_t  autoCommit;
4700
  int32_t autoCommitInterval;
4701
  int8_t  resetOffsetCfg;
4702
  int8_t  enableReplay;
4703
  int8_t  enableBatchMeta;
4704
  int32_t sessionTimeoutMs;
4705
  int32_t maxPollIntervalMs;
4706
  int64_t ownerId;
4707
} SCMSubscribeReq;
4708
4709
0
static FORCE_INLINE int32_t tSerializeSCMSubscribeReq(void** buf, const SCMSubscribeReq* pReq) {
4710
0
  int32_t tlen = 0;
4711
0
  tlen += taosEncodeFixedI64(buf, pReq->consumerId);
4712
0
  tlen += taosEncodeString(buf, pReq->cgroup);
4713
0
  tlen += taosEncodeString(buf, pReq->clientId);
4714
0
4715
0
  int32_t topicNum = taosArrayGetSize(pReq->topicNames);
4716
0
  tlen += taosEncodeFixedI32(buf, topicNum);
4717
0
4718
0
  for (int32_t i = 0; i < topicNum; i++) {
4719
0
    tlen += taosEncodeString(buf, (char*)taosArrayGetP(pReq->topicNames, i));
4720
0
  }
4721
0
4722
0
  tlen += taosEncodeFixedI8(buf, pReq->withTbName);
4723
0
  tlen += taosEncodeFixedI8(buf, pReq->autoCommit);
4724
0
  tlen += taosEncodeFixedI32(buf, pReq->autoCommitInterval);
4725
0
  tlen += taosEncodeFixedI8(buf, pReq->resetOffsetCfg);
4726
0
  tlen += taosEncodeFixedI8(buf, pReq->enableReplay);
4727
0
  tlen += taosEncodeFixedI8(buf, pReq->enableBatchMeta);
4728
0
  tlen += taosEncodeFixedI32(buf, pReq->sessionTimeoutMs);
4729
0
  tlen += taosEncodeFixedI32(buf, pReq->maxPollIntervalMs);
4730
0
  tlen += taosEncodeString(buf, pReq->user);
4731
0
  tlen += taosEncodeString(buf, pReq->fqdn);
4732
0
4733
0
  return tlen;
4734
0
}
Unexecuted instantiation: sql-fuzzer.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: parser.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: parTranslater.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: parUtil.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: parAstParser.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: parAuthenticator.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: parCalcConst.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: parInsertSql.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: parInsertUtil.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: taos_lemon_sql.tab.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: parAstCreater.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: parInsertSml.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: planner.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: planLogicCreater.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: planOptimizer.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: planPhysiCreater.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: planScaleOut.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: planSpliter.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: planUtil.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: planValidator.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: catalog.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: ctgAsync.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: ctgCache.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: ctgDbg.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: ctgRemote.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: ctgRent.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: ctgUtil.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: functionMgt.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: tudf.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: builtins.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: builtinsimpl.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: thistogram.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: tpercentile.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: tavgfunction.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: tminmax.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: tminmaxavx.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: filter.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: scalar.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: sclfunc.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: sclvector.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: nodesCloneFuncs.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: nodesCodeFuncs.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: nodesEqualFuncs.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: nodesMatchFuncs.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: nodesMsgFuncs.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: nodesToSQLFuncs.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: nodesTraverseFuncs.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: nodesUtilFuncs.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: queryUtil.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: querymsg.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: trans.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: transCli.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: transComm.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: transSasl.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: transSvr.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: transTLS.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: thttp.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: geomFunc.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: tconfig.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: tdigest.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: tlog.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: tmempool.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: mpDirect.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: systable.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: tdatablock.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: tdataformat.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: tglobal.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: tmisce.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: tname.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: tpriv.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: ttime.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: tvariant.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: streamMsg.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: tmsg.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: xnode.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: tencrypt.c:tSerializeSCMSubscribeReq
Unexecuted instantiation: streamJson.c:tSerializeSCMSubscribeReq
4735
4736
0
static FORCE_INLINE int32_t tDeserializeSCMSubscribeReq(void* buf, SCMSubscribeReq* pReq, int32_t len) {
4737
0
  void* start = buf;
4738
0
  buf = taosDecodeFixedI64(buf, &pReq->consumerId);
4739
0
  buf = taosDecodeStringTo(buf, pReq->cgroup);
4740
0
  buf = taosDecodeStringTo(buf, pReq->clientId);
4741
0
4742
0
  int32_t topicNum = 0;
4743
0
  buf = taosDecodeFixedI32(buf, &topicNum);
4744
0
4745
0
  pReq->topicNames = taosArrayInit(topicNum, sizeof(void*));
4746
0
  if (pReq->topicNames == NULL) {
4747
0
    return terrno;
4748
0
  }
4749
0
  for (int32_t i = 0; i < topicNum; i++) {
4750
0
    char* name = NULL;
4751
0
    buf = taosDecodeString(buf, &name);
4752
0
    if (taosArrayPush(pReq->topicNames, &name) == NULL) {
4753
0
      return terrno;
4754
0
    }
4755
0
  }
4756
0
4757
0
  buf = taosDecodeFixedI8(buf, &pReq->withTbName);
4758
0
  buf = taosDecodeFixedI8(buf, &pReq->autoCommit);
4759
0
  buf = taosDecodeFixedI32(buf, &pReq->autoCommitInterval);
4760
0
  buf = taosDecodeFixedI8(buf, &pReq->resetOffsetCfg);
4761
0
  buf = taosDecodeFixedI8(buf, &pReq->enableReplay);
4762
0
  buf = taosDecodeFixedI8(buf, &pReq->enableBatchMeta);
4763
0
  if ((char*)buf - (char*)start < len) {
4764
0
    buf = taosDecodeFixedI32(buf, &pReq->sessionTimeoutMs);
4765
0
    buf = taosDecodeFixedI32(buf, &pReq->maxPollIntervalMs);
4766
0
    buf = taosDecodeStringTo(buf, pReq->user);
4767
0
    buf = taosDecodeStringTo(buf, pReq->fqdn);
4768
0
  } else {
4769
0
    pReq->sessionTimeoutMs = DEFAULT_SESSION_TIMEOUT;
4770
0
    pReq->maxPollIntervalMs = DEFAULT_MAX_POLL_INTERVAL;
4771
0
  }
4772
0
4773
0
  return 0;
4774
0
}
Unexecuted instantiation: sql-fuzzer.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: parser.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: parTranslater.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: parUtil.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: parAstParser.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: parAuthenticator.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: parCalcConst.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: parInsertSql.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: parInsertUtil.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: taos_lemon_sql.tab.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: parAstCreater.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: parInsertSml.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: planner.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: planLogicCreater.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: planOptimizer.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: planPhysiCreater.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: planScaleOut.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: planSpliter.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: planUtil.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: planValidator.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: catalog.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: ctgAsync.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: ctgCache.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: ctgDbg.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: ctgRemote.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: ctgRent.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: ctgUtil.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: functionMgt.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: tudf.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: builtins.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: builtinsimpl.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: thistogram.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: tpercentile.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: tavgfunction.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: tminmax.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: tminmaxavx.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: filter.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: scalar.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: sclfunc.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: sclvector.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: nodesCloneFuncs.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: nodesCodeFuncs.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: nodesEqualFuncs.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: nodesMatchFuncs.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: nodesMsgFuncs.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: nodesToSQLFuncs.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: nodesTraverseFuncs.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: nodesUtilFuncs.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: queryUtil.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: querymsg.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: trans.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: transCli.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: transComm.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: transSasl.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: transSvr.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: transTLS.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: thttp.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: geomFunc.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: tconfig.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: tdigest.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: tlog.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: tmempool.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: mpDirect.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: systable.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: tdatablock.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: tdataformat.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: tglobal.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: tmisce.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: tname.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: tpriv.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: ttime.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: tvariant.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: streamMsg.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: tmsg.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: xnode.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: tencrypt.c:tDeserializeSCMSubscribeReq
Unexecuted instantiation: streamJson.c:tDeserializeSCMSubscribeReq
4775
4776
typedef struct {
4777
  char    key[TSDB_SUBSCRIBE_KEY_LEN];
4778
  SArray* removedConsumers;  // SArray<int64_t>
4779
  SArray* newConsumers;      // SArray<int64_t>
4780
} SMqRebInfo;
4781
4782
0
static FORCE_INLINE SMqRebInfo* tNewSMqRebSubscribe(const char* key) {
4783
0
  SMqRebInfo* pRebInfo = (SMqRebInfo*)taosMemoryCalloc(1, sizeof(SMqRebInfo));
4784
0
  if (pRebInfo == NULL) {
4785
0
    return NULL;
4786
0
  }
4787
0
  tstrncpy(pRebInfo->key, key, TSDB_SUBSCRIBE_KEY_LEN);
4788
0
  pRebInfo->removedConsumers = taosArrayInit(0, sizeof(int64_t));
4789
0
  if (pRebInfo->removedConsumers == NULL) {
4790
0
    goto _err;
4791
0
  }
4792
0
  pRebInfo->newConsumers = taosArrayInit(0, sizeof(int64_t));
4793
0
  if (pRebInfo->newConsumers == NULL) {
4794
0
    goto _err;
4795
0
  }
4796
0
  return pRebInfo;
4797
0
_err:
4798
0
  taosArrayDestroy(pRebInfo->removedConsumers);
4799
0
  taosArrayDestroy(pRebInfo->newConsumers);
4800
0
  taosMemoryFreeClear(pRebInfo);
4801
0
  return NULL;
4802
0
}
Unexecuted instantiation: sql-fuzzer.c:tNewSMqRebSubscribe
Unexecuted instantiation: parser.c:tNewSMqRebSubscribe
Unexecuted instantiation: parTranslater.c:tNewSMqRebSubscribe
Unexecuted instantiation: parUtil.c:tNewSMqRebSubscribe
Unexecuted instantiation: parAstParser.c:tNewSMqRebSubscribe
Unexecuted instantiation: parAuthenticator.c:tNewSMqRebSubscribe
Unexecuted instantiation: parCalcConst.c:tNewSMqRebSubscribe
Unexecuted instantiation: parInsertSql.c:tNewSMqRebSubscribe
Unexecuted instantiation: parInsertUtil.c:tNewSMqRebSubscribe
Unexecuted instantiation: taos_lemon_sql.tab.c:tNewSMqRebSubscribe
Unexecuted instantiation: parAstCreater.c:tNewSMqRebSubscribe
Unexecuted instantiation: parInsertSml.c:tNewSMqRebSubscribe
Unexecuted instantiation: planner.c:tNewSMqRebSubscribe
Unexecuted instantiation: planLogicCreater.c:tNewSMqRebSubscribe
Unexecuted instantiation: planOptimizer.c:tNewSMqRebSubscribe
Unexecuted instantiation: planPhysiCreater.c:tNewSMqRebSubscribe
Unexecuted instantiation: planScaleOut.c:tNewSMqRebSubscribe
Unexecuted instantiation: planSpliter.c:tNewSMqRebSubscribe
Unexecuted instantiation: planUtil.c:tNewSMqRebSubscribe
Unexecuted instantiation: planValidator.c:tNewSMqRebSubscribe
Unexecuted instantiation: catalog.c:tNewSMqRebSubscribe
Unexecuted instantiation: ctgAsync.c:tNewSMqRebSubscribe
Unexecuted instantiation: ctgCache.c:tNewSMqRebSubscribe
Unexecuted instantiation: ctgDbg.c:tNewSMqRebSubscribe
Unexecuted instantiation: ctgRemote.c:tNewSMqRebSubscribe
Unexecuted instantiation: ctgRent.c:tNewSMqRebSubscribe
Unexecuted instantiation: ctgUtil.c:tNewSMqRebSubscribe
Unexecuted instantiation: functionMgt.c:tNewSMqRebSubscribe
Unexecuted instantiation: tudf.c:tNewSMqRebSubscribe
Unexecuted instantiation: builtins.c:tNewSMqRebSubscribe
Unexecuted instantiation: builtinsimpl.c:tNewSMqRebSubscribe
Unexecuted instantiation: thistogram.c:tNewSMqRebSubscribe
Unexecuted instantiation: tpercentile.c:tNewSMqRebSubscribe
Unexecuted instantiation: tavgfunction.c:tNewSMqRebSubscribe
Unexecuted instantiation: tminmax.c:tNewSMqRebSubscribe
Unexecuted instantiation: tminmaxavx.c:tNewSMqRebSubscribe
Unexecuted instantiation: filter.c:tNewSMqRebSubscribe
Unexecuted instantiation: scalar.c:tNewSMqRebSubscribe
Unexecuted instantiation: sclfunc.c:tNewSMqRebSubscribe
Unexecuted instantiation: sclvector.c:tNewSMqRebSubscribe
Unexecuted instantiation: nodesCloneFuncs.c:tNewSMqRebSubscribe
Unexecuted instantiation: nodesCodeFuncs.c:tNewSMqRebSubscribe
Unexecuted instantiation: nodesEqualFuncs.c:tNewSMqRebSubscribe
Unexecuted instantiation: nodesMatchFuncs.c:tNewSMqRebSubscribe
Unexecuted instantiation: nodesMsgFuncs.c:tNewSMqRebSubscribe
Unexecuted instantiation: nodesToSQLFuncs.c:tNewSMqRebSubscribe
Unexecuted instantiation: nodesTraverseFuncs.c:tNewSMqRebSubscribe
Unexecuted instantiation: nodesUtilFuncs.c:tNewSMqRebSubscribe
Unexecuted instantiation: queryUtil.c:tNewSMqRebSubscribe
Unexecuted instantiation: querymsg.c:tNewSMqRebSubscribe
Unexecuted instantiation: trans.c:tNewSMqRebSubscribe
Unexecuted instantiation: transCli.c:tNewSMqRebSubscribe
Unexecuted instantiation: transComm.c:tNewSMqRebSubscribe
Unexecuted instantiation: transSasl.c:tNewSMqRebSubscribe
Unexecuted instantiation: transSvr.c:tNewSMqRebSubscribe
Unexecuted instantiation: transTLS.c:tNewSMqRebSubscribe
Unexecuted instantiation: thttp.c:tNewSMqRebSubscribe
Unexecuted instantiation: geomFunc.c:tNewSMqRebSubscribe
Unexecuted instantiation: tconfig.c:tNewSMqRebSubscribe
Unexecuted instantiation: tdigest.c:tNewSMqRebSubscribe
Unexecuted instantiation: tlog.c:tNewSMqRebSubscribe
Unexecuted instantiation: tmempool.c:tNewSMqRebSubscribe
Unexecuted instantiation: mpDirect.c:tNewSMqRebSubscribe
Unexecuted instantiation: systable.c:tNewSMqRebSubscribe
Unexecuted instantiation: tdatablock.c:tNewSMqRebSubscribe
Unexecuted instantiation: tdataformat.c:tNewSMqRebSubscribe
Unexecuted instantiation: tglobal.c:tNewSMqRebSubscribe
Unexecuted instantiation: tmisce.c:tNewSMqRebSubscribe
Unexecuted instantiation: tname.c:tNewSMqRebSubscribe
Unexecuted instantiation: tpriv.c:tNewSMqRebSubscribe
Unexecuted instantiation: ttime.c:tNewSMqRebSubscribe
Unexecuted instantiation: tvariant.c:tNewSMqRebSubscribe
Unexecuted instantiation: streamMsg.c:tNewSMqRebSubscribe
Unexecuted instantiation: tmsg.c:tNewSMqRebSubscribe
Unexecuted instantiation: xnode.c:tNewSMqRebSubscribe
Unexecuted instantiation: tencrypt.c:tNewSMqRebSubscribe
Unexecuted instantiation: streamJson.c:tNewSMqRebSubscribe
4803
4804
typedef struct {
4805
  int64_t streamId;
4806
  int64_t checkpointId;
4807
  char    streamName[TSDB_STREAM_FNAME_LEN];
4808
} SMStreamDoCheckpointMsg;
4809
4810
typedef struct {
4811
  int64_t status;
4812
} SMVSubscribeRsp;
4813
4814
typedef struct {
4815
  char    name[TSDB_TOPIC_FNAME_LEN];
4816
  int8_t  igNotExists;
4817
  int32_t sqlLen;
4818
  char*   sql;
4819
  int8_t  force;
4820
} SMDropTopicReq;
4821
4822
int32_t tSerializeSMDropTopicReq(void* buf, int32_t bufLen, SMDropTopicReq* pReq);
4823
int32_t tDeserializeSMDropTopicReq(void* buf, int32_t bufLen, SMDropTopicReq* pReq);
4824
void    tFreeSMDropTopicReq(SMDropTopicReq* pReq);
4825
4826
typedef struct {
4827
  char    name[TSDB_TOPIC_FNAME_LEN];
4828
  int8_t  igNotExists;
4829
  int32_t sqlLen;
4830
  char*   sql;
4831
} SMReloadTopicReq;
4832
4833
int32_t tSerializeSMReloadTopicReq(void* buf, int32_t bufLen, SMReloadTopicReq* pReq);
4834
int32_t tDeserializeSMReloadTopicReq(void* buf, int32_t bufLen, SMReloadTopicReq* pReq);
4835
void    tFreeSMReloadTopicReq(SMReloadTopicReq* pReq);
4836
4837
typedef struct {
4838
  char   topic[TSDB_TOPIC_FNAME_LEN];
4839
  char   cgroup[TSDB_CGROUP_LEN];
4840
  int8_t igNotExists;
4841
  int8_t force;
4842
} SMDropCgroupReq;
4843
4844
int32_t tSerializeSMDropCgroupReq(void* buf, int32_t bufLen, SMDropCgroupReq* pReq);
4845
int32_t tDeserializeSMDropCgroupReq(void* buf, int32_t bufLen, SMDropCgroupReq* pReq);
4846
4847
typedef struct {
4848
  int8_t reserved;
4849
} SMDropCgroupRsp;
4850
4851
typedef struct {
4852
  char    name[TSDB_TABLE_FNAME_LEN];
4853
  int8_t  alterType;
4854
  SSchema schema;
4855
} SAlterTopicReq;
4856
4857
typedef struct {
4858
  SMsgHead head;
4859
  char     name[TSDB_TABLE_FNAME_LEN];
4860
  int64_t  tuid;
4861
  int32_t  sverson;
4862
  int32_t  execLen;
4863
  char*    executor;
4864
  int32_t  sqlLen;
4865
  char*    sql;
4866
} SDCreateTopicReq;
4867
4868
typedef struct {
4869
  SMsgHead head;
4870
  char     name[TSDB_TABLE_FNAME_LEN];
4871
  int64_t  tuid;
4872
} SDDropTopicReq;
4873
4874
typedef struct {
4875
  char*      name;
4876
  int64_t    uid;
4877
  int64_t    interval[2];
4878
  int8_t     intervalUnit;
4879
  int16_t    nFuncs;
4880
  col_id_t*  funcColIds;  // column ids specified by user
4881
  func_id_t* funcIds;     // function ids specified by user
4882
} SRSmaParam;
4883
4884
int32_t tEncodeSRSmaParam(SEncoder* pCoder, const SRSmaParam* pRSmaParam);
4885
int32_t tDecodeSRSmaParam(SDecoder* pCoder, SRSmaParam* pRSmaParam);
4886
4887
// TDMT_VND_CREATE_STB ==============
4888
typedef struct SVCreateStbReq {
4889
  char*           name;
4890
  tb_uid_t        suid;
4891
  int8_t          rollup;
4892
  SSchemaWrapper  schemaRow;
4893
  SSchemaWrapper  schemaTag;
4894
  SRSmaParam      rsmaParam;
4895
  int32_t         alterOriDataLen;
4896
  void*           alterOriData;
4897
  int8_t          source;
4898
  int8_t          colCmpred;
4899
  SColCmprWrapper colCmpr;
4900
  int64_t         keep;
4901
  int64_t         ownerId;
4902
  SExtSchema*     pExtSchemas;
4903
  int8_t          virtualStb;
4904
  int8_t          secureDelete;
4905
  int8_t          securityLevel;
4906
} SVCreateStbReq;
4907
4908
int tEncodeSVCreateStbReq(SEncoder* pCoder, const SVCreateStbReq* pReq);
4909
int tDecodeSVCreateStbReq(SDecoder* pCoder, SVCreateStbReq* pReq);
4910
4911
// TDMT_VND_DROP_STB ==============
4912
typedef struct SVDropStbReq {
4913
  char*    name;
4914
  tb_uid_t suid;
4915
} SVDropStbReq;
4916
4917
int32_t tEncodeSVDropStbReq(SEncoder* pCoder, const SVDropStbReq* pReq);
4918
int32_t tDecodeSVDropStbReq(SDecoder* pCoder, SVDropStbReq* pReq);
4919
4920
// TDMT_VND_CREATE_TABLE ==============
4921
0
#define TD_CREATE_IF_NOT_EXISTS       0x1
4922
#define TD_CREATE_NORMAL_TB_IN_STREAM 0x2
4923
#define TD_CREATE_SUB_TB_IN_STREAM    0x4
4924
typedef struct SVCreateTbReq {
4925
  int32_t  flags;
4926
  char*    name;
4927
  tb_uid_t uid;
4928
  int64_t  btime;
4929
  int32_t  ttl;
4930
  int32_t  commentLen;
4931
  char*    comment;
4932
  int8_t   type;
4933
  union {
4934
    struct {
4935
      char*    stbName;  // super table name
4936
      uint8_t  tagNum;
4937
      tb_uid_t suid;
4938
      SArray*  tagName;
4939
      uint8_t* pTag;
4940
    } ctb;
4941
    struct {
4942
      SSchemaWrapper schemaRow;
4943
      int64_t        userId;
4944
    } ntb;
4945
  };
4946
  int32_t         sqlLen;
4947
  char*           sql;
4948
  SColCmprWrapper colCmpr;
4949
  SExtSchema*     pExtSchemas;
4950
  SColRefWrapper  colRef;  // col reference for virtual table
4951
} SVCreateTbReq;
4952
4953
int  tEncodeSVCreateTbReq(SEncoder* pCoder, const SVCreateTbReq* pReq);
4954
int  tDecodeSVCreateTbReq(SDecoder* pCoder, SVCreateTbReq* pReq);
4955
void tDestroySVCreateTbReq(SVCreateTbReq* pReq, int32_t flags);
4956
void tDestroySVSubmitCreateTbReq(SVCreateTbReq* pReq, int32_t flags);
4957
4958
6
static FORCE_INLINE void tdDestroySVCreateTbReq(SVCreateTbReq* req) {
4959
6
  if (NULL == req) {
4960
6
    return;
4961
6
  }
4962
4963
0
  taosMemoryFreeClear(req->sql);
4964
0
  taosMemoryFreeClear(req->name);
4965
0
  taosMemoryFreeClear(req->comment);
4966
0
  if (req->type == TSDB_CHILD_TABLE || req->type == TSDB_VIRTUAL_CHILD_TABLE) {
4967
0
    taosMemoryFreeClear(req->ctb.pTag);
4968
0
    taosMemoryFreeClear(req->ctb.stbName);
4969
0
    taosArrayDestroy(req->ctb.tagName);
4970
0
    req->ctb.tagName = NULL;
4971
0
  } else if (req->type == TSDB_NORMAL_TABLE || req->type == TSDB_VIRTUAL_NORMAL_TABLE) {
4972
0
    taosMemoryFreeClear(req->ntb.schemaRow.pSchema);
4973
0
  }
4974
0
  taosMemoryFreeClear(req->colCmpr.pColCmpr);
4975
0
  taosMemoryFreeClear(req->pExtSchemas);
4976
0
  taosMemoryFreeClear(req->colRef.pColRef);
4977
0
  taosMemoryFreeClear(req->colRef.pTagRef);
4978
0
}
Unexecuted instantiation: sql-fuzzer.c:tdDestroySVCreateTbReq
Unexecuted instantiation: parser.c:tdDestroySVCreateTbReq
Unexecuted instantiation: parTranslater.c:tdDestroySVCreateTbReq
Unexecuted instantiation: parUtil.c:tdDestroySVCreateTbReq
Unexecuted instantiation: parAstParser.c:tdDestroySVCreateTbReq
Unexecuted instantiation: parAuthenticator.c:tdDestroySVCreateTbReq
Unexecuted instantiation: parCalcConst.c:tdDestroySVCreateTbReq
Unexecuted instantiation: parInsertSql.c:tdDestroySVCreateTbReq
Unexecuted instantiation: parInsertUtil.c:tdDestroySVCreateTbReq
Unexecuted instantiation: taos_lemon_sql.tab.c:tdDestroySVCreateTbReq
Unexecuted instantiation: parAstCreater.c:tdDestroySVCreateTbReq
Unexecuted instantiation: parInsertSml.c:tdDestroySVCreateTbReq
Unexecuted instantiation: planner.c:tdDestroySVCreateTbReq
Unexecuted instantiation: planLogicCreater.c:tdDestroySVCreateTbReq
Unexecuted instantiation: planOptimizer.c:tdDestroySVCreateTbReq
Unexecuted instantiation: planPhysiCreater.c:tdDestroySVCreateTbReq
Unexecuted instantiation: planScaleOut.c:tdDestroySVCreateTbReq
Unexecuted instantiation: planSpliter.c:tdDestroySVCreateTbReq
Unexecuted instantiation: planUtil.c:tdDestroySVCreateTbReq
Unexecuted instantiation: planValidator.c:tdDestroySVCreateTbReq
Unexecuted instantiation: catalog.c:tdDestroySVCreateTbReq
Unexecuted instantiation: ctgAsync.c:tdDestroySVCreateTbReq
Unexecuted instantiation: ctgCache.c:tdDestroySVCreateTbReq
Unexecuted instantiation: ctgDbg.c:tdDestroySVCreateTbReq
Unexecuted instantiation: ctgRemote.c:tdDestroySVCreateTbReq
Unexecuted instantiation: ctgRent.c:tdDestroySVCreateTbReq
Unexecuted instantiation: ctgUtil.c:tdDestroySVCreateTbReq
Unexecuted instantiation: functionMgt.c:tdDestroySVCreateTbReq
Unexecuted instantiation: tudf.c:tdDestroySVCreateTbReq
Unexecuted instantiation: builtins.c:tdDestroySVCreateTbReq
Unexecuted instantiation: builtinsimpl.c:tdDestroySVCreateTbReq
Unexecuted instantiation: thistogram.c:tdDestroySVCreateTbReq
Unexecuted instantiation: tpercentile.c:tdDestroySVCreateTbReq
Unexecuted instantiation: tavgfunction.c:tdDestroySVCreateTbReq
Unexecuted instantiation: tminmax.c:tdDestroySVCreateTbReq
Unexecuted instantiation: tminmaxavx.c:tdDestroySVCreateTbReq
Unexecuted instantiation: filter.c:tdDestroySVCreateTbReq
Unexecuted instantiation: scalar.c:tdDestroySVCreateTbReq
Unexecuted instantiation: sclfunc.c:tdDestroySVCreateTbReq
Unexecuted instantiation: sclvector.c:tdDestroySVCreateTbReq
Unexecuted instantiation: nodesCloneFuncs.c:tdDestroySVCreateTbReq
Unexecuted instantiation: nodesCodeFuncs.c:tdDestroySVCreateTbReq
Unexecuted instantiation: nodesEqualFuncs.c:tdDestroySVCreateTbReq
Unexecuted instantiation: nodesMatchFuncs.c:tdDestroySVCreateTbReq
Unexecuted instantiation: nodesMsgFuncs.c:tdDestroySVCreateTbReq
Unexecuted instantiation: nodesToSQLFuncs.c:tdDestroySVCreateTbReq
Unexecuted instantiation: nodesTraverseFuncs.c:tdDestroySVCreateTbReq
nodesUtilFuncs.c:tdDestroySVCreateTbReq
Line
Count
Source
4958
6
static FORCE_INLINE void tdDestroySVCreateTbReq(SVCreateTbReq* req) {
4959
6
  if (NULL == req) {
4960
6
    return;
4961
6
  }
4962
4963
0
  taosMemoryFreeClear(req->sql);
4964
0
  taosMemoryFreeClear(req->name);
4965
0
  taosMemoryFreeClear(req->comment);
4966
0
  if (req->type == TSDB_CHILD_TABLE || req->type == TSDB_VIRTUAL_CHILD_TABLE) {
4967
0
    taosMemoryFreeClear(req->ctb.pTag);
4968
0
    taosMemoryFreeClear(req->ctb.stbName);
4969
0
    taosArrayDestroy(req->ctb.tagName);
4970
0
    req->ctb.tagName = NULL;
4971
0
  } else if (req->type == TSDB_NORMAL_TABLE || req->type == TSDB_VIRTUAL_NORMAL_TABLE) {
4972
0
    taosMemoryFreeClear(req->ntb.schemaRow.pSchema);
4973
0
  }
4974
0
  taosMemoryFreeClear(req->colCmpr.pColCmpr);
4975
0
  taosMemoryFreeClear(req->pExtSchemas);
4976
0
  taosMemoryFreeClear(req->colRef.pColRef);
4977
  taosMemoryFreeClear(req->colRef.pTagRef);
4978
0
}
Unexecuted instantiation: queryUtil.c:tdDestroySVCreateTbReq
Unexecuted instantiation: querymsg.c:tdDestroySVCreateTbReq
Unexecuted instantiation: trans.c:tdDestroySVCreateTbReq
Unexecuted instantiation: transCli.c:tdDestroySVCreateTbReq
Unexecuted instantiation: transComm.c:tdDestroySVCreateTbReq
Unexecuted instantiation: transSasl.c:tdDestroySVCreateTbReq
Unexecuted instantiation: transSvr.c:tdDestroySVCreateTbReq
Unexecuted instantiation: transTLS.c:tdDestroySVCreateTbReq
Unexecuted instantiation: thttp.c:tdDestroySVCreateTbReq
Unexecuted instantiation: geomFunc.c:tdDestroySVCreateTbReq
Unexecuted instantiation: tconfig.c:tdDestroySVCreateTbReq
Unexecuted instantiation: tdigest.c:tdDestroySVCreateTbReq
Unexecuted instantiation: tlog.c:tdDestroySVCreateTbReq
Unexecuted instantiation: tmempool.c:tdDestroySVCreateTbReq
Unexecuted instantiation: mpDirect.c:tdDestroySVCreateTbReq
Unexecuted instantiation: systable.c:tdDestroySVCreateTbReq
Unexecuted instantiation: tdatablock.c:tdDestroySVCreateTbReq
Unexecuted instantiation: tdataformat.c:tdDestroySVCreateTbReq
Unexecuted instantiation: tglobal.c:tdDestroySVCreateTbReq
Unexecuted instantiation: tmisce.c:tdDestroySVCreateTbReq
Unexecuted instantiation: tname.c:tdDestroySVCreateTbReq
Unexecuted instantiation: tpriv.c:tdDestroySVCreateTbReq
Unexecuted instantiation: ttime.c:tdDestroySVCreateTbReq
Unexecuted instantiation: tvariant.c:tdDestroySVCreateTbReq
Unexecuted instantiation: streamMsg.c:tdDestroySVCreateTbReq
Unexecuted instantiation: tmsg.c:tdDestroySVCreateTbReq
Unexecuted instantiation: xnode.c:tdDestroySVCreateTbReq
Unexecuted instantiation: tencrypt.c:tdDestroySVCreateTbReq
Unexecuted instantiation: streamJson.c:tdDestroySVCreateTbReq
4979
4980
typedef struct {
4981
  int32_t nReqs;
4982
  union {
4983
    SVCreateTbReq* pReqs;
4984
    SArray*        pArray;
4985
  };
4986
  int8_t source;  // TD_REQ_FROM_TAOX-taosX or TD_REQ_FROM_APP-taosClient
4987
} SVCreateTbBatchReq;
4988
4989
int  tEncodeSVCreateTbBatchReq(SEncoder* pCoder, const SVCreateTbBatchReq* pReq);
4990
int  tDecodeSVCreateTbBatchReq(SDecoder* pCoder, SVCreateTbBatchReq* pReq);
4991
void tDeleteSVCreateTbBatchReq(SVCreateTbBatchReq* pReq);
4992
4993
typedef struct {
4994
  int32_t        code;
4995
  int32_t        index;  // index in batch req, start from 0
4996
  STableMetaRsp* pMeta;
4997
} SVCreateTbRsp, SVUpdateTbRsp;
4998
4999
int  tEncodeSVCreateTbRsp(SEncoder* pCoder, const SVCreateTbRsp* pRsp);
5000
int  tDecodeSVCreateTbRsp(SDecoder* pCoder, SVCreateTbRsp* pRsp);
5001
void tFreeSVCreateTbRsp(void* param);
5002
5003
int32_t tSerializeSVCreateTbReq(void** buf, SVCreateTbReq* pReq);
5004
void*   tDeserializeSVCreateTbReq(void* buf, SVCreateTbReq* pReq);
5005
5006
typedef struct {
5007
  int32_t nRsps;
5008
  union {
5009
    SVCreateTbRsp* pRsps;
5010
    SArray*        pArray;
5011
  };
5012
} SVCreateTbBatchRsp;
5013
5014
int tEncodeSVCreateTbBatchRsp(SEncoder* pCoder, const SVCreateTbBatchRsp* pRsp);
5015
int tDecodeSVCreateTbBatchRsp(SDecoder* pCoder, SVCreateTbBatchRsp* pRsp);
5016
5017
// int32_t tSerializeSVCreateTbBatchRsp(void* buf, int32_t bufLen, SVCreateTbBatchRsp* pRsp);
5018
// int32_t tDeserializeSVCreateTbBatchRsp(void* buf, int32_t bufLen, SVCreateTbBatchRsp* pRsp);
5019
5020
// TDMT_VND_DROP_TABLE =================
5021
typedef struct {
5022
  char*    name;
5023
  uint64_t suid;  // for tmq in wal format
5024
  int64_t  uid;
5025
  int8_t   igNotExists;
5026
  int8_t   isVirtual;
5027
} SVDropTbReq;
5028
5029
typedef struct {
5030
  int32_t code;
5031
} SVDropTbRsp;
5032
5033
typedef struct {
5034
  int32_t nReqs;
5035
  union {
5036
    SVDropTbReq* pReqs;
5037
    SArray*      pArray;
5038
  };
5039
} SVDropTbBatchReq;
5040
5041
int32_t tEncodeSVDropTbBatchReq(SEncoder* pCoder, const SVDropTbBatchReq* pReq);
5042
int32_t tDecodeSVDropTbBatchReq(SDecoder* pCoder, SVDropTbBatchReq* pReq);
5043
5044
typedef struct {
5045
  int32_t nRsps;
5046
  union {
5047
    SVDropTbRsp* pRsps;
5048
    SArray*      pArray;
5049
  };
5050
} SVDropTbBatchRsp;
5051
5052
int32_t tEncodeSVDropTbBatchRsp(SEncoder* pCoder, const SVDropTbBatchRsp* pRsp);
5053
int32_t tDecodeSVDropTbBatchRsp(SDecoder* pCoder, SVDropTbBatchRsp* pRsp);
5054
5055
// TDMT_VND_ALTER_TABLE =====================
5056
typedef struct SUpdatedTagVal {
5057
  char*    tagName;
5058
  int32_t  colId;
5059
  int8_t   tagType;
5060
  int8_t   tagFree;
5061
  uint32_t nTagVal;
5062
  uint8_t* pTagVal;
5063
  int8_t   isNull;
5064
  SArray*  pTagArray;
5065
  // NOTE: regexp and replacement are only a temporary solution for tag value update,
5066
  // they should be replaced by a more generic solution in the future for full expression
5067
  // support
5068
  char*    regexp;
5069
  char*    replacement;
5070
} SUpdatedTagVal;
5071
5072
typedef struct SUpdateTableTagVal {
5073
  char *tbName;
5074
  SArray* tags; // Array of SUpdatedTagVal
5075
} SUpdateTableTagVal;
5076
5077
typedef struct SVAlterTbReq {
5078
  char*   tbName;
5079
  int8_t  action;
5080
  char*   colName;
5081
  int32_t colId;
5082
  // TSDB_ALTER_TABLE_ADD_COLUMN
5083
  int8_t  type;
5084
  int8_t  flags;
5085
  int32_t bytes;
5086
  // TSDB_ALTER_TABLE_DROP_COLUMN
5087
  // TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES
5088
  int8_t   colModType;
5089
  int32_t  colModBytes;
5090
  char*    colNewName;  // TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME
5091
  char*    tagName;     // TSDB_ALTER_TABLE_UPDATE_TAG_VAL
5092
  int8_t   isNull;
5093
  int8_t   tagType;
5094
  int8_t   tagFree;
5095
  uint32_t nTagVal;
5096
  uint8_t* pTagVal;
5097
  SArray*  pTagArray;
5098
  // TSDB_ALTER_TABLE_UPDATE_OPTIONS
5099
  int8_t   updateTTL;
5100
  int32_t  newTTL;
5101
  int32_t  newCommentLen;
5102
  char*    newComment;
5103
  int64_t  ctimeMs;    // fill by vnode
5104
  int8_t   source;     // TD_REQ_FROM_TAOX-taosX or TD_REQ_FROM_APP-taosClient
5105
  uint32_t compress;   // TSDB_ALTER_TABLE_UPDATE_COLUMN_COMPRESS
5106
  SArray*  pMultiTag;  // TSDB_ALTER_TABLE_ADD_MULTI_TAGS and TSDB_ALTER_TABLE_UPDATE_CHILD_TABLE_TAG_VAL
5107
  SArray*  tables;     // Array of SUpdateTableTagVal, for TSDB_ALTER_TABLE_UPDATE_MULTI_TABLE_TAG_VAL
5108
  int32_t  whereLen;   // [whereLen] & [where] are for TSDB_ALTER_TABLE_UPDATE_CHILD_TABLE_TAG_VAL,
5109
  uint8_t* where;      // [where] is the encode where condition.
5110
  // for Add column
5111
  STypeMod typeMod;
5112
  // TSDB_ALTER_TABLE_ALTER_COLUMN_REF
5113
  char* refDbName;
5114
  char* refTbName;
5115
  char* refColName;
5116
  // TSDB_ALTER_TABLE_REMOVE_COLUMN_REF
5117
} SVAlterTbReq;
5118
5119
int32_t tEncodeSVAlterTbReq(SEncoder* pEncoder, const SVAlterTbReq* pReq);
5120
int32_t tDecodeSVAlterTbReq(SDecoder* pDecoder, SVAlterTbReq* pReq);
5121
void    destroyAlterTbReq(SVAlterTbReq* pReq);
5122
int32_t tDecodeSVAlterTbReqSetCtime(SDecoder* pDecoder, SVAlterTbReq* pReq, int64_t ctimeMs);
5123
void    tfreeMultiTagUpateVal(void* pMultiTag);
5124
void    tfreeUpdateTableTagVal(void* pMultiTable);
5125
5126
typedef struct {
5127
  int32_t        code;
5128
  STableMetaRsp* pMeta;
5129
} SVAlterTbRsp;
5130
5131
int32_t tEncodeSVAlterTbRsp(SEncoder* pEncoder, const SVAlterTbRsp* pRsp);
5132
int32_t tDecodeSVAlterTbRsp(SDecoder* pDecoder, SVAlterTbRsp* pRsp);
5133
// ======================
5134
5135
typedef struct {
5136
  SMsgHead head;
5137
  int64_t  uid;
5138
  int32_t  tid;
5139
  int16_t  tversion;
5140
  int16_t  colId;
5141
  int8_t   type;
5142
  int16_t  bytes;
5143
  int32_t  tagValLen;
5144
  int16_t  numOfTags;
5145
  int32_t  schemaLen;
5146
  char     data[];
5147
} SUpdateTagValReq;
5148
5149
typedef struct {
5150
  SMsgHead head;
5151
} SUpdateTagValRsp;
5152
5153
typedef struct {
5154
  SMsgHead head;
5155
} SVShowTablesReq;
5156
5157
typedef struct {
5158
  SMsgHead head;
5159
  int32_t  id;
5160
} SVShowTablesFetchReq;
5161
5162
typedef struct {
5163
  int64_t useconds;
5164
  int8_t  completed;  // all results are returned to client
5165
  int8_t  precision;
5166
  int8_t  compressed;
5167
  int32_t compLen;
5168
  int32_t numOfRows;
5169
  char    data[];
5170
} SVShowTablesFetchRsp;
5171
5172
typedef struct {
5173
  int64_t consumerId;
5174
  int32_t epoch;
5175
  char    cgroup[TSDB_CGROUP_LEN];
5176
} SMqAskEpReq;
5177
5178
typedef struct {
5179
  int32_t key;
5180
  int32_t valueLen;
5181
  void*   value;
5182
} SKv;
5183
5184
typedef struct {
5185
  int64_t tscRid;
5186
  int8_t  connType;
5187
} SClientHbKey;
5188
5189
typedef struct {
5190
  int64_t tid;
5191
  char    status[TSDB_JOB_STATUS_LEN];
5192
  int64_t startTs;  // sub-task first execution start time, us
5193
} SQuerySubDesc;
5194
5195
typedef enum EQueryExecPhase {
5196
  /* Main phases: 0-9 */
5197
  QUERY_PHASE_NONE     = 0,
5198
  QUERY_PHASE_PARSE    = 1,
5199
  QUERY_PHASE_CATALOG  = 2,
5200
  QUERY_PHASE_PLAN     = 3,
5201
  QUERY_PHASE_SCHEDULE = 4,
5202
  QUERY_PHASE_EXECUTE  = 5,
5203
  QUERY_PHASE_FETCH    = 6,
5204
  QUERY_PHASE_DONE     = 7,
5205
5206
  /* SCHEDULE sub-phases: 4x */
5207
  QUERY_PHASE_SCHEDULE_ANALYSIS       = 41,
5208
  QUERY_PHASE_SCHEDULE_PLANNING       = 42,
5209
  QUERY_PHASE_SCHEDULE_NODE_SELECTION = 43,
5210
5211
  /* EXECUTE sub-phases: 5x */
5212
  QUERY_PHASE_EXEC_DATA_QUERY       = 51,
5213
  QUERY_PHASE_EXEC_MERGE_QUERY      = 52,
5214
  QUERY_PHASE_EXEC_WAITING_CHILDREN = 53,
5215
5216
  /* FETCH sub-phases: 6x */
5217
  QUERY_PHASE_FETCH_IN_PROGRESS = 60,  // A single fetch operation is in progress
5218
  QUERY_PHASE_FETCH_RETURNED    = 61,  // Data returned to client, business logic processing
5219
} EQueryExecPhase;
5220
5221
const char* queryPhaseStr(int32_t phase);
5222
5223
typedef struct {
5224
  char     sql[TSDB_SHOW_SQL_LEN];
5225
  uint64_t queryId;
5226
  int64_t  useconds;
5227
  int64_t  stime;  // timestamp precision ms
5228
  int64_t  reqRid;
5229
  bool     stableQuery;
5230
  bool     isSubQuery;
5231
  char     fqdn[TSDB_FQDN_LEN];
5232
  int32_t  subPlanNum;
5233
  SArray*  subDesc;  // SArray<SQuerySubDesc>
5234
  int32_t  execPhase;       // EQueryExecPhase
5235
  int64_t  phaseStartTime;  // when current phase started, ms
5236
} SQueryDesc;
5237
5238
typedef struct {
5239
  uint32_t connId;
5240
  SArray*  queryDesc;  // SArray<SQueryDesc>
5241
} SQueryHbReqBasic;
5242
5243
typedef struct {
5244
  uint32_t connId;
5245
  uint64_t killRid;
5246
  int32_t  totalDnodes;
5247
  int32_t  onlineDnodes;
5248
  int8_t   killConnection;
5249
  int8_t   align[3];
5250
  SEpSet   epSet;
5251
  SArray*  pQnodeList;
5252
} SQueryHbRspBasic;
5253
5254
typedef struct SAppClusterSummary {
5255
  uint64_t numOfInsertsReq;
5256
  uint64_t numOfInsertRows;
5257
  uint64_t insertElapsedTime;
5258
  uint64_t insertBytes;  // submit to tsdb since launched.
5259
5260
  uint64_t fetchBytes;
5261
  uint64_t numOfQueryReq;
5262
  uint64_t queryElapsedTime;
5263
  uint64_t numOfSlowQueries;
5264
  uint64_t totalRequests;
5265
  uint64_t currentRequests;  // the number of SRequestObj
5266
} SAppClusterSummary;
5267
5268
typedef struct {
5269
  int64_t            appId;
5270
  int32_t            pid;
5271
  char               name[TSDB_APP_NAME_LEN];
5272
  int64_t            startTime;
5273
  SAppClusterSummary summary;
5274
} SAppHbReq;
5275
5276
typedef struct {
5277
  SClientHbKey      connKey;
5278
  int64_t           clusterId;
5279
  SAppHbReq         app;
5280
  SQueryHbReqBasic* query;
5281
  SHashObj*         info;  // hash<Skv.key, Skv>
5282
  char              user[TSDB_USER_LEN];
5283
  char              tokenName[TSDB_TOKEN_NAME_LEN];
5284
  char              userApp[TSDB_APP_NAME_LEN];
5285
  uint32_t          userIp;
5286
  SIpRange          userDualIp;
5287
  char              sVer[TSDB_VERSION_LEN];
5288
  char              cInfo[CONNECTOR_INFO_LEN];
5289
} SClientHbReq;
5290
5291
typedef struct {
5292
  int64_t reqId;
5293
  SArray* reqs;  // SArray<SClientHbReq>
5294
  int64_t ipWhiteListVer;
5295
} SClientHbBatchReq;
5296
5297
typedef struct {
5298
  SClientHbKey      connKey;
5299
  int32_t           status;
5300
  SQueryHbRspBasic* query;
5301
  SArray*           info;  // Array<Skv>
5302
} SClientHbRsp;
5303
5304
typedef struct {
5305
  int64_t       reqId;
5306
  int64_t       rspId;
5307
  int32_t       svrTimestamp;
5308
  SArray*       rsps;  // SArray<SClientHbRsp>
5309
  SMonitorParas monitorParas;
5310
  int8_t        enableAuditDelete;
5311
  int8_t        enableStrongPass;
5312
  int8_t        enableAuditSelect;
5313
  int8_t        enableAuditInsert;
5314
  int8_t        auditLevel;
5315
  union {
5316
    uint32_t flags;
5317
    struct {
5318
      uint32_t sodInitial : 1;   // cluster-wide: 1 = SoD still in initial phase
5319
      uint32_t macActive  : 1;   // cluster-wide: 1 = MAC mandatory mode activated
5320
      uint32_t reserved   : 30;
5321
    };
5322
  };
5323
} SClientHbBatchRsp;
5324
5325
0
static FORCE_INLINE uint32_t hbKeyHashFunc(const char* key, uint32_t keyLen) { return taosIntHash_64(key, keyLen); }
Unexecuted instantiation: sql-fuzzer.c:hbKeyHashFunc
Unexecuted instantiation: parser.c:hbKeyHashFunc
Unexecuted instantiation: parTranslater.c:hbKeyHashFunc
Unexecuted instantiation: parUtil.c:hbKeyHashFunc
Unexecuted instantiation: parAstParser.c:hbKeyHashFunc
Unexecuted instantiation: parAuthenticator.c:hbKeyHashFunc
Unexecuted instantiation: parCalcConst.c:hbKeyHashFunc
Unexecuted instantiation: parInsertSql.c:hbKeyHashFunc
Unexecuted instantiation: parInsertUtil.c:hbKeyHashFunc
Unexecuted instantiation: taos_lemon_sql.tab.c:hbKeyHashFunc
Unexecuted instantiation: parAstCreater.c:hbKeyHashFunc
Unexecuted instantiation: parInsertSml.c:hbKeyHashFunc
Unexecuted instantiation: planner.c:hbKeyHashFunc
Unexecuted instantiation: planLogicCreater.c:hbKeyHashFunc
Unexecuted instantiation: planOptimizer.c:hbKeyHashFunc
Unexecuted instantiation: planPhysiCreater.c:hbKeyHashFunc
Unexecuted instantiation: planScaleOut.c:hbKeyHashFunc
Unexecuted instantiation: planSpliter.c:hbKeyHashFunc
Unexecuted instantiation: planUtil.c:hbKeyHashFunc
Unexecuted instantiation: planValidator.c:hbKeyHashFunc
Unexecuted instantiation: catalog.c:hbKeyHashFunc
Unexecuted instantiation: ctgAsync.c:hbKeyHashFunc
Unexecuted instantiation: ctgCache.c:hbKeyHashFunc
Unexecuted instantiation: ctgDbg.c:hbKeyHashFunc
Unexecuted instantiation: ctgRemote.c:hbKeyHashFunc
Unexecuted instantiation: ctgRent.c:hbKeyHashFunc
Unexecuted instantiation: ctgUtil.c:hbKeyHashFunc
Unexecuted instantiation: functionMgt.c:hbKeyHashFunc
Unexecuted instantiation: tudf.c:hbKeyHashFunc
Unexecuted instantiation: builtins.c:hbKeyHashFunc
Unexecuted instantiation: builtinsimpl.c:hbKeyHashFunc
Unexecuted instantiation: thistogram.c:hbKeyHashFunc
Unexecuted instantiation: tpercentile.c:hbKeyHashFunc
Unexecuted instantiation: tavgfunction.c:hbKeyHashFunc
Unexecuted instantiation: tminmax.c:hbKeyHashFunc
Unexecuted instantiation: tminmaxavx.c:hbKeyHashFunc
Unexecuted instantiation: filter.c:hbKeyHashFunc
Unexecuted instantiation: scalar.c:hbKeyHashFunc
Unexecuted instantiation: sclfunc.c:hbKeyHashFunc
Unexecuted instantiation: sclvector.c:hbKeyHashFunc
Unexecuted instantiation: nodesCloneFuncs.c:hbKeyHashFunc
Unexecuted instantiation: nodesCodeFuncs.c:hbKeyHashFunc
Unexecuted instantiation: nodesEqualFuncs.c:hbKeyHashFunc
Unexecuted instantiation: nodesMatchFuncs.c:hbKeyHashFunc
Unexecuted instantiation: nodesMsgFuncs.c:hbKeyHashFunc
Unexecuted instantiation: nodesToSQLFuncs.c:hbKeyHashFunc
Unexecuted instantiation: nodesTraverseFuncs.c:hbKeyHashFunc
Unexecuted instantiation: nodesUtilFuncs.c:hbKeyHashFunc
Unexecuted instantiation: queryUtil.c:hbKeyHashFunc
Unexecuted instantiation: querymsg.c:hbKeyHashFunc
Unexecuted instantiation: trans.c:hbKeyHashFunc
Unexecuted instantiation: transCli.c:hbKeyHashFunc
Unexecuted instantiation: transComm.c:hbKeyHashFunc
Unexecuted instantiation: transSasl.c:hbKeyHashFunc
Unexecuted instantiation: transSvr.c:hbKeyHashFunc
Unexecuted instantiation: transTLS.c:hbKeyHashFunc
Unexecuted instantiation: thttp.c:hbKeyHashFunc
Unexecuted instantiation: geomFunc.c:hbKeyHashFunc
Unexecuted instantiation: tconfig.c:hbKeyHashFunc
Unexecuted instantiation: tdigest.c:hbKeyHashFunc
Unexecuted instantiation: tlog.c:hbKeyHashFunc
Unexecuted instantiation: tmempool.c:hbKeyHashFunc
Unexecuted instantiation: mpDirect.c:hbKeyHashFunc
Unexecuted instantiation: systable.c:hbKeyHashFunc
Unexecuted instantiation: tdatablock.c:hbKeyHashFunc
Unexecuted instantiation: tdataformat.c:hbKeyHashFunc
Unexecuted instantiation: tglobal.c:hbKeyHashFunc
Unexecuted instantiation: tmisce.c:hbKeyHashFunc
Unexecuted instantiation: tname.c:hbKeyHashFunc
Unexecuted instantiation: tpriv.c:hbKeyHashFunc
Unexecuted instantiation: ttime.c:hbKeyHashFunc
Unexecuted instantiation: tvariant.c:hbKeyHashFunc
Unexecuted instantiation: streamMsg.c:hbKeyHashFunc
Unexecuted instantiation: tmsg.c:hbKeyHashFunc
Unexecuted instantiation: xnode.c:hbKeyHashFunc
Unexecuted instantiation: tencrypt.c:hbKeyHashFunc
Unexecuted instantiation: streamJson.c:hbKeyHashFunc
5326
5327
0
static FORCE_INLINE void tFreeReqKvHash(SHashObj* info) {
5328
0
  void* pIter = taosHashIterate(info, NULL);
5329
0
  while (pIter != NULL) {
5330
0
    SKv* kv = (SKv*)pIter;
5331
0
    taosMemoryFreeClear(kv->value);
5332
0
    pIter = taosHashIterate(info, pIter);
5333
0
  }
5334
0
}
Unexecuted instantiation: sql-fuzzer.c:tFreeReqKvHash
Unexecuted instantiation: parser.c:tFreeReqKvHash
Unexecuted instantiation: parTranslater.c:tFreeReqKvHash
Unexecuted instantiation: parUtil.c:tFreeReqKvHash
Unexecuted instantiation: parAstParser.c:tFreeReqKvHash
Unexecuted instantiation: parAuthenticator.c:tFreeReqKvHash
Unexecuted instantiation: parCalcConst.c:tFreeReqKvHash
Unexecuted instantiation: parInsertSql.c:tFreeReqKvHash
Unexecuted instantiation: parInsertUtil.c:tFreeReqKvHash
Unexecuted instantiation: taos_lemon_sql.tab.c:tFreeReqKvHash
Unexecuted instantiation: parAstCreater.c:tFreeReqKvHash
Unexecuted instantiation: parInsertSml.c:tFreeReqKvHash
Unexecuted instantiation: planner.c:tFreeReqKvHash
Unexecuted instantiation: planLogicCreater.c:tFreeReqKvHash
Unexecuted instantiation: planOptimizer.c:tFreeReqKvHash
Unexecuted instantiation: planPhysiCreater.c:tFreeReqKvHash
Unexecuted instantiation: planScaleOut.c:tFreeReqKvHash
Unexecuted instantiation: planSpliter.c:tFreeReqKvHash
Unexecuted instantiation: planUtil.c:tFreeReqKvHash
Unexecuted instantiation: planValidator.c:tFreeReqKvHash
Unexecuted instantiation: catalog.c:tFreeReqKvHash
Unexecuted instantiation: ctgAsync.c:tFreeReqKvHash
Unexecuted instantiation: ctgCache.c:tFreeReqKvHash
Unexecuted instantiation: ctgDbg.c:tFreeReqKvHash
Unexecuted instantiation: ctgRemote.c:tFreeReqKvHash
Unexecuted instantiation: ctgRent.c:tFreeReqKvHash
Unexecuted instantiation: ctgUtil.c:tFreeReqKvHash
Unexecuted instantiation: functionMgt.c:tFreeReqKvHash
Unexecuted instantiation: tudf.c:tFreeReqKvHash
Unexecuted instantiation: builtins.c:tFreeReqKvHash
Unexecuted instantiation: builtinsimpl.c:tFreeReqKvHash
Unexecuted instantiation: thistogram.c:tFreeReqKvHash
Unexecuted instantiation: tpercentile.c:tFreeReqKvHash
Unexecuted instantiation: tavgfunction.c:tFreeReqKvHash
Unexecuted instantiation: tminmax.c:tFreeReqKvHash
Unexecuted instantiation: tminmaxavx.c:tFreeReqKvHash
Unexecuted instantiation: filter.c:tFreeReqKvHash
Unexecuted instantiation: scalar.c:tFreeReqKvHash
Unexecuted instantiation: sclfunc.c:tFreeReqKvHash
Unexecuted instantiation: sclvector.c:tFreeReqKvHash
Unexecuted instantiation: nodesCloneFuncs.c:tFreeReqKvHash
Unexecuted instantiation: nodesCodeFuncs.c:tFreeReqKvHash
Unexecuted instantiation: nodesEqualFuncs.c:tFreeReqKvHash
Unexecuted instantiation: nodesMatchFuncs.c:tFreeReqKvHash
Unexecuted instantiation: nodesMsgFuncs.c:tFreeReqKvHash
Unexecuted instantiation: nodesToSQLFuncs.c:tFreeReqKvHash
Unexecuted instantiation: nodesTraverseFuncs.c:tFreeReqKvHash
Unexecuted instantiation: nodesUtilFuncs.c:tFreeReqKvHash
Unexecuted instantiation: queryUtil.c:tFreeReqKvHash
Unexecuted instantiation: querymsg.c:tFreeReqKvHash
Unexecuted instantiation: trans.c:tFreeReqKvHash
Unexecuted instantiation: transCli.c:tFreeReqKvHash
Unexecuted instantiation: transComm.c:tFreeReqKvHash
Unexecuted instantiation: transSasl.c:tFreeReqKvHash
Unexecuted instantiation: transSvr.c:tFreeReqKvHash
Unexecuted instantiation: transTLS.c:tFreeReqKvHash
Unexecuted instantiation: thttp.c:tFreeReqKvHash
Unexecuted instantiation: geomFunc.c:tFreeReqKvHash
Unexecuted instantiation: tconfig.c:tFreeReqKvHash
Unexecuted instantiation: tdigest.c:tFreeReqKvHash
Unexecuted instantiation: tlog.c:tFreeReqKvHash
Unexecuted instantiation: tmempool.c:tFreeReqKvHash
Unexecuted instantiation: mpDirect.c:tFreeReqKvHash
Unexecuted instantiation: systable.c:tFreeReqKvHash
Unexecuted instantiation: tdatablock.c:tFreeReqKvHash
Unexecuted instantiation: tdataformat.c:tFreeReqKvHash
Unexecuted instantiation: tglobal.c:tFreeReqKvHash
Unexecuted instantiation: tmisce.c:tFreeReqKvHash
Unexecuted instantiation: tname.c:tFreeReqKvHash
Unexecuted instantiation: tpriv.c:tFreeReqKvHash
Unexecuted instantiation: ttime.c:tFreeReqKvHash
Unexecuted instantiation: tvariant.c:tFreeReqKvHash
Unexecuted instantiation: streamMsg.c:tFreeReqKvHash
Unexecuted instantiation: tmsg.c:tFreeReqKvHash
Unexecuted instantiation: xnode.c:tFreeReqKvHash
Unexecuted instantiation: tencrypt.c:tFreeReqKvHash
Unexecuted instantiation: streamJson.c:tFreeReqKvHash
5335
5336
0
static FORCE_INLINE void tFreeClientHbQueryDesc(void* pDesc) {
5337
0
  SQueryDesc* desc = (SQueryDesc*)pDesc;
5338
0
  if (desc->subDesc) {
5339
0
    taosArrayDestroy(desc->subDesc);
5340
0
    desc->subDesc = NULL;
5341
0
  }
5342
0
}
Unexecuted instantiation: sql-fuzzer.c:tFreeClientHbQueryDesc
Unexecuted instantiation: parser.c:tFreeClientHbQueryDesc
Unexecuted instantiation: parTranslater.c:tFreeClientHbQueryDesc
Unexecuted instantiation: parUtil.c:tFreeClientHbQueryDesc
Unexecuted instantiation: parAstParser.c:tFreeClientHbQueryDesc
Unexecuted instantiation: parAuthenticator.c:tFreeClientHbQueryDesc
Unexecuted instantiation: parCalcConst.c:tFreeClientHbQueryDesc
Unexecuted instantiation: parInsertSql.c:tFreeClientHbQueryDesc
Unexecuted instantiation: parInsertUtil.c:tFreeClientHbQueryDesc
Unexecuted instantiation: taos_lemon_sql.tab.c:tFreeClientHbQueryDesc
Unexecuted instantiation: parAstCreater.c:tFreeClientHbQueryDesc
Unexecuted instantiation: parInsertSml.c:tFreeClientHbQueryDesc
Unexecuted instantiation: planner.c:tFreeClientHbQueryDesc
Unexecuted instantiation: planLogicCreater.c:tFreeClientHbQueryDesc
Unexecuted instantiation: planOptimizer.c:tFreeClientHbQueryDesc
Unexecuted instantiation: planPhysiCreater.c:tFreeClientHbQueryDesc
Unexecuted instantiation: planScaleOut.c:tFreeClientHbQueryDesc
Unexecuted instantiation: planSpliter.c:tFreeClientHbQueryDesc
Unexecuted instantiation: planUtil.c:tFreeClientHbQueryDesc
Unexecuted instantiation: planValidator.c:tFreeClientHbQueryDesc
Unexecuted instantiation: catalog.c:tFreeClientHbQueryDesc
Unexecuted instantiation: ctgAsync.c:tFreeClientHbQueryDesc
Unexecuted instantiation: ctgCache.c:tFreeClientHbQueryDesc
Unexecuted instantiation: ctgDbg.c:tFreeClientHbQueryDesc
Unexecuted instantiation: ctgRemote.c:tFreeClientHbQueryDesc
Unexecuted instantiation: ctgRent.c:tFreeClientHbQueryDesc
Unexecuted instantiation: ctgUtil.c:tFreeClientHbQueryDesc
Unexecuted instantiation: functionMgt.c:tFreeClientHbQueryDesc
Unexecuted instantiation: tudf.c:tFreeClientHbQueryDesc
Unexecuted instantiation: builtins.c:tFreeClientHbQueryDesc
Unexecuted instantiation: builtinsimpl.c:tFreeClientHbQueryDesc
Unexecuted instantiation: thistogram.c:tFreeClientHbQueryDesc
Unexecuted instantiation: tpercentile.c:tFreeClientHbQueryDesc
Unexecuted instantiation: tavgfunction.c:tFreeClientHbQueryDesc
Unexecuted instantiation: tminmax.c:tFreeClientHbQueryDesc
Unexecuted instantiation: tminmaxavx.c:tFreeClientHbQueryDesc
Unexecuted instantiation: filter.c:tFreeClientHbQueryDesc
Unexecuted instantiation: scalar.c:tFreeClientHbQueryDesc
Unexecuted instantiation: sclfunc.c:tFreeClientHbQueryDesc
Unexecuted instantiation: sclvector.c:tFreeClientHbQueryDesc
Unexecuted instantiation: nodesCloneFuncs.c:tFreeClientHbQueryDesc
Unexecuted instantiation: nodesCodeFuncs.c:tFreeClientHbQueryDesc
Unexecuted instantiation: nodesEqualFuncs.c:tFreeClientHbQueryDesc
Unexecuted instantiation: nodesMatchFuncs.c:tFreeClientHbQueryDesc
Unexecuted instantiation: nodesMsgFuncs.c:tFreeClientHbQueryDesc
Unexecuted instantiation: nodesToSQLFuncs.c:tFreeClientHbQueryDesc
Unexecuted instantiation: nodesTraverseFuncs.c:tFreeClientHbQueryDesc
Unexecuted instantiation: nodesUtilFuncs.c:tFreeClientHbQueryDesc
Unexecuted instantiation: queryUtil.c:tFreeClientHbQueryDesc
Unexecuted instantiation: querymsg.c:tFreeClientHbQueryDesc
Unexecuted instantiation: trans.c:tFreeClientHbQueryDesc
Unexecuted instantiation: transCli.c:tFreeClientHbQueryDesc
Unexecuted instantiation: transComm.c:tFreeClientHbQueryDesc
Unexecuted instantiation: transSasl.c:tFreeClientHbQueryDesc
Unexecuted instantiation: transSvr.c:tFreeClientHbQueryDesc
Unexecuted instantiation: transTLS.c:tFreeClientHbQueryDesc
Unexecuted instantiation: thttp.c:tFreeClientHbQueryDesc
Unexecuted instantiation: geomFunc.c:tFreeClientHbQueryDesc
Unexecuted instantiation: tconfig.c:tFreeClientHbQueryDesc
Unexecuted instantiation: tdigest.c:tFreeClientHbQueryDesc
Unexecuted instantiation: tlog.c:tFreeClientHbQueryDesc
Unexecuted instantiation: tmempool.c:tFreeClientHbQueryDesc
Unexecuted instantiation: mpDirect.c:tFreeClientHbQueryDesc
Unexecuted instantiation: systable.c:tFreeClientHbQueryDesc
Unexecuted instantiation: tdatablock.c:tFreeClientHbQueryDesc
Unexecuted instantiation: tdataformat.c:tFreeClientHbQueryDesc
Unexecuted instantiation: tglobal.c:tFreeClientHbQueryDesc
Unexecuted instantiation: tmisce.c:tFreeClientHbQueryDesc
Unexecuted instantiation: tname.c:tFreeClientHbQueryDesc
Unexecuted instantiation: tpriv.c:tFreeClientHbQueryDesc
Unexecuted instantiation: ttime.c:tFreeClientHbQueryDesc
Unexecuted instantiation: tvariant.c:tFreeClientHbQueryDesc
Unexecuted instantiation: streamMsg.c:tFreeClientHbQueryDesc
Unexecuted instantiation: tmsg.c:tFreeClientHbQueryDesc
Unexecuted instantiation: xnode.c:tFreeClientHbQueryDesc
Unexecuted instantiation: tencrypt.c:tFreeClientHbQueryDesc
Unexecuted instantiation: streamJson.c:tFreeClientHbQueryDesc
5343
5344
0
static FORCE_INLINE void tFreeClientHbReq(void* pReq) {
5345
0
  SClientHbReq* req = (SClientHbReq*)pReq;
5346
0
  if (req->query) {
5347
0
    if (req->query->queryDesc) {
5348
0
      taosArrayDestroyEx(req->query->queryDesc, tFreeClientHbQueryDesc);
5349
0
    }
5350
0
    taosMemoryFreeClear(req->query);
5351
0
  }
5352
5353
0
  if (req->info) {
5354
0
    tFreeReqKvHash(req->info);
5355
0
    taosHashCleanup(req->info);
5356
0
    req->info = NULL;
5357
0
  }
5358
0
}
Unexecuted instantiation: sql-fuzzer.c:tFreeClientHbReq
Unexecuted instantiation: parser.c:tFreeClientHbReq
Unexecuted instantiation: parTranslater.c:tFreeClientHbReq
Unexecuted instantiation: parUtil.c:tFreeClientHbReq
Unexecuted instantiation: parAstParser.c:tFreeClientHbReq
Unexecuted instantiation: parAuthenticator.c:tFreeClientHbReq
Unexecuted instantiation: parCalcConst.c:tFreeClientHbReq
Unexecuted instantiation: parInsertSql.c:tFreeClientHbReq
Unexecuted instantiation: parInsertUtil.c:tFreeClientHbReq
Unexecuted instantiation: taos_lemon_sql.tab.c:tFreeClientHbReq
Unexecuted instantiation: parAstCreater.c:tFreeClientHbReq
Unexecuted instantiation: parInsertSml.c:tFreeClientHbReq
Unexecuted instantiation: planner.c:tFreeClientHbReq
Unexecuted instantiation: planLogicCreater.c:tFreeClientHbReq
Unexecuted instantiation: planOptimizer.c:tFreeClientHbReq
Unexecuted instantiation: planPhysiCreater.c:tFreeClientHbReq
Unexecuted instantiation: planScaleOut.c:tFreeClientHbReq
Unexecuted instantiation: planSpliter.c:tFreeClientHbReq
Unexecuted instantiation: planUtil.c:tFreeClientHbReq
Unexecuted instantiation: planValidator.c:tFreeClientHbReq
Unexecuted instantiation: catalog.c:tFreeClientHbReq
Unexecuted instantiation: ctgAsync.c:tFreeClientHbReq
Unexecuted instantiation: ctgCache.c:tFreeClientHbReq
Unexecuted instantiation: ctgDbg.c:tFreeClientHbReq
Unexecuted instantiation: ctgRemote.c:tFreeClientHbReq
Unexecuted instantiation: ctgRent.c:tFreeClientHbReq
Unexecuted instantiation: ctgUtil.c:tFreeClientHbReq
Unexecuted instantiation: functionMgt.c:tFreeClientHbReq
Unexecuted instantiation: tudf.c:tFreeClientHbReq
Unexecuted instantiation: builtins.c:tFreeClientHbReq
Unexecuted instantiation: builtinsimpl.c:tFreeClientHbReq
Unexecuted instantiation: thistogram.c:tFreeClientHbReq
Unexecuted instantiation: tpercentile.c:tFreeClientHbReq
Unexecuted instantiation: tavgfunction.c:tFreeClientHbReq
Unexecuted instantiation: tminmax.c:tFreeClientHbReq
Unexecuted instantiation: tminmaxavx.c:tFreeClientHbReq
Unexecuted instantiation: filter.c:tFreeClientHbReq
Unexecuted instantiation: scalar.c:tFreeClientHbReq
Unexecuted instantiation: sclfunc.c:tFreeClientHbReq
Unexecuted instantiation: sclvector.c:tFreeClientHbReq
Unexecuted instantiation: nodesCloneFuncs.c:tFreeClientHbReq
Unexecuted instantiation: nodesCodeFuncs.c:tFreeClientHbReq
Unexecuted instantiation: nodesEqualFuncs.c:tFreeClientHbReq
Unexecuted instantiation: nodesMatchFuncs.c:tFreeClientHbReq
Unexecuted instantiation: nodesMsgFuncs.c:tFreeClientHbReq
Unexecuted instantiation: nodesToSQLFuncs.c:tFreeClientHbReq
Unexecuted instantiation: nodesTraverseFuncs.c:tFreeClientHbReq
Unexecuted instantiation: nodesUtilFuncs.c:tFreeClientHbReq
Unexecuted instantiation: queryUtil.c:tFreeClientHbReq
Unexecuted instantiation: querymsg.c:tFreeClientHbReq
Unexecuted instantiation: trans.c:tFreeClientHbReq
Unexecuted instantiation: transCli.c:tFreeClientHbReq
Unexecuted instantiation: transComm.c:tFreeClientHbReq
Unexecuted instantiation: transSasl.c:tFreeClientHbReq
Unexecuted instantiation: transSvr.c:tFreeClientHbReq
Unexecuted instantiation: transTLS.c:tFreeClientHbReq
Unexecuted instantiation: thttp.c:tFreeClientHbReq
Unexecuted instantiation: geomFunc.c:tFreeClientHbReq
Unexecuted instantiation: tconfig.c:tFreeClientHbReq
Unexecuted instantiation: tdigest.c:tFreeClientHbReq
Unexecuted instantiation: tlog.c:tFreeClientHbReq
Unexecuted instantiation: tmempool.c:tFreeClientHbReq
Unexecuted instantiation: mpDirect.c:tFreeClientHbReq
Unexecuted instantiation: systable.c:tFreeClientHbReq
Unexecuted instantiation: tdatablock.c:tFreeClientHbReq
Unexecuted instantiation: tdataformat.c:tFreeClientHbReq
Unexecuted instantiation: tglobal.c:tFreeClientHbReq
Unexecuted instantiation: tmisce.c:tFreeClientHbReq
Unexecuted instantiation: tname.c:tFreeClientHbReq
Unexecuted instantiation: tpriv.c:tFreeClientHbReq
Unexecuted instantiation: ttime.c:tFreeClientHbReq
Unexecuted instantiation: tvariant.c:tFreeClientHbReq
Unexecuted instantiation: streamMsg.c:tFreeClientHbReq
Unexecuted instantiation: tmsg.c:tFreeClientHbReq
Unexecuted instantiation: xnode.c:tFreeClientHbReq
Unexecuted instantiation: tencrypt.c:tFreeClientHbReq
Unexecuted instantiation: streamJson.c:tFreeClientHbReq
5359
5360
int32_t tSerializeSClientHbBatchReq(void* buf, int32_t bufLen, const SClientHbBatchReq* pReq);
5361
int32_t tDeserializeSClientHbBatchReq(void* buf, int32_t bufLen, SClientHbBatchReq* pReq);
5362
5363
0
static FORCE_INLINE void tFreeClientHbBatchReq(void* pReq) {
5364
0
  if (pReq == NULL) return;
5365
0
  SClientHbBatchReq* req = (SClientHbBatchReq*)pReq;
5366
0
  taosArrayDestroyEx(req->reqs, tFreeClientHbReq);
5367
0
  taosMemoryFree(pReq);
5368
0
}
Unexecuted instantiation: sql-fuzzer.c:tFreeClientHbBatchReq
Unexecuted instantiation: parser.c:tFreeClientHbBatchReq
Unexecuted instantiation: parTranslater.c:tFreeClientHbBatchReq
Unexecuted instantiation: parUtil.c:tFreeClientHbBatchReq
Unexecuted instantiation: parAstParser.c:tFreeClientHbBatchReq
Unexecuted instantiation: parAuthenticator.c:tFreeClientHbBatchReq
Unexecuted instantiation: parCalcConst.c:tFreeClientHbBatchReq
Unexecuted instantiation: parInsertSql.c:tFreeClientHbBatchReq
Unexecuted instantiation: parInsertUtil.c:tFreeClientHbBatchReq
Unexecuted instantiation: taos_lemon_sql.tab.c:tFreeClientHbBatchReq
Unexecuted instantiation: parAstCreater.c:tFreeClientHbBatchReq
Unexecuted instantiation: parInsertSml.c:tFreeClientHbBatchReq
Unexecuted instantiation: planner.c:tFreeClientHbBatchReq
Unexecuted instantiation: planLogicCreater.c:tFreeClientHbBatchReq
Unexecuted instantiation: planOptimizer.c:tFreeClientHbBatchReq
Unexecuted instantiation: planPhysiCreater.c:tFreeClientHbBatchReq
Unexecuted instantiation: planScaleOut.c:tFreeClientHbBatchReq
Unexecuted instantiation: planSpliter.c:tFreeClientHbBatchReq
Unexecuted instantiation: planUtil.c:tFreeClientHbBatchReq
Unexecuted instantiation: planValidator.c:tFreeClientHbBatchReq
Unexecuted instantiation: catalog.c:tFreeClientHbBatchReq
Unexecuted instantiation: ctgAsync.c:tFreeClientHbBatchReq
Unexecuted instantiation: ctgCache.c:tFreeClientHbBatchReq
Unexecuted instantiation: ctgDbg.c:tFreeClientHbBatchReq
Unexecuted instantiation: ctgRemote.c:tFreeClientHbBatchReq
Unexecuted instantiation: ctgRent.c:tFreeClientHbBatchReq
Unexecuted instantiation: ctgUtil.c:tFreeClientHbBatchReq
Unexecuted instantiation: functionMgt.c:tFreeClientHbBatchReq
Unexecuted instantiation: tudf.c:tFreeClientHbBatchReq
Unexecuted instantiation: builtins.c:tFreeClientHbBatchReq
Unexecuted instantiation: builtinsimpl.c:tFreeClientHbBatchReq
Unexecuted instantiation: thistogram.c:tFreeClientHbBatchReq
Unexecuted instantiation: tpercentile.c:tFreeClientHbBatchReq
Unexecuted instantiation: tavgfunction.c:tFreeClientHbBatchReq
Unexecuted instantiation: tminmax.c:tFreeClientHbBatchReq
Unexecuted instantiation: tminmaxavx.c:tFreeClientHbBatchReq
Unexecuted instantiation: filter.c:tFreeClientHbBatchReq
Unexecuted instantiation: scalar.c:tFreeClientHbBatchReq
Unexecuted instantiation: sclfunc.c:tFreeClientHbBatchReq
Unexecuted instantiation: sclvector.c:tFreeClientHbBatchReq
Unexecuted instantiation: nodesCloneFuncs.c:tFreeClientHbBatchReq
Unexecuted instantiation: nodesCodeFuncs.c:tFreeClientHbBatchReq
Unexecuted instantiation: nodesEqualFuncs.c:tFreeClientHbBatchReq
Unexecuted instantiation: nodesMatchFuncs.c:tFreeClientHbBatchReq
Unexecuted instantiation: nodesMsgFuncs.c:tFreeClientHbBatchReq
Unexecuted instantiation: nodesToSQLFuncs.c:tFreeClientHbBatchReq
Unexecuted instantiation: nodesTraverseFuncs.c:tFreeClientHbBatchReq
Unexecuted instantiation: nodesUtilFuncs.c:tFreeClientHbBatchReq
Unexecuted instantiation: queryUtil.c:tFreeClientHbBatchReq
Unexecuted instantiation: querymsg.c:tFreeClientHbBatchReq
Unexecuted instantiation: trans.c:tFreeClientHbBatchReq
Unexecuted instantiation: transCli.c:tFreeClientHbBatchReq
Unexecuted instantiation: transComm.c:tFreeClientHbBatchReq
Unexecuted instantiation: transSasl.c:tFreeClientHbBatchReq
Unexecuted instantiation: transSvr.c:tFreeClientHbBatchReq
Unexecuted instantiation: transTLS.c:tFreeClientHbBatchReq
Unexecuted instantiation: thttp.c:tFreeClientHbBatchReq
Unexecuted instantiation: geomFunc.c:tFreeClientHbBatchReq
Unexecuted instantiation: tconfig.c:tFreeClientHbBatchReq
Unexecuted instantiation: tdigest.c:tFreeClientHbBatchReq
Unexecuted instantiation: tlog.c:tFreeClientHbBatchReq
Unexecuted instantiation: tmempool.c:tFreeClientHbBatchReq
Unexecuted instantiation: mpDirect.c:tFreeClientHbBatchReq
Unexecuted instantiation: systable.c:tFreeClientHbBatchReq
Unexecuted instantiation: tdatablock.c:tFreeClientHbBatchReq
Unexecuted instantiation: tdataformat.c:tFreeClientHbBatchReq
Unexecuted instantiation: tglobal.c:tFreeClientHbBatchReq
Unexecuted instantiation: tmisce.c:tFreeClientHbBatchReq
Unexecuted instantiation: tname.c:tFreeClientHbBatchReq
Unexecuted instantiation: tpriv.c:tFreeClientHbBatchReq
Unexecuted instantiation: ttime.c:tFreeClientHbBatchReq
Unexecuted instantiation: tvariant.c:tFreeClientHbBatchReq
Unexecuted instantiation: streamMsg.c:tFreeClientHbBatchReq
Unexecuted instantiation: tmsg.c:tFreeClientHbBatchReq
Unexecuted instantiation: xnode.c:tFreeClientHbBatchReq
Unexecuted instantiation: tencrypt.c:tFreeClientHbBatchReq
Unexecuted instantiation: streamJson.c:tFreeClientHbBatchReq
5369
5370
0
static FORCE_INLINE void tFreeClientKv(void* pKv) {
5371
0
  SKv* kv = (SKv*)pKv;
5372
0
  if (kv) {
5373
0
    taosMemoryFreeClear(kv->value);
5374
0
  }
5375
0
}
Unexecuted instantiation: sql-fuzzer.c:tFreeClientKv
Unexecuted instantiation: parser.c:tFreeClientKv
Unexecuted instantiation: parTranslater.c:tFreeClientKv
Unexecuted instantiation: parUtil.c:tFreeClientKv
Unexecuted instantiation: parAstParser.c:tFreeClientKv
Unexecuted instantiation: parAuthenticator.c:tFreeClientKv
Unexecuted instantiation: parCalcConst.c:tFreeClientKv
Unexecuted instantiation: parInsertSql.c:tFreeClientKv
Unexecuted instantiation: parInsertUtil.c:tFreeClientKv
Unexecuted instantiation: taos_lemon_sql.tab.c:tFreeClientKv
Unexecuted instantiation: parAstCreater.c:tFreeClientKv
Unexecuted instantiation: parInsertSml.c:tFreeClientKv
Unexecuted instantiation: planner.c:tFreeClientKv
Unexecuted instantiation: planLogicCreater.c:tFreeClientKv
Unexecuted instantiation: planOptimizer.c:tFreeClientKv
Unexecuted instantiation: planPhysiCreater.c:tFreeClientKv
Unexecuted instantiation: planScaleOut.c:tFreeClientKv
Unexecuted instantiation: planSpliter.c:tFreeClientKv
Unexecuted instantiation: planUtil.c:tFreeClientKv
Unexecuted instantiation: planValidator.c:tFreeClientKv
Unexecuted instantiation: catalog.c:tFreeClientKv
Unexecuted instantiation: ctgAsync.c:tFreeClientKv
Unexecuted instantiation: ctgCache.c:tFreeClientKv
Unexecuted instantiation: ctgDbg.c:tFreeClientKv
Unexecuted instantiation: ctgRemote.c:tFreeClientKv
Unexecuted instantiation: ctgRent.c:tFreeClientKv
Unexecuted instantiation: ctgUtil.c:tFreeClientKv
Unexecuted instantiation: functionMgt.c:tFreeClientKv
Unexecuted instantiation: tudf.c:tFreeClientKv
Unexecuted instantiation: builtins.c:tFreeClientKv
Unexecuted instantiation: builtinsimpl.c:tFreeClientKv
Unexecuted instantiation: thistogram.c:tFreeClientKv
Unexecuted instantiation: tpercentile.c:tFreeClientKv
Unexecuted instantiation: tavgfunction.c:tFreeClientKv
Unexecuted instantiation: tminmax.c:tFreeClientKv
Unexecuted instantiation: tminmaxavx.c:tFreeClientKv
Unexecuted instantiation: filter.c:tFreeClientKv
Unexecuted instantiation: scalar.c:tFreeClientKv
Unexecuted instantiation: sclfunc.c:tFreeClientKv
Unexecuted instantiation: sclvector.c:tFreeClientKv
Unexecuted instantiation: nodesCloneFuncs.c:tFreeClientKv
Unexecuted instantiation: nodesCodeFuncs.c:tFreeClientKv
Unexecuted instantiation: nodesEqualFuncs.c:tFreeClientKv
Unexecuted instantiation: nodesMatchFuncs.c:tFreeClientKv
Unexecuted instantiation: nodesMsgFuncs.c:tFreeClientKv
Unexecuted instantiation: nodesToSQLFuncs.c:tFreeClientKv
Unexecuted instantiation: nodesTraverseFuncs.c:tFreeClientKv
Unexecuted instantiation: nodesUtilFuncs.c:tFreeClientKv
Unexecuted instantiation: queryUtil.c:tFreeClientKv
Unexecuted instantiation: querymsg.c:tFreeClientKv
Unexecuted instantiation: trans.c:tFreeClientKv
Unexecuted instantiation: transCli.c:tFreeClientKv
Unexecuted instantiation: transComm.c:tFreeClientKv
Unexecuted instantiation: transSasl.c:tFreeClientKv
Unexecuted instantiation: transSvr.c:tFreeClientKv
Unexecuted instantiation: transTLS.c:tFreeClientKv
Unexecuted instantiation: thttp.c:tFreeClientKv
Unexecuted instantiation: geomFunc.c:tFreeClientKv
Unexecuted instantiation: tconfig.c:tFreeClientKv
Unexecuted instantiation: tdigest.c:tFreeClientKv
Unexecuted instantiation: tlog.c:tFreeClientKv
Unexecuted instantiation: tmempool.c:tFreeClientKv
Unexecuted instantiation: mpDirect.c:tFreeClientKv
Unexecuted instantiation: systable.c:tFreeClientKv
Unexecuted instantiation: tdatablock.c:tFreeClientKv
Unexecuted instantiation: tdataformat.c:tFreeClientKv
Unexecuted instantiation: tglobal.c:tFreeClientKv
Unexecuted instantiation: tmisce.c:tFreeClientKv
Unexecuted instantiation: tname.c:tFreeClientKv
Unexecuted instantiation: tpriv.c:tFreeClientKv
Unexecuted instantiation: ttime.c:tFreeClientKv
Unexecuted instantiation: tvariant.c:tFreeClientKv
Unexecuted instantiation: streamMsg.c:tFreeClientKv
Unexecuted instantiation: tmsg.c:tFreeClientKv
Unexecuted instantiation: xnode.c:tFreeClientKv
Unexecuted instantiation: tencrypt.c:tFreeClientKv
Unexecuted instantiation: streamJson.c:tFreeClientKv
5376
5377
0
static FORCE_INLINE void tFreeClientHbRsp(void* pRsp) {
5378
0
  SClientHbRsp* rsp = (SClientHbRsp*)pRsp;
5379
0
  if (rsp->query) {
5380
0
    taosArrayDestroy(rsp->query->pQnodeList);
5381
0
    taosMemoryFreeClear(rsp->query);
5382
0
  }
5383
0
  if (rsp->info) taosArrayDestroyEx(rsp->info, tFreeClientKv);
5384
0
}
Unexecuted instantiation: sql-fuzzer.c:tFreeClientHbRsp
Unexecuted instantiation: parser.c:tFreeClientHbRsp
Unexecuted instantiation: parTranslater.c:tFreeClientHbRsp
Unexecuted instantiation: parUtil.c:tFreeClientHbRsp
Unexecuted instantiation: parAstParser.c:tFreeClientHbRsp
Unexecuted instantiation: parAuthenticator.c:tFreeClientHbRsp
Unexecuted instantiation: parCalcConst.c:tFreeClientHbRsp
Unexecuted instantiation: parInsertSql.c:tFreeClientHbRsp
Unexecuted instantiation: parInsertUtil.c:tFreeClientHbRsp
Unexecuted instantiation: taos_lemon_sql.tab.c:tFreeClientHbRsp
Unexecuted instantiation: parAstCreater.c:tFreeClientHbRsp
Unexecuted instantiation: parInsertSml.c:tFreeClientHbRsp
Unexecuted instantiation: planner.c:tFreeClientHbRsp
Unexecuted instantiation: planLogicCreater.c:tFreeClientHbRsp
Unexecuted instantiation: planOptimizer.c:tFreeClientHbRsp
Unexecuted instantiation: planPhysiCreater.c:tFreeClientHbRsp
Unexecuted instantiation: planScaleOut.c:tFreeClientHbRsp
Unexecuted instantiation: planSpliter.c:tFreeClientHbRsp
Unexecuted instantiation: planUtil.c:tFreeClientHbRsp
Unexecuted instantiation: planValidator.c:tFreeClientHbRsp
Unexecuted instantiation: catalog.c:tFreeClientHbRsp
Unexecuted instantiation: ctgAsync.c:tFreeClientHbRsp
Unexecuted instantiation: ctgCache.c:tFreeClientHbRsp
Unexecuted instantiation: ctgDbg.c:tFreeClientHbRsp
Unexecuted instantiation: ctgRemote.c:tFreeClientHbRsp
Unexecuted instantiation: ctgRent.c:tFreeClientHbRsp
Unexecuted instantiation: ctgUtil.c:tFreeClientHbRsp
Unexecuted instantiation: functionMgt.c:tFreeClientHbRsp
Unexecuted instantiation: tudf.c:tFreeClientHbRsp
Unexecuted instantiation: builtins.c:tFreeClientHbRsp
Unexecuted instantiation: builtinsimpl.c:tFreeClientHbRsp
Unexecuted instantiation: thistogram.c:tFreeClientHbRsp
Unexecuted instantiation: tpercentile.c:tFreeClientHbRsp
Unexecuted instantiation: tavgfunction.c:tFreeClientHbRsp
Unexecuted instantiation: tminmax.c:tFreeClientHbRsp
Unexecuted instantiation: tminmaxavx.c:tFreeClientHbRsp
Unexecuted instantiation: filter.c:tFreeClientHbRsp
Unexecuted instantiation: scalar.c:tFreeClientHbRsp
Unexecuted instantiation: sclfunc.c:tFreeClientHbRsp
Unexecuted instantiation: sclvector.c:tFreeClientHbRsp
Unexecuted instantiation: nodesCloneFuncs.c:tFreeClientHbRsp
Unexecuted instantiation: nodesCodeFuncs.c:tFreeClientHbRsp
Unexecuted instantiation: nodesEqualFuncs.c:tFreeClientHbRsp
Unexecuted instantiation: nodesMatchFuncs.c:tFreeClientHbRsp
Unexecuted instantiation: nodesMsgFuncs.c:tFreeClientHbRsp
Unexecuted instantiation: nodesToSQLFuncs.c:tFreeClientHbRsp
Unexecuted instantiation: nodesTraverseFuncs.c:tFreeClientHbRsp
Unexecuted instantiation: nodesUtilFuncs.c:tFreeClientHbRsp
Unexecuted instantiation: queryUtil.c:tFreeClientHbRsp
Unexecuted instantiation: querymsg.c:tFreeClientHbRsp
Unexecuted instantiation: trans.c:tFreeClientHbRsp
Unexecuted instantiation: transCli.c:tFreeClientHbRsp
Unexecuted instantiation: transComm.c:tFreeClientHbRsp
Unexecuted instantiation: transSasl.c:tFreeClientHbRsp
Unexecuted instantiation: transSvr.c:tFreeClientHbRsp
Unexecuted instantiation: transTLS.c:tFreeClientHbRsp
Unexecuted instantiation: thttp.c:tFreeClientHbRsp
Unexecuted instantiation: geomFunc.c:tFreeClientHbRsp
Unexecuted instantiation: tconfig.c:tFreeClientHbRsp
Unexecuted instantiation: tdigest.c:tFreeClientHbRsp
Unexecuted instantiation: tlog.c:tFreeClientHbRsp
Unexecuted instantiation: tmempool.c:tFreeClientHbRsp
Unexecuted instantiation: mpDirect.c:tFreeClientHbRsp
Unexecuted instantiation: systable.c:tFreeClientHbRsp
Unexecuted instantiation: tdatablock.c:tFreeClientHbRsp
Unexecuted instantiation: tdataformat.c:tFreeClientHbRsp
Unexecuted instantiation: tglobal.c:tFreeClientHbRsp
Unexecuted instantiation: tmisce.c:tFreeClientHbRsp
Unexecuted instantiation: tname.c:tFreeClientHbRsp
Unexecuted instantiation: tpriv.c:tFreeClientHbRsp
Unexecuted instantiation: ttime.c:tFreeClientHbRsp
Unexecuted instantiation: tvariant.c:tFreeClientHbRsp
Unexecuted instantiation: streamMsg.c:tFreeClientHbRsp
Unexecuted instantiation: tmsg.c:tFreeClientHbRsp
Unexecuted instantiation: xnode.c:tFreeClientHbRsp
Unexecuted instantiation: tencrypt.c:tFreeClientHbRsp
Unexecuted instantiation: streamJson.c:tFreeClientHbRsp
5385
5386
0
static FORCE_INLINE void tFreeClientHbBatchRsp(void* pRsp) {
5387
0
  SClientHbBatchRsp* rsp = (SClientHbBatchRsp*)pRsp;
5388
0
  taosArrayDestroyEx(rsp->rsps, tFreeClientHbRsp);
5389
0
}
Unexecuted instantiation: sql-fuzzer.c:tFreeClientHbBatchRsp
Unexecuted instantiation: parser.c:tFreeClientHbBatchRsp
Unexecuted instantiation: parTranslater.c:tFreeClientHbBatchRsp
Unexecuted instantiation: parUtil.c:tFreeClientHbBatchRsp
Unexecuted instantiation: parAstParser.c:tFreeClientHbBatchRsp
Unexecuted instantiation: parAuthenticator.c:tFreeClientHbBatchRsp
Unexecuted instantiation: parCalcConst.c:tFreeClientHbBatchRsp
Unexecuted instantiation: parInsertSql.c:tFreeClientHbBatchRsp
Unexecuted instantiation: parInsertUtil.c:tFreeClientHbBatchRsp
Unexecuted instantiation: taos_lemon_sql.tab.c:tFreeClientHbBatchRsp
Unexecuted instantiation: parAstCreater.c:tFreeClientHbBatchRsp
Unexecuted instantiation: parInsertSml.c:tFreeClientHbBatchRsp
Unexecuted instantiation: planner.c:tFreeClientHbBatchRsp
Unexecuted instantiation: planLogicCreater.c:tFreeClientHbBatchRsp
Unexecuted instantiation: planOptimizer.c:tFreeClientHbBatchRsp
Unexecuted instantiation: planPhysiCreater.c:tFreeClientHbBatchRsp
Unexecuted instantiation: planScaleOut.c:tFreeClientHbBatchRsp
Unexecuted instantiation: planSpliter.c:tFreeClientHbBatchRsp
Unexecuted instantiation: planUtil.c:tFreeClientHbBatchRsp
Unexecuted instantiation: planValidator.c:tFreeClientHbBatchRsp
Unexecuted instantiation: catalog.c:tFreeClientHbBatchRsp
Unexecuted instantiation: ctgAsync.c:tFreeClientHbBatchRsp
Unexecuted instantiation: ctgCache.c:tFreeClientHbBatchRsp
Unexecuted instantiation: ctgDbg.c:tFreeClientHbBatchRsp
Unexecuted instantiation: ctgRemote.c:tFreeClientHbBatchRsp
Unexecuted instantiation: ctgRent.c:tFreeClientHbBatchRsp
Unexecuted instantiation: ctgUtil.c:tFreeClientHbBatchRsp
Unexecuted instantiation: functionMgt.c:tFreeClientHbBatchRsp
Unexecuted instantiation: tudf.c:tFreeClientHbBatchRsp
Unexecuted instantiation: builtins.c:tFreeClientHbBatchRsp
Unexecuted instantiation: builtinsimpl.c:tFreeClientHbBatchRsp
Unexecuted instantiation: thistogram.c:tFreeClientHbBatchRsp
Unexecuted instantiation: tpercentile.c:tFreeClientHbBatchRsp
Unexecuted instantiation: tavgfunction.c:tFreeClientHbBatchRsp
Unexecuted instantiation: tminmax.c:tFreeClientHbBatchRsp
Unexecuted instantiation: tminmaxavx.c:tFreeClientHbBatchRsp
Unexecuted instantiation: filter.c:tFreeClientHbBatchRsp
Unexecuted instantiation: scalar.c:tFreeClientHbBatchRsp
Unexecuted instantiation: sclfunc.c:tFreeClientHbBatchRsp
Unexecuted instantiation: sclvector.c:tFreeClientHbBatchRsp
Unexecuted instantiation: nodesCloneFuncs.c:tFreeClientHbBatchRsp
Unexecuted instantiation: nodesCodeFuncs.c:tFreeClientHbBatchRsp
Unexecuted instantiation: nodesEqualFuncs.c:tFreeClientHbBatchRsp
Unexecuted instantiation: nodesMatchFuncs.c:tFreeClientHbBatchRsp
Unexecuted instantiation: nodesMsgFuncs.c:tFreeClientHbBatchRsp
Unexecuted instantiation: nodesToSQLFuncs.c:tFreeClientHbBatchRsp
Unexecuted instantiation: nodesTraverseFuncs.c:tFreeClientHbBatchRsp
Unexecuted instantiation: nodesUtilFuncs.c:tFreeClientHbBatchRsp
Unexecuted instantiation: queryUtil.c:tFreeClientHbBatchRsp
Unexecuted instantiation: querymsg.c:tFreeClientHbBatchRsp
Unexecuted instantiation: trans.c:tFreeClientHbBatchRsp
Unexecuted instantiation: transCli.c:tFreeClientHbBatchRsp
Unexecuted instantiation: transComm.c:tFreeClientHbBatchRsp
Unexecuted instantiation: transSasl.c:tFreeClientHbBatchRsp
Unexecuted instantiation: transSvr.c:tFreeClientHbBatchRsp
Unexecuted instantiation: transTLS.c:tFreeClientHbBatchRsp
Unexecuted instantiation: thttp.c:tFreeClientHbBatchRsp
Unexecuted instantiation: geomFunc.c:tFreeClientHbBatchRsp
Unexecuted instantiation: tconfig.c:tFreeClientHbBatchRsp
Unexecuted instantiation: tdigest.c:tFreeClientHbBatchRsp
Unexecuted instantiation: tlog.c:tFreeClientHbBatchRsp
Unexecuted instantiation: tmempool.c:tFreeClientHbBatchRsp
Unexecuted instantiation: mpDirect.c:tFreeClientHbBatchRsp
Unexecuted instantiation: systable.c:tFreeClientHbBatchRsp
Unexecuted instantiation: tdatablock.c:tFreeClientHbBatchRsp
Unexecuted instantiation: tdataformat.c:tFreeClientHbBatchRsp
Unexecuted instantiation: tglobal.c:tFreeClientHbBatchRsp
Unexecuted instantiation: tmisce.c:tFreeClientHbBatchRsp
Unexecuted instantiation: tname.c:tFreeClientHbBatchRsp
Unexecuted instantiation: tpriv.c:tFreeClientHbBatchRsp
Unexecuted instantiation: ttime.c:tFreeClientHbBatchRsp
Unexecuted instantiation: tvariant.c:tFreeClientHbBatchRsp
Unexecuted instantiation: streamMsg.c:tFreeClientHbBatchRsp
Unexecuted instantiation: tmsg.c:tFreeClientHbBatchRsp
Unexecuted instantiation: xnode.c:tFreeClientHbBatchRsp
Unexecuted instantiation: tencrypt.c:tFreeClientHbBatchRsp
Unexecuted instantiation: streamJson.c:tFreeClientHbBatchRsp
5390
5391
int32_t tSerializeSClientHbBatchRsp(void* buf, int32_t bufLen, const SClientHbBatchRsp* pBatchRsp);
5392
int32_t tDeserializeSClientHbBatchRsp(void* buf, int32_t bufLen, SClientHbBatchRsp* pBatchRsp);
5393
void    tFreeSClientHbBatchRsp(SClientHbBatchRsp* pBatchRsp);
5394
5395
0
static FORCE_INLINE int32_t tEncodeSKv(SEncoder* pEncoder, const SKv* pKv) {
5396
0
  TAOS_CHECK_RETURN(tEncodeI32(pEncoder, pKv->key));
5397
0
  TAOS_CHECK_RETURN(tEncodeI32(pEncoder, pKv->valueLen));
5398
0
  TAOS_CHECK_RETURN(tEncodeBinary(pEncoder, (uint8_t*)pKv->value, pKv->valueLen));
5399
0
  return 0;
5400
0
}
Unexecuted instantiation: sql-fuzzer.c:tEncodeSKv
Unexecuted instantiation: parser.c:tEncodeSKv
Unexecuted instantiation: parTranslater.c:tEncodeSKv
Unexecuted instantiation: parUtil.c:tEncodeSKv
Unexecuted instantiation: parAstParser.c:tEncodeSKv
Unexecuted instantiation: parAuthenticator.c:tEncodeSKv
Unexecuted instantiation: parCalcConst.c:tEncodeSKv
Unexecuted instantiation: parInsertSql.c:tEncodeSKv
Unexecuted instantiation: parInsertUtil.c:tEncodeSKv
Unexecuted instantiation: taos_lemon_sql.tab.c:tEncodeSKv
Unexecuted instantiation: parAstCreater.c:tEncodeSKv
Unexecuted instantiation: parInsertSml.c:tEncodeSKv
Unexecuted instantiation: planner.c:tEncodeSKv
Unexecuted instantiation: planLogicCreater.c:tEncodeSKv
Unexecuted instantiation: planOptimizer.c:tEncodeSKv
Unexecuted instantiation: planPhysiCreater.c:tEncodeSKv
Unexecuted instantiation: planScaleOut.c:tEncodeSKv
Unexecuted instantiation: planSpliter.c:tEncodeSKv
Unexecuted instantiation: planUtil.c:tEncodeSKv
Unexecuted instantiation: planValidator.c:tEncodeSKv
Unexecuted instantiation: catalog.c:tEncodeSKv
Unexecuted instantiation: ctgAsync.c:tEncodeSKv
Unexecuted instantiation: ctgCache.c:tEncodeSKv
Unexecuted instantiation: ctgDbg.c:tEncodeSKv
Unexecuted instantiation: ctgRemote.c:tEncodeSKv
Unexecuted instantiation: ctgRent.c:tEncodeSKv
Unexecuted instantiation: ctgUtil.c:tEncodeSKv
Unexecuted instantiation: functionMgt.c:tEncodeSKv
Unexecuted instantiation: tudf.c:tEncodeSKv
Unexecuted instantiation: builtins.c:tEncodeSKv
Unexecuted instantiation: builtinsimpl.c:tEncodeSKv
Unexecuted instantiation: thistogram.c:tEncodeSKv
Unexecuted instantiation: tpercentile.c:tEncodeSKv
Unexecuted instantiation: tavgfunction.c:tEncodeSKv
Unexecuted instantiation: tminmax.c:tEncodeSKv
Unexecuted instantiation: tminmaxavx.c:tEncodeSKv
Unexecuted instantiation: filter.c:tEncodeSKv
Unexecuted instantiation: scalar.c:tEncodeSKv
Unexecuted instantiation: sclfunc.c:tEncodeSKv
Unexecuted instantiation: sclvector.c:tEncodeSKv
Unexecuted instantiation: nodesCloneFuncs.c:tEncodeSKv
Unexecuted instantiation: nodesCodeFuncs.c:tEncodeSKv
Unexecuted instantiation: nodesEqualFuncs.c:tEncodeSKv
Unexecuted instantiation: nodesMatchFuncs.c:tEncodeSKv
Unexecuted instantiation: nodesMsgFuncs.c:tEncodeSKv
Unexecuted instantiation: nodesToSQLFuncs.c:tEncodeSKv
Unexecuted instantiation: nodesTraverseFuncs.c:tEncodeSKv
Unexecuted instantiation: nodesUtilFuncs.c:tEncodeSKv
Unexecuted instantiation: queryUtil.c:tEncodeSKv
Unexecuted instantiation: querymsg.c:tEncodeSKv
Unexecuted instantiation: trans.c:tEncodeSKv
Unexecuted instantiation: transCli.c:tEncodeSKv
Unexecuted instantiation: transComm.c:tEncodeSKv
Unexecuted instantiation: transSasl.c:tEncodeSKv
Unexecuted instantiation: transSvr.c:tEncodeSKv
Unexecuted instantiation: transTLS.c:tEncodeSKv
Unexecuted instantiation: thttp.c:tEncodeSKv
Unexecuted instantiation: geomFunc.c:tEncodeSKv
Unexecuted instantiation: tconfig.c:tEncodeSKv
Unexecuted instantiation: tdigest.c:tEncodeSKv
Unexecuted instantiation: tlog.c:tEncodeSKv
Unexecuted instantiation: tmempool.c:tEncodeSKv
Unexecuted instantiation: mpDirect.c:tEncodeSKv
Unexecuted instantiation: systable.c:tEncodeSKv
Unexecuted instantiation: tdatablock.c:tEncodeSKv
Unexecuted instantiation: tdataformat.c:tEncodeSKv
Unexecuted instantiation: tglobal.c:tEncodeSKv
Unexecuted instantiation: tmisce.c:tEncodeSKv
Unexecuted instantiation: tname.c:tEncodeSKv
Unexecuted instantiation: tpriv.c:tEncodeSKv
Unexecuted instantiation: ttime.c:tEncodeSKv
Unexecuted instantiation: tvariant.c:tEncodeSKv
Unexecuted instantiation: streamMsg.c:tEncodeSKv
Unexecuted instantiation: tmsg.c:tEncodeSKv
Unexecuted instantiation: xnode.c:tEncodeSKv
Unexecuted instantiation: tencrypt.c:tEncodeSKv
Unexecuted instantiation: streamJson.c:tEncodeSKv
5401
5402
0
static FORCE_INLINE int32_t tDecodeSKv(SDecoder* pDecoder, SKv* pKv) {
5403
0
  TAOS_CHECK_RETURN(tDecodeI32(pDecoder, &pKv->key));
5404
0
  TAOS_CHECK_RETURN(tDecodeI32(pDecoder, &pKv->valueLen));
5405
5406
0
  if (pKv->valueLen < 0) {
5407
0
    return TSDB_CODE_INVALID_MSG;
5408
0
  }
5409
5410
0
  pKv->value = taosMemoryMalloc(pKv->valueLen + 1);
5411
0
  if (pKv->value == NULL) {
5412
0
    return TSDB_CODE_OUT_OF_MEMORY;
5413
0
  }
5414
0
  TAOS_CHECK_RETURN(tDecodeCStrTo(pDecoder, (char*)pKv->value));
5415
0
  return 0;
5416
0
}
Unexecuted instantiation: sql-fuzzer.c:tDecodeSKv
Unexecuted instantiation: parser.c:tDecodeSKv
Unexecuted instantiation: parTranslater.c:tDecodeSKv
Unexecuted instantiation: parUtil.c:tDecodeSKv
Unexecuted instantiation: parAstParser.c:tDecodeSKv
Unexecuted instantiation: parAuthenticator.c:tDecodeSKv
Unexecuted instantiation: parCalcConst.c:tDecodeSKv
Unexecuted instantiation: parInsertSql.c:tDecodeSKv
Unexecuted instantiation: parInsertUtil.c:tDecodeSKv
Unexecuted instantiation: taos_lemon_sql.tab.c:tDecodeSKv
Unexecuted instantiation: parAstCreater.c:tDecodeSKv
Unexecuted instantiation: parInsertSml.c:tDecodeSKv
Unexecuted instantiation: planner.c:tDecodeSKv
Unexecuted instantiation: planLogicCreater.c:tDecodeSKv
Unexecuted instantiation: planOptimizer.c:tDecodeSKv
Unexecuted instantiation: planPhysiCreater.c:tDecodeSKv
Unexecuted instantiation: planScaleOut.c:tDecodeSKv
Unexecuted instantiation: planSpliter.c:tDecodeSKv
Unexecuted instantiation: planUtil.c:tDecodeSKv
Unexecuted instantiation: planValidator.c:tDecodeSKv
Unexecuted instantiation: catalog.c:tDecodeSKv
Unexecuted instantiation: ctgAsync.c:tDecodeSKv
Unexecuted instantiation: ctgCache.c:tDecodeSKv
Unexecuted instantiation: ctgDbg.c:tDecodeSKv
Unexecuted instantiation: ctgRemote.c:tDecodeSKv
Unexecuted instantiation: ctgRent.c:tDecodeSKv
Unexecuted instantiation: ctgUtil.c:tDecodeSKv
Unexecuted instantiation: functionMgt.c:tDecodeSKv
Unexecuted instantiation: tudf.c:tDecodeSKv
Unexecuted instantiation: builtins.c:tDecodeSKv
Unexecuted instantiation: builtinsimpl.c:tDecodeSKv
Unexecuted instantiation: thistogram.c:tDecodeSKv
Unexecuted instantiation: tpercentile.c:tDecodeSKv
Unexecuted instantiation: tavgfunction.c:tDecodeSKv
Unexecuted instantiation: tminmax.c:tDecodeSKv
Unexecuted instantiation: tminmaxavx.c:tDecodeSKv
Unexecuted instantiation: filter.c:tDecodeSKv
Unexecuted instantiation: scalar.c:tDecodeSKv
Unexecuted instantiation: sclfunc.c:tDecodeSKv
Unexecuted instantiation: sclvector.c:tDecodeSKv
Unexecuted instantiation: nodesCloneFuncs.c:tDecodeSKv
Unexecuted instantiation: nodesCodeFuncs.c:tDecodeSKv
Unexecuted instantiation: nodesEqualFuncs.c:tDecodeSKv
Unexecuted instantiation: nodesMatchFuncs.c:tDecodeSKv
Unexecuted instantiation: nodesMsgFuncs.c:tDecodeSKv
Unexecuted instantiation: nodesToSQLFuncs.c:tDecodeSKv
Unexecuted instantiation: nodesTraverseFuncs.c:tDecodeSKv
Unexecuted instantiation: nodesUtilFuncs.c:tDecodeSKv
Unexecuted instantiation: queryUtil.c:tDecodeSKv
Unexecuted instantiation: querymsg.c:tDecodeSKv
Unexecuted instantiation: trans.c:tDecodeSKv
Unexecuted instantiation: transCli.c:tDecodeSKv
Unexecuted instantiation: transComm.c:tDecodeSKv
Unexecuted instantiation: transSasl.c:tDecodeSKv
Unexecuted instantiation: transSvr.c:tDecodeSKv
Unexecuted instantiation: transTLS.c:tDecodeSKv
Unexecuted instantiation: thttp.c:tDecodeSKv
Unexecuted instantiation: geomFunc.c:tDecodeSKv
Unexecuted instantiation: tconfig.c:tDecodeSKv
Unexecuted instantiation: tdigest.c:tDecodeSKv
Unexecuted instantiation: tlog.c:tDecodeSKv
Unexecuted instantiation: tmempool.c:tDecodeSKv
Unexecuted instantiation: mpDirect.c:tDecodeSKv
Unexecuted instantiation: systable.c:tDecodeSKv
Unexecuted instantiation: tdatablock.c:tDecodeSKv
Unexecuted instantiation: tdataformat.c:tDecodeSKv
Unexecuted instantiation: tglobal.c:tDecodeSKv
Unexecuted instantiation: tmisce.c:tDecodeSKv
Unexecuted instantiation: tname.c:tDecodeSKv
Unexecuted instantiation: tpriv.c:tDecodeSKv
Unexecuted instantiation: ttime.c:tDecodeSKv
Unexecuted instantiation: tvariant.c:tDecodeSKv
Unexecuted instantiation: streamMsg.c:tDecodeSKv
Unexecuted instantiation: tmsg.c:tDecodeSKv
Unexecuted instantiation: xnode.c:tDecodeSKv
Unexecuted instantiation: tencrypt.c:tDecodeSKv
Unexecuted instantiation: streamJson.c:tDecodeSKv
5417
5418
0
static FORCE_INLINE int32_t tEncodeSClientHbKey(SEncoder* pEncoder, const SClientHbKey* pKey) {
5419
0
  TAOS_CHECK_RETURN(tEncodeI64(pEncoder, pKey->tscRid));
5420
0
  TAOS_CHECK_RETURN(tEncodeI8(pEncoder, pKey->connType));
5421
0
  return 0;
5422
0
}
Unexecuted instantiation: sql-fuzzer.c:tEncodeSClientHbKey
Unexecuted instantiation: parser.c:tEncodeSClientHbKey
Unexecuted instantiation: parTranslater.c:tEncodeSClientHbKey
Unexecuted instantiation: parUtil.c:tEncodeSClientHbKey
Unexecuted instantiation: parAstParser.c:tEncodeSClientHbKey
Unexecuted instantiation: parAuthenticator.c:tEncodeSClientHbKey
Unexecuted instantiation: parCalcConst.c:tEncodeSClientHbKey
Unexecuted instantiation: parInsertSql.c:tEncodeSClientHbKey
Unexecuted instantiation: parInsertUtil.c:tEncodeSClientHbKey
Unexecuted instantiation: taos_lemon_sql.tab.c:tEncodeSClientHbKey
Unexecuted instantiation: parAstCreater.c:tEncodeSClientHbKey
Unexecuted instantiation: parInsertSml.c:tEncodeSClientHbKey
Unexecuted instantiation: planner.c:tEncodeSClientHbKey
Unexecuted instantiation: planLogicCreater.c:tEncodeSClientHbKey
Unexecuted instantiation: planOptimizer.c:tEncodeSClientHbKey
Unexecuted instantiation: planPhysiCreater.c:tEncodeSClientHbKey
Unexecuted instantiation: planScaleOut.c:tEncodeSClientHbKey
Unexecuted instantiation: planSpliter.c:tEncodeSClientHbKey
Unexecuted instantiation: planUtil.c:tEncodeSClientHbKey
Unexecuted instantiation: planValidator.c:tEncodeSClientHbKey
Unexecuted instantiation: catalog.c:tEncodeSClientHbKey
Unexecuted instantiation: ctgAsync.c:tEncodeSClientHbKey
Unexecuted instantiation: ctgCache.c:tEncodeSClientHbKey
Unexecuted instantiation: ctgDbg.c:tEncodeSClientHbKey
Unexecuted instantiation: ctgRemote.c:tEncodeSClientHbKey
Unexecuted instantiation: ctgRent.c:tEncodeSClientHbKey
Unexecuted instantiation: ctgUtil.c:tEncodeSClientHbKey
Unexecuted instantiation: functionMgt.c:tEncodeSClientHbKey
Unexecuted instantiation: tudf.c:tEncodeSClientHbKey
Unexecuted instantiation: builtins.c:tEncodeSClientHbKey
Unexecuted instantiation: builtinsimpl.c:tEncodeSClientHbKey
Unexecuted instantiation: thistogram.c:tEncodeSClientHbKey
Unexecuted instantiation: tpercentile.c:tEncodeSClientHbKey
Unexecuted instantiation: tavgfunction.c:tEncodeSClientHbKey
Unexecuted instantiation: tminmax.c:tEncodeSClientHbKey
Unexecuted instantiation: tminmaxavx.c:tEncodeSClientHbKey
Unexecuted instantiation: filter.c:tEncodeSClientHbKey
Unexecuted instantiation: scalar.c:tEncodeSClientHbKey
Unexecuted instantiation: sclfunc.c:tEncodeSClientHbKey
Unexecuted instantiation: sclvector.c:tEncodeSClientHbKey
Unexecuted instantiation: nodesCloneFuncs.c:tEncodeSClientHbKey
Unexecuted instantiation: nodesCodeFuncs.c:tEncodeSClientHbKey
Unexecuted instantiation: nodesEqualFuncs.c:tEncodeSClientHbKey
Unexecuted instantiation: nodesMatchFuncs.c:tEncodeSClientHbKey
Unexecuted instantiation: nodesMsgFuncs.c:tEncodeSClientHbKey
Unexecuted instantiation: nodesToSQLFuncs.c:tEncodeSClientHbKey
Unexecuted instantiation: nodesTraverseFuncs.c:tEncodeSClientHbKey
Unexecuted instantiation: nodesUtilFuncs.c:tEncodeSClientHbKey
Unexecuted instantiation: queryUtil.c:tEncodeSClientHbKey
Unexecuted instantiation: querymsg.c:tEncodeSClientHbKey
Unexecuted instantiation: trans.c:tEncodeSClientHbKey
Unexecuted instantiation: transCli.c:tEncodeSClientHbKey
Unexecuted instantiation: transComm.c:tEncodeSClientHbKey
Unexecuted instantiation: transSasl.c:tEncodeSClientHbKey
Unexecuted instantiation: transSvr.c:tEncodeSClientHbKey
Unexecuted instantiation: transTLS.c:tEncodeSClientHbKey
Unexecuted instantiation: thttp.c:tEncodeSClientHbKey
Unexecuted instantiation: geomFunc.c:tEncodeSClientHbKey
Unexecuted instantiation: tconfig.c:tEncodeSClientHbKey
Unexecuted instantiation: tdigest.c:tEncodeSClientHbKey
Unexecuted instantiation: tlog.c:tEncodeSClientHbKey
Unexecuted instantiation: tmempool.c:tEncodeSClientHbKey
Unexecuted instantiation: mpDirect.c:tEncodeSClientHbKey
Unexecuted instantiation: systable.c:tEncodeSClientHbKey
Unexecuted instantiation: tdatablock.c:tEncodeSClientHbKey
Unexecuted instantiation: tdataformat.c:tEncodeSClientHbKey
Unexecuted instantiation: tglobal.c:tEncodeSClientHbKey
Unexecuted instantiation: tmisce.c:tEncodeSClientHbKey
Unexecuted instantiation: tname.c:tEncodeSClientHbKey
Unexecuted instantiation: tpriv.c:tEncodeSClientHbKey
Unexecuted instantiation: ttime.c:tEncodeSClientHbKey
Unexecuted instantiation: tvariant.c:tEncodeSClientHbKey
Unexecuted instantiation: streamMsg.c:tEncodeSClientHbKey
Unexecuted instantiation: tmsg.c:tEncodeSClientHbKey
Unexecuted instantiation: xnode.c:tEncodeSClientHbKey
Unexecuted instantiation: tencrypt.c:tEncodeSClientHbKey
Unexecuted instantiation: streamJson.c:tEncodeSClientHbKey
5423
5424
0
static FORCE_INLINE int32_t tDecodeSClientHbKey(SDecoder* pDecoder, SClientHbKey* pKey) {
5425
0
  TAOS_CHECK_RETURN(tDecodeI64(pDecoder, &pKey->tscRid));
5426
0
  TAOS_CHECK_RETURN(tDecodeI8(pDecoder, &pKey->connType));
5427
0
  return 0;
5428
0
}
Unexecuted instantiation: sql-fuzzer.c:tDecodeSClientHbKey
Unexecuted instantiation: parser.c:tDecodeSClientHbKey
Unexecuted instantiation: parTranslater.c:tDecodeSClientHbKey
Unexecuted instantiation: parUtil.c:tDecodeSClientHbKey
Unexecuted instantiation: parAstParser.c:tDecodeSClientHbKey
Unexecuted instantiation: parAuthenticator.c:tDecodeSClientHbKey
Unexecuted instantiation: parCalcConst.c:tDecodeSClientHbKey
Unexecuted instantiation: parInsertSql.c:tDecodeSClientHbKey
Unexecuted instantiation: parInsertUtil.c:tDecodeSClientHbKey
Unexecuted instantiation: taos_lemon_sql.tab.c:tDecodeSClientHbKey
Unexecuted instantiation: parAstCreater.c:tDecodeSClientHbKey
Unexecuted instantiation: parInsertSml.c:tDecodeSClientHbKey
Unexecuted instantiation: planner.c:tDecodeSClientHbKey
Unexecuted instantiation: planLogicCreater.c:tDecodeSClientHbKey
Unexecuted instantiation: planOptimizer.c:tDecodeSClientHbKey
Unexecuted instantiation: planPhysiCreater.c:tDecodeSClientHbKey
Unexecuted instantiation: planScaleOut.c:tDecodeSClientHbKey
Unexecuted instantiation: planSpliter.c:tDecodeSClientHbKey
Unexecuted instantiation: planUtil.c:tDecodeSClientHbKey
Unexecuted instantiation: planValidator.c:tDecodeSClientHbKey
Unexecuted instantiation: catalog.c:tDecodeSClientHbKey
Unexecuted instantiation: ctgAsync.c:tDecodeSClientHbKey
Unexecuted instantiation: ctgCache.c:tDecodeSClientHbKey
Unexecuted instantiation: ctgDbg.c:tDecodeSClientHbKey
Unexecuted instantiation: ctgRemote.c:tDecodeSClientHbKey
Unexecuted instantiation: ctgRent.c:tDecodeSClientHbKey
Unexecuted instantiation: ctgUtil.c:tDecodeSClientHbKey
Unexecuted instantiation: functionMgt.c:tDecodeSClientHbKey
Unexecuted instantiation: tudf.c:tDecodeSClientHbKey
Unexecuted instantiation: builtins.c:tDecodeSClientHbKey
Unexecuted instantiation: builtinsimpl.c:tDecodeSClientHbKey
Unexecuted instantiation: thistogram.c:tDecodeSClientHbKey
Unexecuted instantiation: tpercentile.c:tDecodeSClientHbKey
Unexecuted instantiation: tavgfunction.c:tDecodeSClientHbKey
Unexecuted instantiation: tminmax.c:tDecodeSClientHbKey
Unexecuted instantiation: tminmaxavx.c:tDecodeSClientHbKey
Unexecuted instantiation: filter.c:tDecodeSClientHbKey
Unexecuted instantiation: scalar.c:tDecodeSClientHbKey
Unexecuted instantiation: sclfunc.c:tDecodeSClientHbKey
Unexecuted instantiation: sclvector.c:tDecodeSClientHbKey
Unexecuted instantiation: nodesCloneFuncs.c:tDecodeSClientHbKey
Unexecuted instantiation: nodesCodeFuncs.c:tDecodeSClientHbKey
Unexecuted instantiation: nodesEqualFuncs.c:tDecodeSClientHbKey
Unexecuted instantiation: nodesMatchFuncs.c:tDecodeSClientHbKey
Unexecuted instantiation: nodesMsgFuncs.c:tDecodeSClientHbKey
Unexecuted instantiation: nodesToSQLFuncs.c:tDecodeSClientHbKey
Unexecuted instantiation: nodesTraverseFuncs.c:tDecodeSClientHbKey
Unexecuted instantiation: nodesUtilFuncs.c:tDecodeSClientHbKey
Unexecuted instantiation: queryUtil.c:tDecodeSClientHbKey
Unexecuted instantiation: querymsg.c:tDecodeSClientHbKey
Unexecuted instantiation: trans.c:tDecodeSClientHbKey
Unexecuted instantiation: transCli.c:tDecodeSClientHbKey
Unexecuted instantiation: transComm.c:tDecodeSClientHbKey
Unexecuted instantiation: transSasl.c:tDecodeSClientHbKey
Unexecuted instantiation: transSvr.c:tDecodeSClientHbKey
Unexecuted instantiation: transTLS.c:tDecodeSClientHbKey
Unexecuted instantiation: thttp.c:tDecodeSClientHbKey
Unexecuted instantiation: geomFunc.c:tDecodeSClientHbKey
Unexecuted instantiation: tconfig.c:tDecodeSClientHbKey
Unexecuted instantiation: tdigest.c:tDecodeSClientHbKey
Unexecuted instantiation: tlog.c:tDecodeSClientHbKey
Unexecuted instantiation: tmempool.c:tDecodeSClientHbKey
Unexecuted instantiation: mpDirect.c:tDecodeSClientHbKey
Unexecuted instantiation: systable.c:tDecodeSClientHbKey
Unexecuted instantiation: tdatablock.c:tDecodeSClientHbKey
Unexecuted instantiation: tdataformat.c:tDecodeSClientHbKey
Unexecuted instantiation: tglobal.c:tDecodeSClientHbKey
Unexecuted instantiation: tmisce.c:tDecodeSClientHbKey
Unexecuted instantiation: tname.c:tDecodeSClientHbKey
Unexecuted instantiation: tpriv.c:tDecodeSClientHbKey
Unexecuted instantiation: ttime.c:tDecodeSClientHbKey
Unexecuted instantiation: tvariant.c:tDecodeSClientHbKey
Unexecuted instantiation: streamMsg.c:tDecodeSClientHbKey
Unexecuted instantiation: tmsg.c:tDecodeSClientHbKey
Unexecuted instantiation: xnode.c:tDecodeSClientHbKey
Unexecuted instantiation: tencrypt.c:tDecodeSClientHbKey
Unexecuted instantiation: streamJson.c:tDecodeSClientHbKey
5429
5430
typedef struct {
5431
  int32_t vgId;
5432
  // TODO stas
5433
} SMqReportVgInfo;
5434
5435
0
static FORCE_INLINE int32_t taosEncodeSMqVgInfo(void** buf, const SMqReportVgInfo* pVgInfo) {
5436
0
  int32_t tlen = 0;
5437
0
  tlen += taosEncodeFixedI32(buf, pVgInfo->vgId);
5438
0
  return tlen;
5439
0
}
Unexecuted instantiation: sql-fuzzer.c:taosEncodeSMqVgInfo
Unexecuted instantiation: parser.c:taosEncodeSMqVgInfo
Unexecuted instantiation: parTranslater.c:taosEncodeSMqVgInfo
Unexecuted instantiation: parUtil.c:taosEncodeSMqVgInfo
Unexecuted instantiation: parAstParser.c:taosEncodeSMqVgInfo
Unexecuted instantiation: parAuthenticator.c:taosEncodeSMqVgInfo
Unexecuted instantiation: parCalcConst.c:taosEncodeSMqVgInfo
Unexecuted instantiation: parInsertSql.c:taosEncodeSMqVgInfo
Unexecuted instantiation: parInsertUtil.c:taosEncodeSMqVgInfo
Unexecuted instantiation: taos_lemon_sql.tab.c:taosEncodeSMqVgInfo
Unexecuted instantiation: parAstCreater.c:taosEncodeSMqVgInfo
Unexecuted instantiation: parInsertSml.c:taosEncodeSMqVgInfo
Unexecuted instantiation: planner.c:taosEncodeSMqVgInfo
Unexecuted instantiation: planLogicCreater.c:taosEncodeSMqVgInfo
Unexecuted instantiation: planOptimizer.c:taosEncodeSMqVgInfo
Unexecuted instantiation: planPhysiCreater.c:taosEncodeSMqVgInfo
Unexecuted instantiation: planScaleOut.c:taosEncodeSMqVgInfo
Unexecuted instantiation: planSpliter.c:taosEncodeSMqVgInfo
Unexecuted instantiation: planUtil.c:taosEncodeSMqVgInfo
Unexecuted instantiation: planValidator.c:taosEncodeSMqVgInfo
Unexecuted instantiation: catalog.c:taosEncodeSMqVgInfo
Unexecuted instantiation: ctgAsync.c:taosEncodeSMqVgInfo
Unexecuted instantiation: ctgCache.c:taosEncodeSMqVgInfo
Unexecuted instantiation: ctgDbg.c:taosEncodeSMqVgInfo
Unexecuted instantiation: ctgRemote.c:taosEncodeSMqVgInfo
Unexecuted instantiation: ctgRent.c:taosEncodeSMqVgInfo
Unexecuted instantiation: ctgUtil.c:taosEncodeSMqVgInfo
Unexecuted instantiation: functionMgt.c:taosEncodeSMqVgInfo
Unexecuted instantiation: tudf.c:taosEncodeSMqVgInfo
Unexecuted instantiation: builtins.c:taosEncodeSMqVgInfo
Unexecuted instantiation: builtinsimpl.c:taosEncodeSMqVgInfo
Unexecuted instantiation: thistogram.c:taosEncodeSMqVgInfo
Unexecuted instantiation: tpercentile.c:taosEncodeSMqVgInfo
Unexecuted instantiation: tavgfunction.c:taosEncodeSMqVgInfo
Unexecuted instantiation: tminmax.c:taosEncodeSMqVgInfo
Unexecuted instantiation: tminmaxavx.c:taosEncodeSMqVgInfo
Unexecuted instantiation: filter.c:taosEncodeSMqVgInfo
Unexecuted instantiation: scalar.c:taosEncodeSMqVgInfo
Unexecuted instantiation: sclfunc.c:taosEncodeSMqVgInfo
Unexecuted instantiation: sclvector.c:taosEncodeSMqVgInfo
Unexecuted instantiation: nodesCloneFuncs.c:taosEncodeSMqVgInfo
Unexecuted instantiation: nodesCodeFuncs.c:taosEncodeSMqVgInfo
Unexecuted instantiation: nodesEqualFuncs.c:taosEncodeSMqVgInfo
Unexecuted instantiation: nodesMatchFuncs.c:taosEncodeSMqVgInfo
Unexecuted instantiation: nodesMsgFuncs.c:taosEncodeSMqVgInfo
Unexecuted instantiation: nodesToSQLFuncs.c:taosEncodeSMqVgInfo
Unexecuted instantiation: nodesTraverseFuncs.c:taosEncodeSMqVgInfo
Unexecuted instantiation: nodesUtilFuncs.c:taosEncodeSMqVgInfo
Unexecuted instantiation: queryUtil.c:taosEncodeSMqVgInfo
Unexecuted instantiation: querymsg.c:taosEncodeSMqVgInfo
Unexecuted instantiation: trans.c:taosEncodeSMqVgInfo
Unexecuted instantiation: transCli.c:taosEncodeSMqVgInfo
Unexecuted instantiation: transComm.c:taosEncodeSMqVgInfo
Unexecuted instantiation: transSasl.c:taosEncodeSMqVgInfo
Unexecuted instantiation: transSvr.c:taosEncodeSMqVgInfo
Unexecuted instantiation: transTLS.c:taosEncodeSMqVgInfo
Unexecuted instantiation: thttp.c:taosEncodeSMqVgInfo
Unexecuted instantiation: geomFunc.c:taosEncodeSMqVgInfo
Unexecuted instantiation: tconfig.c:taosEncodeSMqVgInfo
Unexecuted instantiation: tdigest.c:taosEncodeSMqVgInfo
Unexecuted instantiation: tlog.c:taosEncodeSMqVgInfo
Unexecuted instantiation: tmempool.c:taosEncodeSMqVgInfo
Unexecuted instantiation: mpDirect.c:taosEncodeSMqVgInfo
Unexecuted instantiation: systable.c:taosEncodeSMqVgInfo
Unexecuted instantiation: tdatablock.c:taosEncodeSMqVgInfo
Unexecuted instantiation: tdataformat.c:taosEncodeSMqVgInfo
Unexecuted instantiation: tglobal.c:taosEncodeSMqVgInfo
Unexecuted instantiation: tmisce.c:taosEncodeSMqVgInfo
Unexecuted instantiation: tname.c:taosEncodeSMqVgInfo
Unexecuted instantiation: tpriv.c:taosEncodeSMqVgInfo
Unexecuted instantiation: ttime.c:taosEncodeSMqVgInfo
Unexecuted instantiation: tvariant.c:taosEncodeSMqVgInfo
Unexecuted instantiation: streamMsg.c:taosEncodeSMqVgInfo
Unexecuted instantiation: tmsg.c:taosEncodeSMqVgInfo
Unexecuted instantiation: xnode.c:taosEncodeSMqVgInfo
Unexecuted instantiation: tencrypt.c:taosEncodeSMqVgInfo
Unexecuted instantiation: streamJson.c:taosEncodeSMqVgInfo
5440
5441
0
static FORCE_INLINE void* taosDecodeSMqVgInfo(void* buf, SMqReportVgInfo* pVgInfo) {
5442
0
  buf = taosDecodeFixedI32(buf, &pVgInfo->vgId);
5443
0
  return buf;
5444
0
}
Unexecuted instantiation: sql-fuzzer.c:taosDecodeSMqVgInfo
Unexecuted instantiation: parser.c:taosDecodeSMqVgInfo
Unexecuted instantiation: parTranslater.c:taosDecodeSMqVgInfo
Unexecuted instantiation: parUtil.c:taosDecodeSMqVgInfo
Unexecuted instantiation: parAstParser.c:taosDecodeSMqVgInfo
Unexecuted instantiation: parAuthenticator.c:taosDecodeSMqVgInfo
Unexecuted instantiation: parCalcConst.c:taosDecodeSMqVgInfo
Unexecuted instantiation: parInsertSql.c:taosDecodeSMqVgInfo
Unexecuted instantiation: parInsertUtil.c:taosDecodeSMqVgInfo
Unexecuted instantiation: taos_lemon_sql.tab.c:taosDecodeSMqVgInfo
Unexecuted instantiation: parAstCreater.c:taosDecodeSMqVgInfo
Unexecuted instantiation: parInsertSml.c:taosDecodeSMqVgInfo
Unexecuted instantiation: planner.c:taosDecodeSMqVgInfo
Unexecuted instantiation: planLogicCreater.c:taosDecodeSMqVgInfo
Unexecuted instantiation: planOptimizer.c:taosDecodeSMqVgInfo
Unexecuted instantiation: planPhysiCreater.c:taosDecodeSMqVgInfo
Unexecuted instantiation: planScaleOut.c:taosDecodeSMqVgInfo
Unexecuted instantiation: planSpliter.c:taosDecodeSMqVgInfo
Unexecuted instantiation: planUtil.c:taosDecodeSMqVgInfo
Unexecuted instantiation: planValidator.c:taosDecodeSMqVgInfo
Unexecuted instantiation: catalog.c:taosDecodeSMqVgInfo
Unexecuted instantiation: ctgAsync.c:taosDecodeSMqVgInfo
Unexecuted instantiation: ctgCache.c:taosDecodeSMqVgInfo
Unexecuted instantiation: ctgDbg.c:taosDecodeSMqVgInfo
Unexecuted instantiation: ctgRemote.c:taosDecodeSMqVgInfo
Unexecuted instantiation: ctgRent.c:taosDecodeSMqVgInfo
Unexecuted instantiation: ctgUtil.c:taosDecodeSMqVgInfo
Unexecuted instantiation: functionMgt.c:taosDecodeSMqVgInfo
Unexecuted instantiation: tudf.c:taosDecodeSMqVgInfo
Unexecuted instantiation: builtins.c:taosDecodeSMqVgInfo
Unexecuted instantiation: builtinsimpl.c:taosDecodeSMqVgInfo
Unexecuted instantiation: thistogram.c:taosDecodeSMqVgInfo
Unexecuted instantiation: tpercentile.c:taosDecodeSMqVgInfo
Unexecuted instantiation: tavgfunction.c:taosDecodeSMqVgInfo
Unexecuted instantiation: tminmax.c:taosDecodeSMqVgInfo
Unexecuted instantiation: tminmaxavx.c:taosDecodeSMqVgInfo
Unexecuted instantiation: filter.c:taosDecodeSMqVgInfo
Unexecuted instantiation: scalar.c:taosDecodeSMqVgInfo
Unexecuted instantiation: sclfunc.c:taosDecodeSMqVgInfo
Unexecuted instantiation: sclvector.c:taosDecodeSMqVgInfo
Unexecuted instantiation: nodesCloneFuncs.c:taosDecodeSMqVgInfo
Unexecuted instantiation: nodesCodeFuncs.c:taosDecodeSMqVgInfo
Unexecuted instantiation: nodesEqualFuncs.c:taosDecodeSMqVgInfo
Unexecuted instantiation: nodesMatchFuncs.c:taosDecodeSMqVgInfo
Unexecuted instantiation: nodesMsgFuncs.c:taosDecodeSMqVgInfo
Unexecuted instantiation: nodesToSQLFuncs.c:taosDecodeSMqVgInfo
Unexecuted instantiation: nodesTraverseFuncs.c:taosDecodeSMqVgInfo
Unexecuted instantiation: nodesUtilFuncs.c:taosDecodeSMqVgInfo
Unexecuted instantiation: queryUtil.c:taosDecodeSMqVgInfo
Unexecuted instantiation: querymsg.c:taosDecodeSMqVgInfo
Unexecuted instantiation: trans.c:taosDecodeSMqVgInfo
Unexecuted instantiation: transCli.c:taosDecodeSMqVgInfo
Unexecuted instantiation: transComm.c:taosDecodeSMqVgInfo
Unexecuted instantiation: transSasl.c:taosDecodeSMqVgInfo
Unexecuted instantiation: transSvr.c:taosDecodeSMqVgInfo
Unexecuted instantiation: transTLS.c:taosDecodeSMqVgInfo
Unexecuted instantiation: thttp.c:taosDecodeSMqVgInfo
Unexecuted instantiation: geomFunc.c:taosDecodeSMqVgInfo
Unexecuted instantiation: tconfig.c:taosDecodeSMqVgInfo
Unexecuted instantiation: tdigest.c:taosDecodeSMqVgInfo
Unexecuted instantiation: tlog.c:taosDecodeSMqVgInfo
Unexecuted instantiation: tmempool.c:taosDecodeSMqVgInfo
Unexecuted instantiation: mpDirect.c:taosDecodeSMqVgInfo
Unexecuted instantiation: systable.c:taosDecodeSMqVgInfo
Unexecuted instantiation: tdatablock.c:taosDecodeSMqVgInfo
Unexecuted instantiation: tdataformat.c:taosDecodeSMqVgInfo
Unexecuted instantiation: tglobal.c:taosDecodeSMqVgInfo
Unexecuted instantiation: tmisce.c:taosDecodeSMqVgInfo
Unexecuted instantiation: tname.c:taosDecodeSMqVgInfo
Unexecuted instantiation: tpriv.c:taosDecodeSMqVgInfo
Unexecuted instantiation: ttime.c:taosDecodeSMqVgInfo
Unexecuted instantiation: tvariant.c:taosDecodeSMqVgInfo
Unexecuted instantiation: streamMsg.c:taosDecodeSMqVgInfo
Unexecuted instantiation: tmsg.c:taosDecodeSMqVgInfo
Unexecuted instantiation: xnode.c:taosDecodeSMqVgInfo
Unexecuted instantiation: tencrypt.c:taosDecodeSMqVgInfo
Unexecuted instantiation: streamJson.c:taosDecodeSMqVgInfo
5445
5446
typedef struct {
5447
  int32_t epoch;
5448
  int64_t topicUid;
5449
  char    name[TSDB_TOPIC_FNAME_LEN];
5450
  SArray* pVgInfo;  // SArray<SMqHbVgInfo>
5451
} SMqTopicInfo;
5452
5453
0
static FORCE_INLINE int32_t taosEncodeSMqTopicInfoMsg(void** buf, const SMqTopicInfo* pTopicInfo) {
5454
0
  int32_t tlen = 0;
5455
0
  tlen += taosEncodeFixedI32(buf, pTopicInfo->epoch);
5456
0
  tlen += taosEncodeFixedI64(buf, pTopicInfo->topicUid);
5457
0
  tlen += taosEncodeString(buf, pTopicInfo->name);
5458
0
  int32_t sz = taosArrayGetSize(pTopicInfo->pVgInfo);
5459
0
  tlen += taosEncodeFixedI32(buf, sz);
5460
0
  for (int32_t i = 0; i < sz; i++) {
5461
0
    SMqReportVgInfo* pVgInfo = (SMqReportVgInfo*)taosArrayGet(pTopicInfo->pVgInfo, i);
5462
0
    tlen += taosEncodeSMqVgInfo(buf, pVgInfo);
5463
0
  }
5464
0
  return tlen;
5465
0
}
Unexecuted instantiation: sql-fuzzer.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: parser.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: parTranslater.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: parUtil.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: parAstParser.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: parAuthenticator.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: parCalcConst.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: parInsertSql.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: parInsertUtil.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: taos_lemon_sql.tab.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: parAstCreater.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: parInsertSml.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: planner.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: planLogicCreater.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: planOptimizer.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: planPhysiCreater.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: planScaleOut.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: planSpliter.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: planUtil.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: planValidator.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: catalog.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: ctgAsync.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: ctgCache.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: ctgDbg.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: ctgRemote.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: ctgRent.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: ctgUtil.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: functionMgt.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: tudf.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: builtins.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: builtinsimpl.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: thistogram.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: tpercentile.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: tavgfunction.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: tminmax.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: tminmaxavx.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: filter.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: scalar.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: sclfunc.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: sclvector.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: nodesCloneFuncs.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: nodesCodeFuncs.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: nodesEqualFuncs.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: nodesMatchFuncs.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: nodesMsgFuncs.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: nodesToSQLFuncs.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: nodesTraverseFuncs.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: nodesUtilFuncs.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: queryUtil.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: querymsg.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: trans.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: transCli.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: transComm.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: transSasl.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: transSvr.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: transTLS.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: thttp.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: geomFunc.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: tconfig.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: tdigest.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: tlog.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: tmempool.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: mpDirect.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: systable.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: tdatablock.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: tdataformat.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: tglobal.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: tmisce.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: tname.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: tpriv.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: ttime.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: tvariant.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: streamMsg.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: tmsg.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: xnode.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: tencrypt.c:taosEncodeSMqTopicInfoMsg
Unexecuted instantiation: streamJson.c:taosEncodeSMqTopicInfoMsg
5466
5467
0
static FORCE_INLINE void* taosDecodeSMqTopicInfoMsg(void* buf, SMqTopicInfo* pTopicInfo) {
5468
0
  buf = taosDecodeFixedI32(buf, &pTopicInfo->epoch);
5469
0
  buf = taosDecodeFixedI64(buf, &pTopicInfo->topicUid);
5470
0
  buf = taosDecodeStringTo(buf, pTopicInfo->name);
5471
0
  int32_t sz;
5472
0
  buf = taosDecodeFixedI32(buf, &sz);
5473
0
  if ((pTopicInfo->pVgInfo = taosArrayInit(sz, sizeof(SMqReportVgInfo))) == NULL) {
5474
0
    return NULL;
5475
0
  }
5476
0
  for (int32_t i = 0; i < sz; i++) {
5477
0
    SMqReportVgInfo vgInfo;
5478
0
    buf = taosDecodeSMqVgInfo(buf, &vgInfo);
5479
0
    if (taosArrayPush(pTopicInfo->pVgInfo, &vgInfo) == NULL) {
5480
0
      return NULL;
5481
0
    }
5482
0
  }
5483
0
  return buf;
5484
0
}
Unexecuted instantiation: sql-fuzzer.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: parser.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: parTranslater.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: parUtil.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: parAstParser.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: parAuthenticator.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: parCalcConst.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: parInsertSql.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: parInsertUtil.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: taos_lemon_sql.tab.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: parAstCreater.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: parInsertSml.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: planner.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: planLogicCreater.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: planOptimizer.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: planPhysiCreater.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: planScaleOut.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: planSpliter.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: planUtil.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: planValidator.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: catalog.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: ctgAsync.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: ctgCache.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: ctgDbg.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: ctgRemote.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: ctgRent.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: ctgUtil.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: functionMgt.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: tudf.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: builtins.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: builtinsimpl.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: thistogram.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: tpercentile.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: tavgfunction.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: tminmax.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: tminmaxavx.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: filter.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: scalar.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: sclfunc.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: sclvector.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: nodesCloneFuncs.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: nodesCodeFuncs.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: nodesEqualFuncs.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: nodesMatchFuncs.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: nodesMsgFuncs.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: nodesToSQLFuncs.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: nodesTraverseFuncs.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: nodesUtilFuncs.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: queryUtil.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: querymsg.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: trans.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: transCli.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: transComm.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: transSasl.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: transSvr.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: transTLS.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: thttp.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: geomFunc.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: tconfig.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: tdigest.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: tlog.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: tmempool.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: mpDirect.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: systable.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: tdatablock.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: tdataformat.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: tglobal.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: tmisce.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: tname.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: tpriv.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: ttime.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: tvariant.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: streamMsg.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: tmsg.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: xnode.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: tencrypt.c:taosDecodeSMqTopicInfoMsg
Unexecuted instantiation: streamJson.c:taosDecodeSMqTopicInfoMsg
5485
5486
typedef struct {
5487
  int32_t status;  // ask hb endpoint
5488
  int32_t epoch;
5489
  int64_t consumerId;
5490
  SArray* pTopics;  // SArray<SMqHbTopicInfo>
5491
} SMqReportReq;
5492
5493
0
static FORCE_INLINE int32_t taosEncodeSMqReportMsg(void** buf, const SMqReportReq* pMsg) {
5494
0
  int32_t tlen = 0;
5495
0
  tlen += taosEncodeFixedI32(buf, pMsg->status);
5496
0
  tlen += taosEncodeFixedI32(buf, pMsg->epoch);
5497
0
  tlen += taosEncodeFixedI64(buf, pMsg->consumerId);
5498
0
  int32_t sz = taosArrayGetSize(pMsg->pTopics);
5499
0
  tlen += taosEncodeFixedI32(buf, sz);
5500
0
  for (int32_t i = 0; i < sz; i++) {
5501
0
    SMqTopicInfo* topicInfo = (SMqTopicInfo*)taosArrayGet(pMsg->pTopics, i);
5502
0
    tlen += taosEncodeSMqTopicInfoMsg(buf, topicInfo);
5503
0
  }
5504
0
  return tlen;
5505
0
}
Unexecuted instantiation: sql-fuzzer.c:taosEncodeSMqReportMsg
Unexecuted instantiation: parser.c:taosEncodeSMqReportMsg
Unexecuted instantiation: parTranslater.c:taosEncodeSMqReportMsg
Unexecuted instantiation: parUtil.c:taosEncodeSMqReportMsg
Unexecuted instantiation: parAstParser.c:taosEncodeSMqReportMsg
Unexecuted instantiation: parAuthenticator.c:taosEncodeSMqReportMsg
Unexecuted instantiation: parCalcConst.c:taosEncodeSMqReportMsg
Unexecuted instantiation: parInsertSql.c:taosEncodeSMqReportMsg
Unexecuted instantiation: parInsertUtil.c:taosEncodeSMqReportMsg
Unexecuted instantiation: taos_lemon_sql.tab.c:taosEncodeSMqReportMsg
Unexecuted instantiation: parAstCreater.c:taosEncodeSMqReportMsg
Unexecuted instantiation: parInsertSml.c:taosEncodeSMqReportMsg
Unexecuted instantiation: planner.c:taosEncodeSMqReportMsg
Unexecuted instantiation: planLogicCreater.c:taosEncodeSMqReportMsg
Unexecuted instantiation: planOptimizer.c:taosEncodeSMqReportMsg
Unexecuted instantiation: planPhysiCreater.c:taosEncodeSMqReportMsg
Unexecuted instantiation: planScaleOut.c:taosEncodeSMqReportMsg
Unexecuted instantiation: planSpliter.c:taosEncodeSMqReportMsg
Unexecuted instantiation: planUtil.c:taosEncodeSMqReportMsg
Unexecuted instantiation: planValidator.c:taosEncodeSMqReportMsg
Unexecuted instantiation: catalog.c:taosEncodeSMqReportMsg
Unexecuted instantiation: ctgAsync.c:taosEncodeSMqReportMsg
Unexecuted instantiation: ctgCache.c:taosEncodeSMqReportMsg
Unexecuted instantiation: ctgDbg.c:taosEncodeSMqReportMsg
Unexecuted instantiation: ctgRemote.c:taosEncodeSMqReportMsg
Unexecuted instantiation: ctgRent.c:taosEncodeSMqReportMsg
Unexecuted instantiation: ctgUtil.c:taosEncodeSMqReportMsg
Unexecuted instantiation: functionMgt.c:taosEncodeSMqReportMsg
Unexecuted instantiation: tudf.c:taosEncodeSMqReportMsg
Unexecuted instantiation: builtins.c:taosEncodeSMqReportMsg
Unexecuted instantiation: builtinsimpl.c:taosEncodeSMqReportMsg
Unexecuted instantiation: thistogram.c:taosEncodeSMqReportMsg
Unexecuted instantiation: tpercentile.c:taosEncodeSMqReportMsg
Unexecuted instantiation: tavgfunction.c:taosEncodeSMqReportMsg
Unexecuted instantiation: tminmax.c:taosEncodeSMqReportMsg
Unexecuted instantiation: tminmaxavx.c:taosEncodeSMqReportMsg
Unexecuted instantiation: filter.c:taosEncodeSMqReportMsg
Unexecuted instantiation: scalar.c:taosEncodeSMqReportMsg
Unexecuted instantiation: sclfunc.c:taosEncodeSMqReportMsg
Unexecuted instantiation: sclvector.c:taosEncodeSMqReportMsg
Unexecuted instantiation: nodesCloneFuncs.c:taosEncodeSMqReportMsg
Unexecuted instantiation: nodesCodeFuncs.c:taosEncodeSMqReportMsg
Unexecuted instantiation: nodesEqualFuncs.c:taosEncodeSMqReportMsg
Unexecuted instantiation: nodesMatchFuncs.c:taosEncodeSMqReportMsg
Unexecuted instantiation: nodesMsgFuncs.c:taosEncodeSMqReportMsg
Unexecuted instantiation: nodesToSQLFuncs.c:taosEncodeSMqReportMsg
Unexecuted instantiation: nodesTraverseFuncs.c:taosEncodeSMqReportMsg
Unexecuted instantiation: nodesUtilFuncs.c:taosEncodeSMqReportMsg
Unexecuted instantiation: queryUtil.c:taosEncodeSMqReportMsg
Unexecuted instantiation: querymsg.c:taosEncodeSMqReportMsg
Unexecuted instantiation: trans.c:taosEncodeSMqReportMsg
Unexecuted instantiation: transCli.c:taosEncodeSMqReportMsg
Unexecuted instantiation: transComm.c:taosEncodeSMqReportMsg
Unexecuted instantiation: transSasl.c:taosEncodeSMqReportMsg
Unexecuted instantiation: transSvr.c:taosEncodeSMqReportMsg
Unexecuted instantiation: transTLS.c:taosEncodeSMqReportMsg
Unexecuted instantiation: thttp.c:taosEncodeSMqReportMsg
Unexecuted instantiation: geomFunc.c:taosEncodeSMqReportMsg
Unexecuted instantiation: tconfig.c:taosEncodeSMqReportMsg
Unexecuted instantiation: tdigest.c:taosEncodeSMqReportMsg
Unexecuted instantiation: tlog.c:taosEncodeSMqReportMsg
Unexecuted instantiation: tmempool.c:taosEncodeSMqReportMsg
Unexecuted instantiation: mpDirect.c:taosEncodeSMqReportMsg
Unexecuted instantiation: systable.c:taosEncodeSMqReportMsg
Unexecuted instantiation: tdatablock.c:taosEncodeSMqReportMsg
Unexecuted instantiation: tdataformat.c:taosEncodeSMqReportMsg
Unexecuted instantiation: tglobal.c:taosEncodeSMqReportMsg
Unexecuted instantiation: tmisce.c:taosEncodeSMqReportMsg
Unexecuted instantiation: tname.c:taosEncodeSMqReportMsg
Unexecuted instantiation: tpriv.c:taosEncodeSMqReportMsg
Unexecuted instantiation: ttime.c:taosEncodeSMqReportMsg
Unexecuted instantiation: tvariant.c:taosEncodeSMqReportMsg
Unexecuted instantiation: streamMsg.c:taosEncodeSMqReportMsg
Unexecuted instantiation: tmsg.c:taosEncodeSMqReportMsg
Unexecuted instantiation: xnode.c:taosEncodeSMqReportMsg
Unexecuted instantiation: tencrypt.c:taosEncodeSMqReportMsg
Unexecuted instantiation: streamJson.c:taosEncodeSMqReportMsg
5506
5507
0
static FORCE_INLINE void* taosDecodeSMqReportMsg(void* buf, SMqReportReq* pMsg) {
5508
0
  buf = taosDecodeFixedI32(buf, &pMsg->status);
5509
0
  buf = taosDecodeFixedI32(buf, &pMsg->epoch);
5510
0
  buf = taosDecodeFixedI64(buf, &pMsg->consumerId);
5511
0
  int32_t sz;
5512
0
  buf = taosDecodeFixedI32(buf, &sz);
5513
0
  if ((pMsg->pTopics = taosArrayInit(sz, sizeof(SMqTopicInfo))) == NULL) {
5514
0
    return NULL;
5515
0
  }
5516
0
  for (int32_t i = 0; i < sz; i++) {
5517
0
    SMqTopicInfo topicInfo;
5518
0
    buf = taosDecodeSMqTopicInfoMsg(buf, &topicInfo);
5519
0
    if (taosArrayPush(pMsg->pTopics, &topicInfo) == NULL) {
5520
0
      return NULL;
5521
0
    }
5522
0
  }
5523
0
  return buf;
5524
0
}
Unexecuted instantiation: sql-fuzzer.c:taosDecodeSMqReportMsg
Unexecuted instantiation: parser.c:taosDecodeSMqReportMsg
Unexecuted instantiation: parTranslater.c:taosDecodeSMqReportMsg
Unexecuted instantiation: parUtil.c:taosDecodeSMqReportMsg
Unexecuted instantiation: parAstParser.c:taosDecodeSMqReportMsg
Unexecuted instantiation: parAuthenticator.c:taosDecodeSMqReportMsg
Unexecuted instantiation: parCalcConst.c:taosDecodeSMqReportMsg
Unexecuted instantiation: parInsertSql.c:taosDecodeSMqReportMsg
Unexecuted instantiation: parInsertUtil.c:taosDecodeSMqReportMsg
Unexecuted instantiation: taos_lemon_sql.tab.c:taosDecodeSMqReportMsg
Unexecuted instantiation: parAstCreater.c:taosDecodeSMqReportMsg
Unexecuted instantiation: parInsertSml.c:taosDecodeSMqReportMsg
Unexecuted instantiation: planner.c:taosDecodeSMqReportMsg
Unexecuted instantiation: planLogicCreater.c:taosDecodeSMqReportMsg
Unexecuted instantiation: planOptimizer.c:taosDecodeSMqReportMsg
Unexecuted instantiation: planPhysiCreater.c:taosDecodeSMqReportMsg
Unexecuted instantiation: planScaleOut.c:taosDecodeSMqReportMsg
Unexecuted instantiation: planSpliter.c:taosDecodeSMqReportMsg
Unexecuted instantiation: planUtil.c:taosDecodeSMqReportMsg
Unexecuted instantiation: planValidator.c:taosDecodeSMqReportMsg
Unexecuted instantiation: catalog.c:taosDecodeSMqReportMsg
Unexecuted instantiation: ctgAsync.c:taosDecodeSMqReportMsg
Unexecuted instantiation: ctgCache.c:taosDecodeSMqReportMsg
Unexecuted instantiation: ctgDbg.c:taosDecodeSMqReportMsg
Unexecuted instantiation: ctgRemote.c:taosDecodeSMqReportMsg
Unexecuted instantiation: ctgRent.c:taosDecodeSMqReportMsg
Unexecuted instantiation: ctgUtil.c:taosDecodeSMqReportMsg
Unexecuted instantiation: functionMgt.c:taosDecodeSMqReportMsg
Unexecuted instantiation: tudf.c:taosDecodeSMqReportMsg
Unexecuted instantiation: builtins.c:taosDecodeSMqReportMsg
Unexecuted instantiation: builtinsimpl.c:taosDecodeSMqReportMsg
Unexecuted instantiation: thistogram.c:taosDecodeSMqReportMsg
Unexecuted instantiation: tpercentile.c:taosDecodeSMqReportMsg
Unexecuted instantiation: tavgfunction.c:taosDecodeSMqReportMsg
Unexecuted instantiation: tminmax.c:taosDecodeSMqReportMsg
Unexecuted instantiation: tminmaxavx.c:taosDecodeSMqReportMsg
Unexecuted instantiation: filter.c:taosDecodeSMqReportMsg
Unexecuted instantiation: scalar.c:taosDecodeSMqReportMsg
Unexecuted instantiation: sclfunc.c:taosDecodeSMqReportMsg
Unexecuted instantiation: sclvector.c:taosDecodeSMqReportMsg
Unexecuted instantiation: nodesCloneFuncs.c:taosDecodeSMqReportMsg
Unexecuted instantiation: nodesCodeFuncs.c:taosDecodeSMqReportMsg
Unexecuted instantiation: nodesEqualFuncs.c:taosDecodeSMqReportMsg
Unexecuted instantiation: nodesMatchFuncs.c:taosDecodeSMqReportMsg
Unexecuted instantiation: nodesMsgFuncs.c:taosDecodeSMqReportMsg
Unexecuted instantiation: nodesToSQLFuncs.c:taosDecodeSMqReportMsg
Unexecuted instantiation: nodesTraverseFuncs.c:taosDecodeSMqReportMsg
Unexecuted instantiation: nodesUtilFuncs.c:taosDecodeSMqReportMsg
Unexecuted instantiation: queryUtil.c:taosDecodeSMqReportMsg
Unexecuted instantiation: querymsg.c:taosDecodeSMqReportMsg
Unexecuted instantiation: trans.c:taosDecodeSMqReportMsg
Unexecuted instantiation: transCli.c:taosDecodeSMqReportMsg
Unexecuted instantiation: transComm.c:taosDecodeSMqReportMsg
Unexecuted instantiation: transSasl.c:taosDecodeSMqReportMsg
Unexecuted instantiation: transSvr.c:taosDecodeSMqReportMsg
Unexecuted instantiation: transTLS.c:taosDecodeSMqReportMsg
Unexecuted instantiation: thttp.c:taosDecodeSMqReportMsg
Unexecuted instantiation: geomFunc.c:taosDecodeSMqReportMsg
Unexecuted instantiation: tconfig.c:taosDecodeSMqReportMsg
Unexecuted instantiation: tdigest.c:taosDecodeSMqReportMsg
Unexecuted instantiation: tlog.c:taosDecodeSMqReportMsg
Unexecuted instantiation: tmempool.c:taosDecodeSMqReportMsg
Unexecuted instantiation: mpDirect.c:taosDecodeSMqReportMsg
Unexecuted instantiation: systable.c:taosDecodeSMqReportMsg
Unexecuted instantiation: tdatablock.c:taosDecodeSMqReportMsg
Unexecuted instantiation: tdataformat.c:taosDecodeSMqReportMsg
Unexecuted instantiation: tglobal.c:taosDecodeSMqReportMsg
Unexecuted instantiation: tmisce.c:taosDecodeSMqReportMsg
Unexecuted instantiation: tname.c:taosDecodeSMqReportMsg
Unexecuted instantiation: tpriv.c:taosDecodeSMqReportMsg
Unexecuted instantiation: ttime.c:taosDecodeSMqReportMsg
Unexecuted instantiation: tvariant.c:taosDecodeSMqReportMsg
Unexecuted instantiation: streamMsg.c:taosDecodeSMqReportMsg
Unexecuted instantiation: tmsg.c:taosDecodeSMqReportMsg
Unexecuted instantiation: xnode.c:taosDecodeSMqReportMsg
Unexecuted instantiation: tencrypt.c:taosDecodeSMqReportMsg
Unexecuted instantiation: streamJson.c:taosDecodeSMqReportMsg
5525
5526
typedef struct {
5527
  SMsgHead head;
5528
  int64_t  leftForVer;
5529
  int32_t  vgId;
5530
  int64_t  consumerId;
5531
  char     subKey[TSDB_SUBSCRIBE_KEY_LEN];
5532
} SMqVDeleteReq;
5533
5534
typedef struct {
5535
  int8_t reserved;
5536
} SMqVDeleteRsp;
5537
5538
typedef struct {
5539
  char**  name;
5540
  int32_t count;
5541
  int8_t  igNotExists;
5542
} SMDropStreamReq;
5543
5544
typedef struct {
5545
  int8_t reserved;
5546
} SMDropStreamRsp;
5547
5548
typedef struct {
5549
  SMsgHead head;
5550
  int64_t  resetRelHalt;  // reset related stream task halt status
5551
  int64_t  streamId;
5552
  int32_t  taskId;
5553
} SVDropStreamTaskReq;
5554
5555
typedef struct {
5556
  int8_t reserved;
5557
} SVDropStreamTaskRsp;
5558
5559
int32_t tSerializeSMDropStreamReq(void* buf, int32_t bufLen, const SMDropStreamReq* pReq);
5560
int32_t tDeserializeSMDropStreamReq(void* buf, int32_t bufLen, SMDropStreamReq* pReq);
5561
void    tFreeMDropStreamReq(SMDropStreamReq* pReq);
5562
5563
typedef struct {
5564
  char*  name;
5565
  int8_t igNotExists;
5566
} SMPauseStreamReq;
5567
5568
int32_t tSerializeSMPauseStreamReq(void* buf, int32_t bufLen, const SMPauseStreamReq* pReq);
5569
int32_t tDeserializeSMPauseStreamReq(void* buf, int32_t bufLen, SMPauseStreamReq* pReq);
5570
void    tFreeMPauseStreamReq(SMPauseStreamReq* pReq);
5571
5572
typedef struct {
5573
  char*  name;
5574
  int8_t igNotExists;
5575
  int8_t igUntreated;
5576
} SMResumeStreamReq;
5577
5578
int32_t tSerializeSMResumeStreamReq(void* buf, int32_t bufLen, const SMResumeStreamReq* pReq);
5579
int32_t tDeserializeSMResumeStreamReq(void* buf, int32_t bufLen, SMResumeStreamReq* pReq);
5580
void    tFreeMResumeStreamReq(SMResumeStreamReq* pReq);
5581
5582
typedef struct {
5583
  char*       name;
5584
  int8_t      calcAll;
5585
  STimeWindow timeRange;
5586
} SMRecalcStreamReq;
5587
5588
int32_t tSerializeSMRecalcStreamReq(void* buf, int32_t bufLen, const SMRecalcStreamReq* pReq);
5589
int32_t tDeserializeSMRecalcStreamReq(void* buf, int32_t bufLen, SMRecalcStreamReq* pReq);
5590
void    tFreeMRecalcStreamReq(SMRecalcStreamReq* pReq);
5591
5592
typedef struct SVndSetKeepVersionReq {
5593
  int64_t keepVersion;
5594
} SVndSetKeepVersionReq;
5595
5596
int32_t tSerializeSVndSetKeepVersionReq(void* buf, int32_t bufLen, SVndSetKeepVersionReq* pReq);
5597
int32_t tDeserializeSVndSetKeepVersionReq(void* buf, int32_t bufLen, SVndSetKeepVersionReq* pReq);
5598
5599
typedef struct SVUpdateCheckpointInfoReq {
5600
  SMsgHead head;
5601
  int64_t  streamId;
5602
  int32_t  taskId;
5603
  int64_t  checkpointId;
5604
  int64_t  checkpointVer;
5605
  int64_t  checkpointTs;
5606
  int32_t  transId;
5607
  int64_t  hStreamId;  // add encode/decode
5608
  int64_t  hTaskId;
5609
  int8_t   dropRelHTask;
5610
} SVUpdateCheckpointInfoReq;
5611
5612
typedef struct {
5613
  int64_t        leftForVer;
5614
  int32_t        vgId;
5615
  int64_t        oldConsumerId;
5616
  int64_t        newConsumerId;
5617
  char           subKey[TSDB_SUBSCRIBE_KEY_LEN];
5618
  int8_t         subType;
5619
  int8_t         withMeta;
5620
  char*          qmsg;  // SubPlanToString
5621
  SSchemaWrapper schema;
5622
  int64_t        suid;
5623
} SMqRebVgReq;
5624
5625
int32_t tEncodeSMqRebVgReq(SEncoder* pCoder, const SMqRebVgReq* pReq);
5626
int32_t tDecodeSMqRebVgReq(SDecoder* pCoder, SMqRebVgReq* pReq);
5627
5628
// tqOffset
5629
enum {
5630
  TMQ_OFFSET__RESET_NONE = -3,
5631
  TMQ_OFFSET__RESET_EARLIEST = -2,
5632
  TMQ_OFFSET__RESET_LATEST = -1,
5633
  TMQ_OFFSET__LOG = 1,
5634
  TMQ_OFFSET__SNAPSHOT_DATA = 2,
5635
  TMQ_OFFSET__SNAPSHOT_META = 3,
5636
};
5637
5638
enum {
5639
  WITH_DATA = 0,
5640
  WITH_META = 1,
5641
  ONLY_META = 2,
5642
};
5643
5644
0
#define TQ_OFFSET_VERSION 1
5645
5646
typedef struct {
5647
  int8_t type;
5648
  union {
5649
    // snapshot
5650
    struct {
5651
      int64_t uid;
5652
      int64_t ts;
5653
      SValue  primaryKey;
5654
    };
5655
    // log
5656
    struct {
5657
      int64_t version;
5658
    };
5659
  };
5660
} STqOffsetVal;
5661
5662
0
static FORCE_INLINE void tqOffsetResetToData(STqOffsetVal* pOffsetVal, int64_t uid, int64_t ts, SValue primaryKey) {
5663
0
  pOffsetVal->type = TMQ_OFFSET__SNAPSHOT_DATA;
5664
0
  pOffsetVal->uid = uid;
5665
0
  pOffsetVal->ts = ts;
5666
0
  if (IS_VAR_DATA_TYPE(pOffsetVal->primaryKey.type)) {
5667
0
    taosMemoryFree(pOffsetVal->primaryKey.pData);
5668
0
  }
5669
0
  pOffsetVal->primaryKey = primaryKey;
5670
0
}
Unexecuted instantiation: sql-fuzzer.c:tqOffsetResetToData
Unexecuted instantiation: parser.c:tqOffsetResetToData
Unexecuted instantiation: parTranslater.c:tqOffsetResetToData
Unexecuted instantiation: parUtil.c:tqOffsetResetToData
Unexecuted instantiation: parAstParser.c:tqOffsetResetToData
Unexecuted instantiation: parAuthenticator.c:tqOffsetResetToData
Unexecuted instantiation: parCalcConst.c:tqOffsetResetToData
Unexecuted instantiation: parInsertSql.c:tqOffsetResetToData
Unexecuted instantiation: parInsertUtil.c:tqOffsetResetToData
Unexecuted instantiation: taos_lemon_sql.tab.c:tqOffsetResetToData
Unexecuted instantiation: parAstCreater.c:tqOffsetResetToData
Unexecuted instantiation: parInsertSml.c:tqOffsetResetToData
Unexecuted instantiation: planner.c:tqOffsetResetToData
Unexecuted instantiation: planLogicCreater.c:tqOffsetResetToData
Unexecuted instantiation: planOptimizer.c:tqOffsetResetToData
Unexecuted instantiation: planPhysiCreater.c:tqOffsetResetToData
Unexecuted instantiation: planScaleOut.c:tqOffsetResetToData
Unexecuted instantiation: planSpliter.c:tqOffsetResetToData
Unexecuted instantiation: planUtil.c:tqOffsetResetToData
Unexecuted instantiation: planValidator.c:tqOffsetResetToData
Unexecuted instantiation: catalog.c:tqOffsetResetToData
Unexecuted instantiation: ctgAsync.c:tqOffsetResetToData
Unexecuted instantiation: ctgCache.c:tqOffsetResetToData
Unexecuted instantiation: ctgDbg.c:tqOffsetResetToData
Unexecuted instantiation: ctgRemote.c:tqOffsetResetToData
Unexecuted instantiation: ctgRent.c:tqOffsetResetToData
Unexecuted instantiation: ctgUtil.c:tqOffsetResetToData
Unexecuted instantiation: functionMgt.c:tqOffsetResetToData
Unexecuted instantiation: tudf.c:tqOffsetResetToData
Unexecuted instantiation: builtins.c:tqOffsetResetToData
Unexecuted instantiation: builtinsimpl.c:tqOffsetResetToData
Unexecuted instantiation: thistogram.c:tqOffsetResetToData
Unexecuted instantiation: tpercentile.c:tqOffsetResetToData
Unexecuted instantiation: tavgfunction.c:tqOffsetResetToData
Unexecuted instantiation: tminmax.c:tqOffsetResetToData
Unexecuted instantiation: tminmaxavx.c:tqOffsetResetToData
Unexecuted instantiation: filter.c:tqOffsetResetToData
Unexecuted instantiation: scalar.c:tqOffsetResetToData
Unexecuted instantiation: sclfunc.c:tqOffsetResetToData
Unexecuted instantiation: sclvector.c:tqOffsetResetToData
Unexecuted instantiation: nodesCloneFuncs.c:tqOffsetResetToData
Unexecuted instantiation: nodesCodeFuncs.c:tqOffsetResetToData
Unexecuted instantiation: nodesEqualFuncs.c:tqOffsetResetToData
Unexecuted instantiation: nodesMatchFuncs.c:tqOffsetResetToData
Unexecuted instantiation: nodesMsgFuncs.c:tqOffsetResetToData
Unexecuted instantiation: nodesToSQLFuncs.c:tqOffsetResetToData
Unexecuted instantiation: nodesTraverseFuncs.c:tqOffsetResetToData
Unexecuted instantiation: nodesUtilFuncs.c:tqOffsetResetToData
Unexecuted instantiation: queryUtil.c:tqOffsetResetToData
Unexecuted instantiation: querymsg.c:tqOffsetResetToData
Unexecuted instantiation: trans.c:tqOffsetResetToData
Unexecuted instantiation: transCli.c:tqOffsetResetToData
Unexecuted instantiation: transComm.c:tqOffsetResetToData
Unexecuted instantiation: transSasl.c:tqOffsetResetToData
Unexecuted instantiation: transSvr.c:tqOffsetResetToData
Unexecuted instantiation: transTLS.c:tqOffsetResetToData
Unexecuted instantiation: thttp.c:tqOffsetResetToData
Unexecuted instantiation: geomFunc.c:tqOffsetResetToData
Unexecuted instantiation: tconfig.c:tqOffsetResetToData
Unexecuted instantiation: tdigest.c:tqOffsetResetToData
Unexecuted instantiation: tlog.c:tqOffsetResetToData
Unexecuted instantiation: tmempool.c:tqOffsetResetToData
Unexecuted instantiation: mpDirect.c:tqOffsetResetToData
Unexecuted instantiation: systable.c:tqOffsetResetToData
Unexecuted instantiation: tdatablock.c:tqOffsetResetToData
Unexecuted instantiation: tdataformat.c:tqOffsetResetToData
Unexecuted instantiation: tglobal.c:tqOffsetResetToData
Unexecuted instantiation: tmisce.c:tqOffsetResetToData
Unexecuted instantiation: tname.c:tqOffsetResetToData
Unexecuted instantiation: tpriv.c:tqOffsetResetToData
Unexecuted instantiation: ttime.c:tqOffsetResetToData
Unexecuted instantiation: tvariant.c:tqOffsetResetToData
Unexecuted instantiation: streamMsg.c:tqOffsetResetToData
Unexecuted instantiation: tmsg.c:tqOffsetResetToData
Unexecuted instantiation: xnode.c:tqOffsetResetToData
Unexecuted instantiation: tencrypt.c:tqOffsetResetToData
Unexecuted instantiation: streamJson.c:tqOffsetResetToData
5671
5672
0
static FORCE_INLINE void tqOffsetResetToMeta(STqOffsetVal* pOffsetVal, int64_t uid) {
5673
0
  pOffsetVal->type = TMQ_OFFSET__SNAPSHOT_META;
5674
0
  pOffsetVal->uid = uid;
5675
0
}
Unexecuted instantiation: sql-fuzzer.c:tqOffsetResetToMeta
Unexecuted instantiation: parser.c:tqOffsetResetToMeta
Unexecuted instantiation: parTranslater.c:tqOffsetResetToMeta
Unexecuted instantiation: parUtil.c:tqOffsetResetToMeta
Unexecuted instantiation: parAstParser.c:tqOffsetResetToMeta
Unexecuted instantiation: parAuthenticator.c:tqOffsetResetToMeta
Unexecuted instantiation: parCalcConst.c:tqOffsetResetToMeta
Unexecuted instantiation: parInsertSql.c:tqOffsetResetToMeta
Unexecuted instantiation: parInsertUtil.c:tqOffsetResetToMeta
Unexecuted instantiation: taos_lemon_sql.tab.c:tqOffsetResetToMeta
Unexecuted instantiation: parAstCreater.c:tqOffsetResetToMeta
Unexecuted instantiation: parInsertSml.c:tqOffsetResetToMeta
Unexecuted instantiation: planner.c:tqOffsetResetToMeta
Unexecuted instantiation: planLogicCreater.c:tqOffsetResetToMeta
Unexecuted instantiation: planOptimizer.c:tqOffsetResetToMeta
Unexecuted instantiation: planPhysiCreater.c:tqOffsetResetToMeta
Unexecuted instantiation: planScaleOut.c:tqOffsetResetToMeta
Unexecuted instantiation: planSpliter.c:tqOffsetResetToMeta
Unexecuted instantiation: planUtil.c:tqOffsetResetToMeta
Unexecuted instantiation: planValidator.c:tqOffsetResetToMeta
Unexecuted instantiation: catalog.c:tqOffsetResetToMeta
Unexecuted instantiation: ctgAsync.c:tqOffsetResetToMeta
Unexecuted instantiation: ctgCache.c:tqOffsetResetToMeta
Unexecuted instantiation: ctgDbg.c:tqOffsetResetToMeta
Unexecuted instantiation: ctgRemote.c:tqOffsetResetToMeta
Unexecuted instantiation: ctgRent.c:tqOffsetResetToMeta
Unexecuted instantiation: ctgUtil.c:tqOffsetResetToMeta
Unexecuted instantiation: functionMgt.c:tqOffsetResetToMeta
Unexecuted instantiation: tudf.c:tqOffsetResetToMeta
Unexecuted instantiation: builtins.c:tqOffsetResetToMeta
Unexecuted instantiation: builtinsimpl.c:tqOffsetResetToMeta
Unexecuted instantiation: thistogram.c:tqOffsetResetToMeta
Unexecuted instantiation: tpercentile.c:tqOffsetResetToMeta
Unexecuted instantiation: tavgfunction.c:tqOffsetResetToMeta
Unexecuted instantiation: tminmax.c:tqOffsetResetToMeta
Unexecuted instantiation: tminmaxavx.c:tqOffsetResetToMeta
Unexecuted instantiation: filter.c:tqOffsetResetToMeta
Unexecuted instantiation: scalar.c:tqOffsetResetToMeta
Unexecuted instantiation: sclfunc.c:tqOffsetResetToMeta
Unexecuted instantiation: sclvector.c:tqOffsetResetToMeta
Unexecuted instantiation: nodesCloneFuncs.c:tqOffsetResetToMeta
Unexecuted instantiation: nodesCodeFuncs.c:tqOffsetResetToMeta
Unexecuted instantiation: nodesEqualFuncs.c:tqOffsetResetToMeta
Unexecuted instantiation: nodesMatchFuncs.c:tqOffsetResetToMeta
Unexecuted instantiation: nodesMsgFuncs.c:tqOffsetResetToMeta
Unexecuted instantiation: nodesToSQLFuncs.c:tqOffsetResetToMeta
Unexecuted instantiation: nodesTraverseFuncs.c:tqOffsetResetToMeta
Unexecuted instantiation: nodesUtilFuncs.c:tqOffsetResetToMeta
Unexecuted instantiation: queryUtil.c:tqOffsetResetToMeta
Unexecuted instantiation: querymsg.c:tqOffsetResetToMeta
Unexecuted instantiation: trans.c:tqOffsetResetToMeta
Unexecuted instantiation: transCli.c:tqOffsetResetToMeta
Unexecuted instantiation: transComm.c:tqOffsetResetToMeta
Unexecuted instantiation: transSasl.c:tqOffsetResetToMeta
Unexecuted instantiation: transSvr.c:tqOffsetResetToMeta
Unexecuted instantiation: transTLS.c:tqOffsetResetToMeta
Unexecuted instantiation: thttp.c:tqOffsetResetToMeta
Unexecuted instantiation: geomFunc.c:tqOffsetResetToMeta
Unexecuted instantiation: tconfig.c:tqOffsetResetToMeta
Unexecuted instantiation: tdigest.c:tqOffsetResetToMeta
Unexecuted instantiation: tlog.c:tqOffsetResetToMeta
Unexecuted instantiation: tmempool.c:tqOffsetResetToMeta
Unexecuted instantiation: mpDirect.c:tqOffsetResetToMeta
Unexecuted instantiation: systable.c:tqOffsetResetToMeta
Unexecuted instantiation: tdatablock.c:tqOffsetResetToMeta
Unexecuted instantiation: tdataformat.c:tqOffsetResetToMeta
Unexecuted instantiation: tglobal.c:tqOffsetResetToMeta
Unexecuted instantiation: tmisce.c:tqOffsetResetToMeta
Unexecuted instantiation: tname.c:tqOffsetResetToMeta
Unexecuted instantiation: tpriv.c:tqOffsetResetToMeta
Unexecuted instantiation: ttime.c:tqOffsetResetToMeta
Unexecuted instantiation: tvariant.c:tqOffsetResetToMeta
Unexecuted instantiation: streamMsg.c:tqOffsetResetToMeta
Unexecuted instantiation: tmsg.c:tqOffsetResetToMeta
Unexecuted instantiation: xnode.c:tqOffsetResetToMeta
Unexecuted instantiation: tencrypt.c:tqOffsetResetToMeta
Unexecuted instantiation: streamJson.c:tqOffsetResetToMeta
5676
5677
0
static FORCE_INLINE void tqOffsetResetToLog(STqOffsetVal* pOffsetVal, int64_t ver) {
5678
0
  pOffsetVal->type = TMQ_OFFSET__LOG;
5679
0
  pOffsetVal->version = ver;
5680
0
}
Unexecuted instantiation: sql-fuzzer.c:tqOffsetResetToLog
Unexecuted instantiation: parser.c:tqOffsetResetToLog
Unexecuted instantiation: parTranslater.c:tqOffsetResetToLog
Unexecuted instantiation: parUtil.c:tqOffsetResetToLog
Unexecuted instantiation: parAstParser.c:tqOffsetResetToLog
Unexecuted instantiation: parAuthenticator.c:tqOffsetResetToLog
Unexecuted instantiation: parCalcConst.c:tqOffsetResetToLog
Unexecuted instantiation: parInsertSql.c:tqOffsetResetToLog
Unexecuted instantiation: parInsertUtil.c:tqOffsetResetToLog
Unexecuted instantiation: taos_lemon_sql.tab.c:tqOffsetResetToLog
Unexecuted instantiation: parAstCreater.c:tqOffsetResetToLog
Unexecuted instantiation: parInsertSml.c:tqOffsetResetToLog
Unexecuted instantiation: planner.c:tqOffsetResetToLog
Unexecuted instantiation: planLogicCreater.c:tqOffsetResetToLog
Unexecuted instantiation: planOptimizer.c:tqOffsetResetToLog
Unexecuted instantiation: planPhysiCreater.c:tqOffsetResetToLog
Unexecuted instantiation: planScaleOut.c:tqOffsetResetToLog
Unexecuted instantiation: planSpliter.c:tqOffsetResetToLog
Unexecuted instantiation: planUtil.c:tqOffsetResetToLog
Unexecuted instantiation: planValidator.c:tqOffsetResetToLog
Unexecuted instantiation: catalog.c:tqOffsetResetToLog
Unexecuted instantiation: ctgAsync.c:tqOffsetResetToLog
Unexecuted instantiation: ctgCache.c:tqOffsetResetToLog
Unexecuted instantiation: ctgDbg.c:tqOffsetResetToLog
Unexecuted instantiation: ctgRemote.c:tqOffsetResetToLog
Unexecuted instantiation: ctgRent.c:tqOffsetResetToLog
Unexecuted instantiation: ctgUtil.c:tqOffsetResetToLog
Unexecuted instantiation: functionMgt.c:tqOffsetResetToLog
Unexecuted instantiation: tudf.c:tqOffsetResetToLog
Unexecuted instantiation: builtins.c:tqOffsetResetToLog
Unexecuted instantiation: builtinsimpl.c:tqOffsetResetToLog
Unexecuted instantiation: thistogram.c:tqOffsetResetToLog
Unexecuted instantiation: tpercentile.c:tqOffsetResetToLog
Unexecuted instantiation: tavgfunction.c:tqOffsetResetToLog
Unexecuted instantiation: tminmax.c:tqOffsetResetToLog
Unexecuted instantiation: tminmaxavx.c:tqOffsetResetToLog
Unexecuted instantiation: filter.c:tqOffsetResetToLog
Unexecuted instantiation: scalar.c:tqOffsetResetToLog
Unexecuted instantiation: sclfunc.c:tqOffsetResetToLog
Unexecuted instantiation: sclvector.c:tqOffsetResetToLog
Unexecuted instantiation: nodesCloneFuncs.c:tqOffsetResetToLog
Unexecuted instantiation: nodesCodeFuncs.c:tqOffsetResetToLog
Unexecuted instantiation: nodesEqualFuncs.c:tqOffsetResetToLog
Unexecuted instantiation: nodesMatchFuncs.c:tqOffsetResetToLog
Unexecuted instantiation: nodesMsgFuncs.c:tqOffsetResetToLog
Unexecuted instantiation: nodesToSQLFuncs.c:tqOffsetResetToLog
Unexecuted instantiation: nodesTraverseFuncs.c:tqOffsetResetToLog
Unexecuted instantiation: nodesUtilFuncs.c:tqOffsetResetToLog
Unexecuted instantiation: queryUtil.c:tqOffsetResetToLog
Unexecuted instantiation: querymsg.c:tqOffsetResetToLog
Unexecuted instantiation: trans.c:tqOffsetResetToLog
Unexecuted instantiation: transCli.c:tqOffsetResetToLog
Unexecuted instantiation: transComm.c:tqOffsetResetToLog
Unexecuted instantiation: transSasl.c:tqOffsetResetToLog
Unexecuted instantiation: transSvr.c:tqOffsetResetToLog
Unexecuted instantiation: transTLS.c:tqOffsetResetToLog
Unexecuted instantiation: thttp.c:tqOffsetResetToLog
Unexecuted instantiation: geomFunc.c:tqOffsetResetToLog
Unexecuted instantiation: tconfig.c:tqOffsetResetToLog
Unexecuted instantiation: tdigest.c:tqOffsetResetToLog
Unexecuted instantiation: tlog.c:tqOffsetResetToLog
Unexecuted instantiation: tmempool.c:tqOffsetResetToLog
Unexecuted instantiation: mpDirect.c:tqOffsetResetToLog
Unexecuted instantiation: systable.c:tqOffsetResetToLog
Unexecuted instantiation: tdatablock.c:tqOffsetResetToLog
Unexecuted instantiation: tdataformat.c:tqOffsetResetToLog
Unexecuted instantiation: tglobal.c:tqOffsetResetToLog
Unexecuted instantiation: tmisce.c:tqOffsetResetToLog
Unexecuted instantiation: tname.c:tqOffsetResetToLog
Unexecuted instantiation: tpriv.c:tqOffsetResetToLog
Unexecuted instantiation: ttime.c:tqOffsetResetToLog
Unexecuted instantiation: tvariant.c:tqOffsetResetToLog
Unexecuted instantiation: streamMsg.c:tqOffsetResetToLog
Unexecuted instantiation: tmsg.c:tqOffsetResetToLog
Unexecuted instantiation: xnode.c:tqOffsetResetToLog
Unexecuted instantiation: tencrypt.c:tqOffsetResetToLog
Unexecuted instantiation: streamJson.c:tqOffsetResetToLog
5681
5682
int32_t tEncodeSTqOffsetVal(SEncoder* pEncoder, const STqOffsetVal* pOffsetVal);
5683
int32_t tDecodeSTqOffsetVal(SDecoder* pDecoder, STqOffsetVal* pOffsetVal);
5684
void    tFormatOffset(char* buf, int32_t maxLen, const STqOffsetVal* pVal);
5685
bool    tOffsetEqual(const STqOffsetVal* pLeft, const STqOffsetVal* pRight);
5686
void    tOffsetCopy(STqOffsetVal* pLeft, const STqOffsetVal* pRight);
5687
void    tOffsetDestroy(void* pVal);
5688
5689
typedef struct {
5690
  STqOffsetVal val;
5691
  char         subKey[TSDB_SUBSCRIBE_KEY_LEN];
5692
} STqOffset;
5693
5694
int32_t tEncodeSTqOffset(SEncoder* pEncoder, const STqOffset* pOffset);
5695
int32_t tDecodeSTqOffset(SDecoder* pDecoder, STqOffset* pOffset);
5696
void    tDeleteSTqOffset(void* val);
5697
5698
typedef struct SMqVgOffset {
5699
  int64_t   consumerId;
5700
  STqOffset offset;
5701
} SMqVgOffset;
5702
5703
int32_t tEncodeMqVgOffset(SEncoder* pEncoder, const SMqVgOffset* pOffset);
5704
int32_t tDecodeMqVgOffset(SDecoder* pDecoder, SMqVgOffset* pOffset);
5705
5706
typedef struct {
5707
  char    name[TSDB_TABLE_FNAME_LEN];
5708
  char    stb[TSDB_TABLE_FNAME_LEN];
5709
  int8_t  igExists;
5710
  int8_t  intervalUnit;
5711
  int8_t  slidingUnit;
5712
  int8_t  timezone;  // int8_t is not enough, timezone is unit of second
5713
  int32_t dstVgId;   // for stream
5714
  int64_t interval;
5715
  int64_t offset;
5716
  int64_t sliding;
5717
  int64_t maxDelay;
5718
  int64_t watermark;
5719
  int32_t exprLen;        // strlen + 1
5720
  int32_t tagsFilterLen;  // strlen + 1
5721
  int32_t sqlLen;         // strlen + 1
5722
  int32_t astLen;         // strlen + 1
5723
  char*   expr;
5724
  char*   tagsFilter;
5725
  char*   sql;
5726
  char*   ast;
5727
  int64_t deleteMark;
5728
  int64_t lastTs;
5729
  int64_t normSourceTbUid;  // the Uid of source tb if its a normal table, otherwise 0
5730
  SArray* pVgroupVerList;
5731
  int8_t  recursiveTsma;
5732
  char    baseTsmaName[TSDB_TABLE_FNAME_LEN];  // base tsma name for recursively created tsma
5733
  char*   createStreamReq;
5734
  int32_t streamReqLen;
5735
  char*   dropStreamReq;
5736
  int32_t dropStreamReqLen;
5737
  int64_t uid;
5738
} SMCreateSmaReq;
5739
5740
int32_t tSerializeSMCreateSmaReq(void* buf, int32_t bufLen, SMCreateSmaReq* pReq);
5741
int32_t tDeserializeSMCreateSmaReq(void* buf, int32_t bufLen, SMCreateSmaReq* pReq);
5742
void    tFreeSMCreateSmaReq(SMCreateSmaReq* pReq);
5743
5744
typedef struct {
5745
  char    name[TSDB_TABLE_FNAME_LEN];
5746
  int8_t  igNotExists;
5747
  char*   dropStreamReq;
5748
  int32_t dropStreamReqLen;
5749
} SMDropSmaReq;
5750
5751
int32_t tSerializeSMDropSmaReq(void* buf, int32_t bufLen, SMDropSmaReq* pReq);
5752
int32_t tDeserializeSMDropSmaReq(void* buf, int32_t bufLen, SMDropSmaReq* pReq);
5753
void    tFreeSMDropSmaReq(SMDropSmaReq* pReq);
5754
5755
typedef struct {
5756
  char name[TSDB_TABLE_NAME_LEN];
5757
  union {
5758
    char tbFName[TSDB_TABLE_FNAME_LEN];  // used by mnode
5759
    char tbName[TSDB_TABLE_NAME_LEN];    // used by vnode
5760
  };
5761
  int8_t tbType;  // ETableType: 1 stable, 3 normal table
5762
  union {
5763
    int8_t igExists;   // used by mnode
5764
    int8_t alterType;  // used by vnode
5765
  };
5766
  int8_t     intervalUnit;
5767
  int16_t    nFuncs;       // number of functions specified by user
5768
  col_id_t*  funcColIds;   // column ids specified by user
5769
  func_id_t* funcIds;      // function ids specified by user
5770
  int64_t    interval[2];  // 0 unspecified, > 0 valid interval
5771
  int64_t    tbUid;
5772
  int64_t    uid;     // rsma uid
5773
  int32_t    sqlLen;  // strlen + 1
5774
  char*      sql;
5775
} SMCreateRsmaReq;
5776
5777
int32_t tSerializeSMCreateRsmaReq(void* buf, int32_t bufLen, SMCreateRsmaReq* pReq);
5778
int32_t tDeserializeSMCreateRsmaReq(void* buf, int32_t bufLen, SMCreateRsmaReq* pReq);
5779
void    tFreeSMCreateRsmaReq(SMCreateRsmaReq* pReq);
5780
5781
typedef SMCreateRsmaReq SVCreateRsmaReq;
5782
5783
int32_t tSerializeSVCreateRsmaReq(void* buf, int32_t bufLen, SVCreateRsmaReq* pReq);
5784
int32_t tDeserializeSVCreateRsmaReq(void* buf, int32_t bufLen, SVCreateRsmaReq* pReq);
5785
void    tFreeSVCreateRsmaReq(SVCreateRsmaReq* pReq);
5786
5787
typedef SMCreateRsmaReq SVAlterRsmaReq;
5788
5789
int32_t tSerializeSVAlterRsmaReq(void* buf, int32_t bufLen, SVAlterRsmaReq* pReq);
5790
int32_t tDeserializeSVAlterRsmaReq(void* buf, int32_t bufLen, SVAlterRsmaReq* pReq);
5791
void    tFreeSVAlterRsmaReq(SVAlterRsmaReq* pReq);
5792
5793
typedef struct {
5794
  char       name[TSDB_TABLE_NAME_LEN];
5795
  int8_t     alterType;
5796
  int8_t     tbType;  // ETableType: 1 stable, 3 normal table
5797
  int8_t     igNotExists;
5798
  int16_t    nFuncs;      // number of functions specified by user
5799
  col_id_t*  funcColIds;  // column ids specified by user
5800
  func_id_t* funcIds;     // function ids specified by user
5801
  int32_t    sqlLen;      // strlen + 1
5802
  char*      sql;
5803
} SMAlterRsmaReq;
5804
5805
int32_t tSerializeSMAlterRsmaReq(void* buf, int32_t bufLen, SMAlterRsmaReq* pReq);
5806
int32_t tDeserializeSMAlterRsmaReq(void* buf, int32_t bufLen, SMAlterRsmaReq* pReq);
5807
void    tFreeSMAlterRsmaReq(SMAlterRsmaReq* pReq);
5808
5809
typedef struct {
5810
  int64_t    id;
5811
  char       name[TSDB_TABLE_NAME_LEN];
5812
  char       tbFName[TSDB_TABLE_FNAME_LEN];
5813
  int64_t    ownerId;
5814
  int32_t    code;
5815
  int32_t    version;
5816
  int8_t     tbType;
5817
  int8_t     intervalUnit;
5818
  col_id_t   nFuncs;
5819
  col_id_t   nColNames;
5820
  int64_t    interval[2];
5821
  col_id_t*  funcColIds;
5822
  func_id_t* funcIds;
5823
  SArray*    colNames;
5824
} SRsmaInfoRsp;
5825
5826
int32_t tSerializeRsmaInfoRsp(void* buf, int32_t bufLen, SRsmaInfoRsp* pReq);
5827
int32_t tDeserializeRsmaInfoRsp(void* buf, int32_t bufLen, SRsmaInfoRsp* pReq);
5828
void    tFreeRsmaInfoRsp(SRsmaInfoRsp* pReq, bool deep);
5829
5830
typedef struct {
5831
  char   name[TSDB_TABLE_FNAME_LEN];
5832
  int8_t igNotExists;
5833
} SMDropRsmaReq;
5834
5835
int32_t tSerializeSMDropRsmaReq(void* buf, int32_t bufLen, SMDropRsmaReq* pReq);
5836
int32_t tDeserializeSMDropRsmaReq(void* buf, int32_t bufLen, SMDropRsmaReq* pReq);
5837
5838
typedef struct {
5839
  char    name[TSDB_TABLE_NAME_LEN];
5840
  char    tbName[TSDB_TABLE_NAME_LEN];
5841
  int64_t uid;
5842
  int64_t tbUid;
5843
  int8_t  tbType;
5844
} SVDropRsmaReq;
5845
5846
int32_t tSerializeSVDropRsmaReq(void* buf, int32_t bufLen, SVDropRsmaReq* pReq);
5847
int32_t tDeserializeSVDropRsmaReq(void* buf, int32_t bufLen, SVDropRsmaReq* pReq);
5848
5849
typedef struct {
5850
  char   dbFName[TSDB_DB_FNAME_LEN];
5851
  char   stbName[TSDB_TABLE_NAME_LEN];
5852
  char   colName[TSDB_COL_NAME_LEN];
5853
  char   idxName[TSDB_INDEX_FNAME_LEN];
5854
  int8_t idxType;
5855
} SCreateTagIndexReq;
5856
5857
int32_t tSerializeSCreateTagIdxReq(void* buf, int32_t bufLen, SCreateTagIndexReq* pReq);
5858
int32_t tDeserializeSCreateTagIdxReq(void* buf, int32_t bufLen, SCreateTagIndexReq* pReq);
5859
5860
typedef SMDropSmaReq SDropTagIndexReq;
5861
5862
// int32_t tSerializeSDropTagIdxReq(void* buf, int32_t bufLen, SDropTagIndexReq* pReq);
5863
int32_t tDeserializeSDropTagIdxReq(void* buf, int32_t bufLen, SDropTagIndexReq* pReq);
5864
5865
typedef struct {
5866
  int8_t         version;       // for compatibility(default 0)
5867
  int8_t         intervalUnit;  // MACRO: TIME_UNIT_XXX
5868
  int8_t         slidingUnit;   // MACRO: TIME_UNIT_XXX
5869
  int8_t         timezoneInt;   // sma data expired if timezone changes.
5870
  int32_t        dstVgId;
5871
  char           indexName[TSDB_INDEX_NAME_LEN];
5872
  int32_t        exprLen;
5873
  int32_t        tagsFilterLen;
5874
  int64_t        indexUid;
5875
  tb_uid_t       tableUid;  // super/child/common table uid
5876
  tb_uid_t       dstTbUid;  // for dstVgroup
5877
  int64_t        interval;
5878
  int64_t        offset;  // use unit by precision of DB
5879
  int64_t        sliding;
5880
  char*          dstTbName;  // for dstVgroup
5881
  char*          expr;       // sma expression
5882
  char*          tagsFilter;
5883
  SSchemaWrapper schemaRow;  // for dstVgroup
5884
  SSchemaWrapper schemaTag;  // for dstVgroup
5885
} STSma;                     // Time-range-wise SMA
5886
5887
typedef STSma SVCreateTSmaReq;
5888
5889
typedef struct {
5890
  int8_t  type;  // 0 status report, 1 update data
5891
  int64_t indexUid;
5892
  int64_t skey;  // start TS key of interval/sliding window
5893
} STSmaMsg;
5894
5895
typedef struct {
5896
  int64_t indexUid;
5897
  char    indexName[TSDB_INDEX_NAME_LEN];
5898
} SVDropTSmaReq;
5899
5900
typedef struct {
5901
  int tmp;  // TODO: to avoid compile error
5902
} SVCreateTSmaRsp, SVDropTSmaRsp;
5903
5904
#if 0
5905
int32_t tSerializeSVCreateTSmaReq(void** buf, SVCreateTSmaReq* pReq);
5906
void*   tDeserializeSVCreateTSmaReq(void* buf, SVCreateTSmaReq* pReq);
5907
int32_t tSerializeSVDropTSmaReq(void** buf, SVDropTSmaReq* pReq);
5908
void*   tDeserializeSVDropTSmaReq(void* buf, SVDropTSmaReq* pReq);
5909
#endif
5910
5911
int32_t tEncodeSVCreateTSmaReq(SEncoder* pCoder, const SVCreateTSmaReq* pReq);
5912
int32_t tDecodeSVCreateTSmaReq(SDecoder* pCoder, SVCreateTSmaReq* pReq);
5913
int32_t tEncodeSVDropTSmaReq(SEncoder* pCoder, const SVDropTSmaReq* pReq);
5914
// int32_t tDecodeSVDropTSmaReq(SDecoder* pCoder, SVDropTSmaReq* pReq);
5915
5916
typedef struct {
5917
  int32_t number;
5918
  STSma*  tSma;
5919
} STSmaWrapper;
5920
5921
0
static FORCE_INLINE void tDestroyTSma(STSma* pSma) {
5922
0
  if (pSma) {
5923
0
    taosMemoryFreeClear(pSma->dstTbName);
5924
0
    taosMemoryFreeClear(pSma->expr);
5925
0
    taosMemoryFreeClear(pSma->tagsFilter);
5926
0
  }
5927
0
}
Unexecuted instantiation: sql-fuzzer.c:tDestroyTSma
Unexecuted instantiation: parser.c:tDestroyTSma
Unexecuted instantiation: parTranslater.c:tDestroyTSma
Unexecuted instantiation: parUtil.c:tDestroyTSma
Unexecuted instantiation: parAstParser.c:tDestroyTSma
Unexecuted instantiation: parAuthenticator.c:tDestroyTSma
Unexecuted instantiation: parCalcConst.c:tDestroyTSma
Unexecuted instantiation: parInsertSql.c:tDestroyTSma
Unexecuted instantiation: parInsertUtil.c:tDestroyTSma
Unexecuted instantiation: taos_lemon_sql.tab.c:tDestroyTSma
Unexecuted instantiation: parAstCreater.c:tDestroyTSma
Unexecuted instantiation: parInsertSml.c:tDestroyTSma
Unexecuted instantiation: planner.c:tDestroyTSma
Unexecuted instantiation: planLogicCreater.c:tDestroyTSma
Unexecuted instantiation: planOptimizer.c:tDestroyTSma
Unexecuted instantiation: planPhysiCreater.c:tDestroyTSma
Unexecuted instantiation: planScaleOut.c:tDestroyTSma
Unexecuted instantiation: planSpliter.c:tDestroyTSma
Unexecuted instantiation: planUtil.c:tDestroyTSma
Unexecuted instantiation: planValidator.c:tDestroyTSma
Unexecuted instantiation: catalog.c:tDestroyTSma
Unexecuted instantiation: ctgAsync.c:tDestroyTSma
Unexecuted instantiation: ctgCache.c:tDestroyTSma
Unexecuted instantiation: ctgDbg.c:tDestroyTSma
Unexecuted instantiation: ctgRemote.c:tDestroyTSma
Unexecuted instantiation: ctgRent.c:tDestroyTSma
Unexecuted instantiation: ctgUtil.c:tDestroyTSma
Unexecuted instantiation: functionMgt.c:tDestroyTSma
Unexecuted instantiation: tudf.c:tDestroyTSma
Unexecuted instantiation: builtins.c:tDestroyTSma
Unexecuted instantiation: builtinsimpl.c:tDestroyTSma
Unexecuted instantiation: thistogram.c:tDestroyTSma
Unexecuted instantiation: tpercentile.c:tDestroyTSma
Unexecuted instantiation: tavgfunction.c:tDestroyTSma
Unexecuted instantiation: tminmax.c:tDestroyTSma
Unexecuted instantiation: tminmaxavx.c:tDestroyTSma
Unexecuted instantiation: filter.c:tDestroyTSma
Unexecuted instantiation: scalar.c:tDestroyTSma
Unexecuted instantiation: sclfunc.c:tDestroyTSma
Unexecuted instantiation: sclvector.c:tDestroyTSma
Unexecuted instantiation: nodesCloneFuncs.c:tDestroyTSma
Unexecuted instantiation: nodesCodeFuncs.c:tDestroyTSma
Unexecuted instantiation: nodesEqualFuncs.c:tDestroyTSma
Unexecuted instantiation: nodesMatchFuncs.c:tDestroyTSma
Unexecuted instantiation: nodesMsgFuncs.c:tDestroyTSma
Unexecuted instantiation: nodesToSQLFuncs.c:tDestroyTSma
Unexecuted instantiation: nodesTraverseFuncs.c:tDestroyTSma
Unexecuted instantiation: nodesUtilFuncs.c:tDestroyTSma
Unexecuted instantiation: queryUtil.c:tDestroyTSma
Unexecuted instantiation: querymsg.c:tDestroyTSma
Unexecuted instantiation: trans.c:tDestroyTSma
Unexecuted instantiation: transCli.c:tDestroyTSma
Unexecuted instantiation: transComm.c:tDestroyTSma
Unexecuted instantiation: transSasl.c:tDestroyTSma
Unexecuted instantiation: transSvr.c:tDestroyTSma
Unexecuted instantiation: transTLS.c:tDestroyTSma
Unexecuted instantiation: thttp.c:tDestroyTSma
Unexecuted instantiation: geomFunc.c:tDestroyTSma
Unexecuted instantiation: tconfig.c:tDestroyTSma
Unexecuted instantiation: tdigest.c:tDestroyTSma
Unexecuted instantiation: tlog.c:tDestroyTSma
Unexecuted instantiation: tmempool.c:tDestroyTSma
Unexecuted instantiation: mpDirect.c:tDestroyTSma
Unexecuted instantiation: systable.c:tDestroyTSma
Unexecuted instantiation: tdatablock.c:tDestroyTSma
Unexecuted instantiation: tdataformat.c:tDestroyTSma
Unexecuted instantiation: tglobal.c:tDestroyTSma
Unexecuted instantiation: tmisce.c:tDestroyTSma
Unexecuted instantiation: tname.c:tDestroyTSma
Unexecuted instantiation: tpriv.c:tDestroyTSma
Unexecuted instantiation: ttime.c:tDestroyTSma
Unexecuted instantiation: tvariant.c:tDestroyTSma
Unexecuted instantiation: streamMsg.c:tDestroyTSma
Unexecuted instantiation: tmsg.c:tDestroyTSma
Unexecuted instantiation: xnode.c:tDestroyTSma
Unexecuted instantiation: tencrypt.c:tDestroyTSma
Unexecuted instantiation: streamJson.c:tDestroyTSma
5928
5929
0
static FORCE_INLINE void tDestroyTSmaWrapper(STSmaWrapper* pSW, bool deepCopy) {
5930
0
  if (pSW) {
5931
0
    if (pSW->tSma) {
5932
0
      if (deepCopy) {
5933
0
        for (uint32_t i = 0; i < pSW->number; ++i) {
5934
0
          tDestroyTSma(pSW->tSma + i);
5935
0
        }
5936
0
      }
5937
0
      taosMemoryFreeClear(pSW->tSma);
5938
0
    }
5939
0
  }
5940
0
}
Unexecuted instantiation: sql-fuzzer.c:tDestroyTSmaWrapper
Unexecuted instantiation: parser.c:tDestroyTSmaWrapper
Unexecuted instantiation: parTranslater.c:tDestroyTSmaWrapper
Unexecuted instantiation: parUtil.c:tDestroyTSmaWrapper
Unexecuted instantiation: parAstParser.c:tDestroyTSmaWrapper
Unexecuted instantiation: parAuthenticator.c:tDestroyTSmaWrapper
Unexecuted instantiation: parCalcConst.c:tDestroyTSmaWrapper
Unexecuted instantiation: parInsertSql.c:tDestroyTSmaWrapper
Unexecuted instantiation: parInsertUtil.c:tDestroyTSmaWrapper
Unexecuted instantiation: taos_lemon_sql.tab.c:tDestroyTSmaWrapper
Unexecuted instantiation: parAstCreater.c:tDestroyTSmaWrapper
Unexecuted instantiation: parInsertSml.c:tDestroyTSmaWrapper
Unexecuted instantiation: planner.c:tDestroyTSmaWrapper
Unexecuted instantiation: planLogicCreater.c:tDestroyTSmaWrapper
Unexecuted instantiation: planOptimizer.c:tDestroyTSmaWrapper
Unexecuted instantiation: planPhysiCreater.c:tDestroyTSmaWrapper
Unexecuted instantiation: planScaleOut.c:tDestroyTSmaWrapper
Unexecuted instantiation: planSpliter.c:tDestroyTSmaWrapper
Unexecuted instantiation: planUtil.c:tDestroyTSmaWrapper
Unexecuted instantiation: planValidator.c:tDestroyTSmaWrapper
Unexecuted instantiation: catalog.c:tDestroyTSmaWrapper
Unexecuted instantiation: ctgAsync.c:tDestroyTSmaWrapper
Unexecuted instantiation: ctgCache.c:tDestroyTSmaWrapper
Unexecuted instantiation: ctgDbg.c:tDestroyTSmaWrapper
Unexecuted instantiation: ctgRemote.c:tDestroyTSmaWrapper
Unexecuted instantiation: ctgRent.c:tDestroyTSmaWrapper
Unexecuted instantiation: ctgUtil.c:tDestroyTSmaWrapper
Unexecuted instantiation: functionMgt.c:tDestroyTSmaWrapper
Unexecuted instantiation: tudf.c:tDestroyTSmaWrapper
Unexecuted instantiation: builtins.c:tDestroyTSmaWrapper
Unexecuted instantiation: builtinsimpl.c:tDestroyTSmaWrapper
Unexecuted instantiation: thistogram.c:tDestroyTSmaWrapper
Unexecuted instantiation: tpercentile.c:tDestroyTSmaWrapper
Unexecuted instantiation: tavgfunction.c:tDestroyTSmaWrapper
Unexecuted instantiation: tminmax.c:tDestroyTSmaWrapper
Unexecuted instantiation: tminmaxavx.c:tDestroyTSmaWrapper
Unexecuted instantiation: filter.c:tDestroyTSmaWrapper
Unexecuted instantiation: scalar.c:tDestroyTSmaWrapper
Unexecuted instantiation: sclfunc.c:tDestroyTSmaWrapper
Unexecuted instantiation: sclvector.c:tDestroyTSmaWrapper
Unexecuted instantiation: nodesCloneFuncs.c:tDestroyTSmaWrapper
Unexecuted instantiation: nodesCodeFuncs.c:tDestroyTSmaWrapper
Unexecuted instantiation: nodesEqualFuncs.c:tDestroyTSmaWrapper
Unexecuted instantiation: nodesMatchFuncs.c:tDestroyTSmaWrapper
Unexecuted instantiation: nodesMsgFuncs.c:tDestroyTSmaWrapper
Unexecuted instantiation: nodesToSQLFuncs.c:tDestroyTSmaWrapper
Unexecuted instantiation: nodesTraverseFuncs.c:tDestroyTSmaWrapper
Unexecuted instantiation: nodesUtilFuncs.c:tDestroyTSmaWrapper
Unexecuted instantiation: queryUtil.c:tDestroyTSmaWrapper
Unexecuted instantiation: querymsg.c:tDestroyTSmaWrapper
Unexecuted instantiation: trans.c:tDestroyTSmaWrapper
Unexecuted instantiation: transCli.c:tDestroyTSmaWrapper
Unexecuted instantiation: transComm.c:tDestroyTSmaWrapper
Unexecuted instantiation: transSasl.c:tDestroyTSmaWrapper
Unexecuted instantiation: transSvr.c:tDestroyTSmaWrapper
Unexecuted instantiation: transTLS.c:tDestroyTSmaWrapper
Unexecuted instantiation: thttp.c:tDestroyTSmaWrapper
Unexecuted instantiation: geomFunc.c:tDestroyTSmaWrapper
Unexecuted instantiation: tconfig.c:tDestroyTSmaWrapper
Unexecuted instantiation: tdigest.c:tDestroyTSmaWrapper
Unexecuted instantiation: tlog.c:tDestroyTSmaWrapper
Unexecuted instantiation: tmempool.c:tDestroyTSmaWrapper
Unexecuted instantiation: mpDirect.c:tDestroyTSmaWrapper
Unexecuted instantiation: systable.c:tDestroyTSmaWrapper
Unexecuted instantiation: tdatablock.c:tDestroyTSmaWrapper
Unexecuted instantiation: tdataformat.c:tDestroyTSmaWrapper
Unexecuted instantiation: tglobal.c:tDestroyTSmaWrapper
Unexecuted instantiation: tmisce.c:tDestroyTSmaWrapper
Unexecuted instantiation: tname.c:tDestroyTSmaWrapper
Unexecuted instantiation: tpriv.c:tDestroyTSmaWrapper
Unexecuted instantiation: ttime.c:tDestroyTSmaWrapper
Unexecuted instantiation: tvariant.c:tDestroyTSmaWrapper
Unexecuted instantiation: streamMsg.c:tDestroyTSmaWrapper
Unexecuted instantiation: tmsg.c:tDestroyTSmaWrapper
Unexecuted instantiation: xnode.c:tDestroyTSmaWrapper
Unexecuted instantiation: tencrypt.c:tDestroyTSmaWrapper
Unexecuted instantiation: streamJson.c:tDestroyTSmaWrapper
5941
5942
0
static FORCE_INLINE void* tFreeTSmaWrapper(STSmaWrapper* pSW, bool deepCopy) {
5943
0
  tDestroyTSmaWrapper(pSW, deepCopy);
5944
0
  taosMemoryFreeClear(pSW);
5945
0
  return NULL;
5946
0
}
Unexecuted instantiation: sql-fuzzer.c:tFreeTSmaWrapper
Unexecuted instantiation: parser.c:tFreeTSmaWrapper
Unexecuted instantiation: parTranslater.c:tFreeTSmaWrapper
Unexecuted instantiation: parUtil.c:tFreeTSmaWrapper
Unexecuted instantiation: parAstParser.c:tFreeTSmaWrapper
Unexecuted instantiation: parAuthenticator.c:tFreeTSmaWrapper
Unexecuted instantiation: parCalcConst.c:tFreeTSmaWrapper
Unexecuted instantiation: parInsertSql.c:tFreeTSmaWrapper
Unexecuted instantiation: parInsertUtil.c:tFreeTSmaWrapper
Unexecuted instantiation: taos_lemon_sql.tab.c:tFreeTSmaWrapper
Unexecuted instantiation: parAstCreater.c:tFreeTSmaWrapper
Unexecuted instantiation: parInsertSml.c:tFreeTSmaWrapper
Unexecuted instantiation: planner.c:tFreeTSmaWrapper
Unexecuted instantiation: planLogicCreater.c:tFreeTSmaWrapper
Unexecuted instantiation: planOptimizer.c:tFreeTSmaWrapper
Unexecuted instantiation: planPhysiCreater.c:tFreeTSmaWrapper
Unexecuted instantiation: planScaleOut.c:tFreeTSmaWrapper
Unexecuted instantiation: planSpliter.c:tFreeTSmaWrapper
Unexecuted instantiation: planUtil.c:tFreeTSmaWrapper
Unexecuted instantiation: planValidator.c:tFreeTSmaWrapper
Unexecuted instantiation: catalog.c:tFreeTSmaWrapper
Unexecuted instantiation: ctgAsync.c:tFreeTSmaWrapper
Unexecuted instantiation: ctgCache.c:tFreeTSmaWrapper
Unexecuted instantiation: ctgDbg.c:tFreeTSmaWrapper
Unexecuted instantiation: ctgRemote.c:tFreeTSmaWrapper
Unexecuted instantiation: ctgRent.c:tFreeTSmaWrapper
Unexecuted instantiation: ctgUtil.c:tFreeTSmaWrapper
Unexecuted instantiation: functionMgt.c:tFreeTSmaWrapper
Unexecuted instantiation: tudf.c:tFreeTSmaWrapper
Unexecuted instantiation: builtins.c:tFreeTSmaWrapper
Unexecuted instantiation: builtinsimpl.c:tFreeTSmaWrapper
Unexecuted instantiation: thistogram.c:tFreeTSmaWrapper
Unexecuted instantiation: tpercentile.c:tFreeTSmaWrapper
Unexecuted instantiation: tavgfunction.c:tFreeTSmaWrapper
Unexecuted instantiation: tminmax.c:tFreeTSmaWrapper
Unexecuted instantiation: tminmaxavx.c:tFreeTSmaWrapper
Unexecuted instantiation: filter.c:tFreeTSmaWrapper
Unexecuted instantiation: scalar.c:tFreeTSmaWrapper
Unexecuted instantiation: sclfunc.c:tFreeTSmaWrapper
Unexecuted instantiation: sclvector.c:tFreeTSmaWrapper
Unexecuted instantiation: nodesCloneFuncs.c:tFreeTSmaWrapper
Unexecuted instantiation: nodesCodeFuncs.c:tFreeTSmaWrapper
Unexecuted instantiation: nodesEqualFuncs.c:tFreeTSmaWrapper
Unexecuted instantiation: nodesMatchFuncs.c:tFreeTSmaWrapper
Unexecuted instantiation: nodesMsgFuncs.c:tFreeTSmaWrapper
Unexecuted instantiation: nodesToSQLFuncs.c:tFreeTSmaWrapper
Unexecuted instantiation: nodesTraverseFuncs.c:tFreeTSmaWrapper
Unexecuted instantiation: nodesUtilFuncs.c:tFreeTSmaWrapper
Unexecuted instantiation: queryUtil.c:tFreeTSmaWrapper
Unexecuted instantiation: querymsg.c:tFreeTSmaWrapper
Unexecuted instantiation: trans.c:tFreeTSmaWrapper
Unexecuted instantiation: transCli.c:tFreeTSmaWrapper
Unexecuted instantiation: transComm.c:tFreeTSmaWrapper
Unexecuted instantiation: transSasl.c:tFreeTSmaWrapper
Unexecuted instantiation: transSvr.c:tFreeTSmaWrapper
Unexecuted instantiation: transTLS.c:tFreeTSmaWrapper
Unexecuted instantiation: thttp.c:tFreeTSmaWrapper
Unexecuted instantiation: geomFunc.c:tFreeTSmaWrapper
Unexecuted instantiation: tconfig.c:tFreeTSmaWrapper
Unexecuted instantiation: tdigest.c:tFreeTSmaWrapper
Unexecuted instantiation: tlog.c:tFreeTSmaWrapper
Unexecuted instantiation: tmempool.c:tFreeTSmaWrapper
Unexecuted instantiation: mpDirect.c:tFreeTSmaWrapper
Unexecuted instantiation: systable.c:tFreeTSmaWrapper
Unexecuted instantiation: tdatablock.c:tFreeTSmaWrapper
Unexecuted instantiation: tdataformat.c:tFreeTSmaWrapper
Unexecuted instantiation: tglobal.c:tFreeTSmaWrapper
Unexecuted instantiation: tmisce.c:tFreeTSmaWrapper
Unexecuted instantiation: tname.c:tFreeTSmaWrapper
Unexecuted instantiation: tpriv.c:tFreeTSmaWrapper
Unexecuted instantiation: ttime.c:tFreeTSmaWrapper
Unexecuted instantiation: tvariant.c:tFreeTSmaWrapper
Unexecuted instantiation: streamMsg.c:tFreeTSmaWrapper
Unexecuted instantiation: tmsg.c:tFreeTSmaWrapper
Unexecuted instantiation: xnode.c:tFreeTSmaWrapper
Unexecuted instantiation: tencrypt.c:tFreeTSmaWrapper
Unexecuted instantiation: streamJson.c:tFreeTSmaWrapper
5947
5948
int32_t tEncodeSVCreateTSmaReq(SEncoder* pCoder, const SVCreateTSmaReq* pReq);
5949
int32_t tDecodeSVCreateTSmaReq(SDecoder* pCoder, SVCreateTSmaReq* pReq);
5950
5951
int32_t tEncodeTSma(SEncoder* pCoder, const STSma* pSma);
5952
int32_t tDecodeTSma(SDecoder* pCoder, STSma* pSma, bool deepCopy);
5953
5954
0
static int32_t tEncodeTSmaWrapper(SEncoder* pEncoder, const STSmaWrapper* pReq) {
5955
0
  TAOS_CHECK_RETURN(tEncodeI32(pEncoder, pReq->number));
5956
0
  for (int32_t i = 0; i < pReq->number; ++i) {
5957
0
    TAOS_CHECK_RETURN(tEncodeTSma(pEncoder, pReq->tSma + i));
5958
0
  }
5959
0
  return 0;
5960
0
}
Unexecuted instantiation: sql-fuzzer.c:tEncodeTSmaWrapper
Unexecuted instantiation: parser.c:tEncodeTSmaWrapper
Unexecuted instantiation: parTranslater.c:tEncodeTSmaWrapper
Unexecuted instantiation: parUtil.c:tEncodeTSmaWrapper
Unexecuted instantiation: parAstParser.c:tEncodeTSmaWrapper
Unexecuted instantiation: parAuthenticator.c:tEncodeTSmaWrapper
Unexecuted instantiation: parCalcConst.c:tEncodeTSmaWrapper
Unexecuted instantiation: parInsertSql.c:tEncodeTSmaWrapper
Unexecuted instantiation: parInsertUtil.c:tEncodeTSmaWrapper
Unexecuted instantiation: taos_lemon_sql.tab.c:tEncodeTSmaWrapper
Unexecuted instantiation: parAstCreater.c:tEncodeTSmaWrapper
Unexecuted instantiation: parInsertSml.c:tEncodeTSmaWrapper
Unexecuted instantiation: planner.c:tEncodeTSmaWrapper
Unexecuted instantiation: planLogicCreater.c:tEncodeTSmaWrapper
Unexecuted instantiation: planOptimizer.c:tEncodeTSmaWrapper
Unexecuted instantiation: planPhysiCreater.c:tEncodeTSmaWrapper
Unexecuted instantiation: planScaleOut.c:tEncodeTSmaWrapper
Unexecuted instantiation: planSpliter.c:tEncodeTSmaWrapper
Unexecuted instantiation: planUtil.c:tEncodeTSmaWrapper
Unexecuted instantiation: planValidator.c:tEncodeTSmaWrapper
Unexecuted instantiation: catalog.c:tEncodeTSmaWrapper
Unexecuted instantiation: ctgAsync.c:tEncodeTSmaWrapper
Unexecuted instantiation: ctgCache.c:tEncodeTSmaWrapper
Unexecuted instantiation: ctgDbg.c:tEncodeTSmaWrapper
Unexecuted instantiation: ctgRemote.c:tEncodeTSmaWrapper
Unexecuted instantiation: ctgRent.c:tEncodeTSmaWrapper
Unexecuted instantiation: ctgUtil.c:tEncodeTSmaWrapper
Unexecuted instantiation: functionMgt.c:tEncodeTSmaWrapper
Unexecuted instantiation: tudf.c:tEncodeTSmaWrapper
Unexecuted instantiation: builtins.c:tEncodeTSmaWrapper
Unexecuted instantiation: builtinsimpl.c:tEncodeTSmaWrapper
Unexecuted instantiation: thistogram.c:tEncodeTSmaWrapper
Unexecuted instantiation: tpercentile.c:tEncodeTSmaWrapper
Unexecuted instantiation: tavgfunction.c:tEncodeTSmaWrapper
Unexecuted instantiation: tminmax.c:tEncodeTSmaWrapper
Unexecuted instantiation: tminmaxavx.c:tEncodeTSmaWrapper
Unexecuted instantiation: filter.c:tEncodeTSmaWrapper
Unexecuted instantiation: scalar.c:tEncodeTSmaWrapper
Unexecuted instantiation: sclfunc.c:tEncodeTSmaWrapper
Unexecuted instantiation: sclvector.c:tEncodeTSmaWrapper
Unexecuted instantiation: nodesCloneFuncs.c:tEncodeTSmaWrapper
Unexecuted instantiation: nodesCodeFuncs.c:tEncodeTSmaWrapper
Unexecuted instantiation: nodesEqualFuncs.c:tEncodeTSmaWrapper
Unexecuted instantiation: nodesMatchFuncs.c:tEncodeTSmaWrapper
Unexecuted instantiation: nodesMsgFuncs.c:tEncodeTSmaWrapper
Unexecuted instantiation: nodesToSQLFuncs.c:tEncodeTSmaWrapper
Unexecuted instantiation: nodesTraverseFuncs.c:tEncodeTSmaWrapper
Unexecuted instantiation: nodesUtilFuncs.c:tEncodeTSmaWrapper
Unexecuted instantiation: queryUtil.c:tEncodeTSmaWrapper
Unexecuted instantiation: querymsg.c:tEncodeTSmaWrapper
Unexecuted instantiation: trans.c:tEncodeTSmaWrapper
Unexecuted instantiation: transCli.c:tEncodeTSmaWrapper
Unexecuted instantiation: transComm.c:tEncodeTSmaWrapper
Unexecuted instantiation: transSasl.c:tEncodeTSmaWrapper
Unexecuted instantiation: transSvr.c:tEncodeTSmaWrapper
Unexecuted instantiation: transTLS.c:tEncodeTSmaWrapper
Unexecuted instantiation: thttp.c:tEncodeTSmaWrapper
Unexecuted instantiation: geomFunc.c:tEncodeTSmaWrapper
Unexecuted instantiation: tconfig.c:tEncodeTSmaWrapper
Unexecuted instantiation: tdigest.c:tEncodeTSmaWrapper
Unexecuted instantiation: tlog.c:tEncodeTSmaWrapper
Unexecuted instantiation: tmempool.c:tEncodeTSmaWrapper
Unexecuted instantiation: mpDirect.c:tEncodeTSmaWrapper
Unexecuted instantiation: systable.c:tEncodeTSmaWrapper
Unexecuted instantiation: tdatablock.c:tEncodeTSmaWrapper
Unexecuted instantiation: tdataformat.c:tEncodeTSmaWrapper
Unexecuted instantiation: tglobal.c:tEncodeTSmaWrapper
Unexecuted instantiation: tmisce.c:tEncodeTSmaWrapper
Unexecuted instantiation: tname.c:tEncodeTSmaWrapper
Unexecuted instantiation: tpriv.c:tEncodeTSmaWrapper
Unexecuted instantiation: ttime.c:tEncodeTSmaWrapper
Unexecuted instantiation: tvariant.c:tEncodeTSmaWrapper
Unexecuted instantiation: streamMsg.c:tEncodeTSmaWrapper
Unexecuted instantiation: tmsg.c:tEncodeTSmaWrapper
Unexecuted instantiation: xnode.c:tEncodeTSmaWrapper
Unexecuted instantiation: tencrypt.c:tEncodeTSmaWrapper
Unexecuted instantiation: streamJson.c:tEncodeTSmaWrapper
5961
5962
0
static int32_t tDecodeTSmaWrapper(SDecoder* pDecoder, STSmaWrapper* pReq, bool deepCopy) {
5963
0
  TAOS_CHECK_RETURN(tDecodeI32(pDecoder, &pReq->number));
5964
0
  for (int32_t i = 0; i < pReq->number; ++i) {
5965
0
    TAOS_CHECK_RETURN(tDecodeTSma(pDecoder, pReq->tSma + i, deepCopy));
5966
0
  }
5967
0
  return 0;
5968
0
}
Unexecuted instantiation: sql-fuzzer.c:tDecodeTSmaWrapper
Unexecuted instantiation: parser.c:tDecodeTSmaWrapper
Unexecuted instantiation: parTranslater.c:tDecodeTSmaWrapper
Unexecuted instantiation: parUtil.c:tDecodeTSmaWrapper
Unexecuted instantiation: parAstParser.c:tDecodeTSmaWrapper
Unexecuted instantiation: parAuthenticator.c:tDecodeTSmaWrapper
Unexecuted instantiation: parCalcConst.c:tDecodeTSmaWrapper
Unexecuted instantiation: parInsertSql.c:tDecodeTSmaWrapper
Unexecuted instantiation: parInsertUtil.c:tDecodeTSmaWrapper
Unexecuted instantiation: taos_lemon_sql.tab.c:tDecodeTSmaWrapper
Unexecuted instantiation: parAstCreater.c:tDecodeTSmaWrapper
Unexecuted instantiation: parInsertSml.c:tDecodeTSmaWrapper
Unexecuted instantiation: planner.c:tDecodeTSmaWrapper
Unexecuted instantiation: planLogicCreater.c:tDecodeTSmaWrapper
Unexecuted instantiation: planOptimizer.c:tDecodeTSmaWrapper
Unexecuted instantiation: planPhysiCreater.c:tDecodeTSmaWrapper
Unexecuted instantiation: planScaleOut.c:tDecodeTSmaWrapper
Unexecuted instantiation: planSpliter.c:tDecodeTSmaWrapper
Unexecuted instantiation: planUtil.c:tDecodeTSmaWrapper
Unexecuted instantiation: planValidator.c:tDecodeTSmaWrapper
Unexecuted instantiation: catalog.c:tDecodeTSmaWrapper
Unexecuted instantiation: ctgAsync.c:tDecodeTSmaWrapper
Unexecuted instantiation: ctgCache.c:tDecodeTSmaWrapper
Unexecuted instantiation: ctgDbg.c:tDecodeTSmaWrapper
Unexecuted instantiation: ctgRemote.c:tDecodeTSmaWrapper
Unexecuted instantiation: ctgRent.c:tDecodeTSmaWrapper
Unexecuted instantiation: ctgUtil.c:tDecodeTSmaWrapper
Unexecuted instantiation: functionMgt.c:tDecodeTSmaWrapper
Unexecuted instantiation: tudf.c:tDecodeTSmaWrapper
Unexecuted instantiation: builtins.c:tDecodeTSmaWrapper
Unexecuted instantiation: builtinsimpl.c:tDecodeTSmaWrapper
Unexecuted instantiation: thistogram.c:tDecodeTSmaWrapper
Unexecuted instantiation: tpercentile.c:tDecodeTSmaWrapper
Unexecuted instantiation: tavgfunction.c:tDecodeTSmaWrapper
Unexecuted instantiation: tminmax.c:tDecodeTSmaWrapper
Unexecuted instantiation: tminmaxavx.c:tDecodeTSmaWrapper
Unexecuted instantiation: filter.c:tDecodeTSmaWrapper
Unexecuted instantiation: scalar.c:tDecodeTSmaWrapper
Unexecuted instantiation: sclfunc.c:tDecodeTSmaWrapper
Unexecuted instantiation: sclvector.c:tDecodeTSmaWrapper
Unexecuted instantiation: nodesCloneFuncs.c:tDecodeTSmaWrapper
Unexecuted instantiation: nodesCodeFuncs.c:tDecodeTSmaWrapper
Unexecuted instantiation: nodesEqualFuncs.c:tDecodeTSmaWrapper
Unexecuted instantiation: nodesMatchFuncs.c:tDecodeTSmaWrapper
Unexecuted instantiation: nodesMsgFuncs.c:tDecodeTSmaWrapper
Unexecuted instantiation: nodesToSQLFuncs.c:tDecodeTSmaWrapper
Unexecuted instantiation: nodesTraverseFuncs.c:tDecodeTSmaWrapper
Unexecuted instantiation: nodesUtilFuncs.c:tDecodeTSmaWrapper
Unexecuted instantiation: queryUtil.c:tDecodeTSmaWrapper
Unexecuted instantiation: querymsg.c:tDecodeTSmaWrapper
Unexecuted instantiation: trans.c:tDecodeTSmaWrapper
Unexecuted instantiation: transCli.c:tDecodeTSmaWrapper
Unexecuted instantiation: transComm.c:tDecodeTSmaWrapper
Unexecuted instantiation: transSasl.c:tDecodeTSmaWrapper
Unexecuted instantiation: transSvr.c:tDecodeTSmaWrapper
Unexecuted instantiation: transTLS.c:tDecodeTSmaWrapper
Unexecuted instantiation: thttp.c:tDecodeTSmaWrapper
Unexecuted instantiation: geomFunc.c:tDecodeTSmaWrapper
Unexecuted instantiation: tconfig.c:tDecodeTSmaWrapper
Unexecuted instantiation: tdigest.c:tDecodeTSmaWrapper
Unexecuted instantiation: tlog.c:tDecodeTSmaWrapper
Unexecuted instantiation: tmempool.c:tDecodeTSmaWrapper
Unexecuted instantiation: mpDirect.c:tDecodeTSmaWrapper
Unexecuted instantiation: systable.c:tDecodeTSmaWrapper
Unexecuted instantiation: tdatablock.c:tDecodeTSmaWrapper
Unexecuted instantiation: tdataformat.c:tDecodeTSmaWrapper
Unexecuted instantiation: tglobal.c:tDecodeTSmaWrapper
Unexecuted instantiation: tmisce.c:tDecodeTSmaWrapper
Unexecuted instantiation: tname.c:tDecodeTSmaWrapper
Unexecuted instantiation: tpriv.c:tDecodeTSmaWrapper
Unexecuted instantiation: ttime.c:tDecodeTSmaWrapper
Unexecuted instantiation: tvariant.c:tDecodeTSmaWrapper
Unexecuted instantiation: streamMsg.c:tDecodeTSmaWrapper
Unexecuted instantiation: tmsg.c:tDecodeTSmaWrapper
Unexecuted instantiation: xnode.c:tDecodeTSmaWrapper
Unexecuted instantiation: tencrypt.c:tDecodeTSmaWrapper
Unexecuted instantiation: streamJson.c:tDecodeTSmaWrapper
5969
5970
typedef struct {
5971
  int idx;
5972
} SMCreateFullTextReq;
5973
5974
int32_t tSerializeSMCreateFullTextReq(void* buf, int32_t bufLen, SMCreateFullTextReq* pReq);
5975
int32_t tDeserializeSMCreateFullTextReq(void* buf, int32_t bufLen, SMCreateFullTextReq* pReq);
5976
void    tFreeSMCreateFullTextReq(SMCreateFullTextReq* pReq);
5977
5978
typedef struct {
5979
  char   name[TSDB_TABLE_FNAME_LEN];
5980
  int8_t igNotExists;
5981
} SMDropFullTextReq;
5982
5983
// int32_t tSerializeSMDropFullTextReq(void* buf, int32_t bufLen, SMDropFullTextReq* pReq);
5984
// int32_t tDeserializeSMDropFullTextReq(void* buf, int32_t bufLen, SMDropFullTextReq* pReq);
5985
5986
typedef struct {
5987
  char indexFName[TSDB_INDEX_FNAME_LEN];
5988
} SUserIndexReq;
5989
5990
int32_t tSerializeSUserIndexReq(void* buf, int32_t bufLen, SUserIndexReq* pReq);
5991
int32_t tDeserializeSUserIndexReq(void* buf, int32_t bufLen, SUserIndexReq* pReq);
5992
5993
typedef struct {
5994
  char dbFName[TSDB_DB_FNAME_LEN];
5995
  char tblFName[TSDB_TABLE_FNAME_LEN];
5996
  char colName[TSDB_COL_NAME_LEN];
5997
  char owner[TSDB_USER_LEN];
5998
  char indexType[TSDB_INDEX_TYPE_LEN];
5999
  char indexExts[TSDB_INDEX_EXTS_LEN];
6000
} SUserIndexRsp;
6001
6002
int32_t tSerializeSUserIndexRsp(void* buf, int32_t bufLen, const SUserIndexRsp* pRsp);
6003
int32_t tDeserializeSUserIndexRsp(void* buf, int32_t bufLen, SUserIndexRsp* pRsp);
6004
6005
typedef struct {
6006
  char tbFName[TSDB_TABLE_FNAME_LEN];
6007
} STableIndexReq;
6008
6009
int32_t tSerializeSTableIndexReq(void* buf, int32_t bufLen, STableIndexReq* pReq);
6010
int32_t tDeserializeSTableIndexReq(void* buf, int32_t bufLen, STableIndexReq* pReq);
6011
6012
typedef struct {
6013
  int8_t  intervalUnit;
6014
  int8_t  slidingUnit;
6015
  int64_t interval;
6016
  int64_t offset;
6017
  int64_t sliding;
6018
  int64_t dstTbUid;
6019
  int32_t dstVgId;
6020
  SEpSet  epSet;
6021
  char*   expr;
6022
} STableIndexInfo;
6023
6024
typedef struct {
6025
  char     tbName[TSDB_TABLE_NAME_LEN];
6026
  char     dbFName[TSDB_DB_FNAME_LEN];
6027
  uint64_t suid;
6028
  int32_t  version;
6029
  int32_t  indexSize;
6030
  SArray*  pIndex;  // STableIndexInfo
6031
} STableIndexRsp;
6032
6033
int32_t tSerializeSTableIndexRsp(void* buf, int32_t bufLen, const STableIndexRsp* pRsp);
6034
int32_t tDeserializeSTableIndexRsp(void* buf, int32_t bufLen, STableIndexRsp* pRsp);
6035
void    tFreeSerializeSTableIndexRsp(STableIndexRsp* pRsp);
6036
6037
void tFreeSTableIndexInfo(void* pInfo);
6038
6039
typedef struct {
6040
  int8_t  mqMsgType;
6041
  int32_t code;
6042
  int32_t epoch;
6043
  int64_t consumerId;
6044
  int64_t walsver;
6045
  int64_t walever;
6046
} SMqRspHead;
6047
6048
typedef struct {
6049
  SMsgHead     head;
6050
  char         subKey[TSDB_SUBSCRIBE_KEY_LEN];
6051
  int8_t       withTbName;
6052
  int8_t       useSnapshot;
6053
  int32_t      epoch;
6054
  uint64_t     reqId;
6055
  int64_t      consumerId;
6056
  int64_t      timeout;
6057
  STqOffsetVal reqOffset;
6058
  int8_t       enableReplay;
6059
  int8_t       sourceExcluded;
6060
  int8_t       rawData;
6061
  int32_t      minPollRows;
6062
  int8_t       enableBatchMeta;
6063
  SHashObj*    uidHash;  // to find if uid is duplicated
6064
} SMqPollReq;
6065
6066
int32_t tSerializeSMqPollReq(void* buf, int32_t bufLen, SMqPollReq* pReq);
6067
int32_t tDeserializeSMqPollReq(void* buf, int32_t bufLen, SMqPollReq* pReq);
6068
void    tDestroySMqPollReq(SMqPollReq* pReq);
6069
6070
typedef struct {
6071
  int32_t vgId;
6072
  int64_t offset;
6073
  SEpSet  epSet;
6074
} SMqSubVgEp;
6075
6076
0
static FORCE_INLINE int32_t tEncodeSMqSubVgEp(void** buf, const SMqSubVgEp* pVgEp) {
6077
0
  int32_t tlen = 0;
6078
0
  tlen += taosEncodeFixedI32(buf, pVgEp->vgId);
6079
0
  tlen += taosEncodeFixedI64(buf, pVgEp->offset);
6080
0
  tlen += taosEncodeSEpSet(buf, &pVgEp->epSet);
6081
0
  return tlen;
6082
0
}
Unexecuted instantiation: sql-fuzzer.c:tEncodeSMqSubVgEp
Unexecuted instantiation: parser.c:tEncodeSMqSubVgEp
Unexecuted instantiation: parTranslater.c:tEncodeSMqSubVgEp
Unexecuted instantiation: parUtil.c:tEncodeSMqSubVgEp
Unexecuted instantiation: parAstParser.c:tEncodeSMqSubVgEp
Unexecuted instantiation: parAuthenticator.c:tEncodeSMqSubVgEp
Unexecuted instantiation: parCalcConst.c:tEncodeSMqSubVgEp
Unexecuted instantiation: parInsertSql.c:tEncodeSMqSubVgEp
Unexecuted instantiation: parInsertUtil.c:tEncodeSMqSubVgEp
Unexecuted instantiation: taos_lemon_sql.tab.c:tEncodeSMqSubVgEp
Unexecuted instantiation: parAstCreater.c:tEncodeSMqSubVgEp
Unexecuted instantiation: parInsertSml.c:tEncodeSMqSubVgEp
Unexecuted instantiation: planner.c:tEncodeSMqSubVgEp
Unexecuted instantiation: planLogicCreater.c:tEncodeSMqSubVgEp
Unexecuted instantiation: planOptimizer.c:tEncodeSMqSubVgEp
Unexecuted instantiation: planPhysiCreater.c:tEncodeSMqSubVgEp
Unexecuted instantiation: planScaleOut.c:tEncodeSMqSubVgEp
Unexecuted instantiation: planSpliter.c:tEncodeSMqSubVgEp
Unexecuted instantiation: planUtil.c:tEncodeSMqSubVgEp
Unexecuted instantiation: planValidator.c:tEncodeSMqSubVgEp
Unexecuted instantiation: catalog.c:tEncodeSMqSubVgEp
Unexecuted instantiation: ctgAsync.c:tEncodeSMqSubVgEp
Unexecuted instantiation: ctgCache.c:tEncodeSMqSubVgEp
Unexecuted instantiation: ctgDbg.c:tEncodeSMqSubVgEp
Unexecuted instantiation: ctgRemote.c:tEncodeSMqSubVgEp
Unexecuted instantiation: ctgRent.c:tEncodeSMqSubVgEp
Unexecuted instantiation: ctgUtil.c:tEncodeSMqSubVgEp
Unexecuted instantiation: functionMgt.c:tEncodeSMqSubVgEp
Unexecuted instantiation: tudf.c:tEncodeSMqSubVgEp
Unexecuted instantiation: builtins.c:tEncodeSMqSubVgEp
Unexecuted instantiation: builtinsimpl.c:tEncodeSMqSubVgEp
Unexecuted instantiation: thistogram.c:tEncodeSMqSubVgEp
Unexecuted instantiation: tpercentile.c:tEncodeSMqSubVgEp
Unexecuted instantiation: tavgfunction.c:tEncodeSMqSubVgEp
Unexecuted instantiation: tminmax.c:tEncodeSMqSubVgEp
Unexecuted instantiation: tminmaxavx.c:tEncodeSMqSubVgEp
Unexecuted instantiation: filter.c:tEncodeSMqSubVgEp
Unexecuted instantiation: scalar.c:tEncodeSMqSubVgEp
Unexecuted instantiation: sclfunc.c:tEncodeSMqSubVgEp
Unexecuted instantiation: sclvector.c:tEncodeSMqSubVgEp
Unexecuted instantiation: nodesCloneFuncs.c:tEncodeSMqSubVgEp
Unexecuted instantiation: nodesCodeFuncs.c:tEncodeSMqSubVgEp
Unexecuted instantiation: nodesEqualFuncs.c:tEncodeSMqSubVgEp
Unexecuted instantiation: nodesMatchFuncs.c:tEncodeSMqSubVgEp
Unexecuted instantiation: nodesMsgFuncs.c:tEncodeSMqSubVgEp
Unexecuted instantiation: nodesToSQLFuncs.c:tEncodeSMqSubVgEp
Unexecuted instantiation: nodesTraverseFuncs.c:tEncodeSMqSubVgEp
Unexecuted instantiation: nodesUtilFuncs.c:tEncodeSMqSubVgEp
Unexecuted instantiation: queryUtil.c:tEncodeSMqSubVgEp
Unexecuted instantiation: querymsg.c:tEncodeSMqSubVgEp
Unexecuted instantiation: trans.c:tEncodeSMqSubVgEp
Unexecuted instantiation: transCli.c:tEncodeSMqSubVgEp
Unexecuted instantiation: transComm.c:tEncodeSMqSubVgEp
Unexecuted instantiation: transSasl.c:tEncodeSMqSubVgEp
Unexecuted instantiation: transSvr.c:tEncodeSMqSubVgEp
Unexecuted instantiation: transTLS.c:tEncodeSMqSubVgEp
Unexecuted instantiation: thttp.c:tEncodeSMqSubVgEp
Unexecuted instantiation: geomFunc.c:tEncodeSMqSubVgEp
Unexecuted instantiation: tconfig.c:tEncodeSMqSubVgEp
Unexecuted instantiation: tdigest.c:tEncodeSMqSubVgEp
Unexecuted instantiation: tlog.c:tEncodeSMqSubVgEp
Unexecuted instantiation: tmempool.c:tEncodeSMqSubVgEp
Unexecuted instantiation: mpDirect.c:tEncodeSMqSubVgEp
Unexecuted instantiation: systable.c:tEncodeSMqSubVgEp
Unexecuted instantiation: tdatablock.c:tEncodeSMqSubVgEp
Unexecuted instantiation: tdataformat.c:tEncodeSMqSubVgEp
Unexecuted instantiation: tglobal.c:tEncodeSMqSubVgEp
Unexecuted instantiation: tmisce.c:tEncodeSMqSubVgEp
Unexecuted instantiation: tname.c:tEncodeSMqSubVgEp
Unexecuted instantiation: tpriv.c:tEncodeSMqSubVgEp
Unexecuted instantiation: ttime.c:tEncodeSMqSubVgEp
Unexecuted instantiation: tvariant.c:tEncodeSMqSubVgEp
Unexecuted instantiation: streamMsg.c:tEncodeSMqSubVgEp
Unexecuted instantiation: tmsg.c:tEncodeSMqSubVgEp
Unexecuted instantiation: xnode.c:tEncodeSMqSubVgEp
Unexecuted instantiation: tencrypt.c:tEncodeSMqSubVgEp
Unexecuted instantiation: streamJson.c:tEncodeSMqSubVgEp
6083
6084
0
static FORCE_INLINE void* tDecodeSMqSubVgEp(void* buf, SMqSubVgEp* pVgEp) {
6085
0
  buf = taosDecodeFixedI32(buf, &pVgEp->vgId);
6086
0
  buf = taosDecodeFixedI64(buf, &pVgEp->offset);
6087
0
  buf = taosDecodeSEpSet(buf, &pVgEp->epSet);
6088
0
  return buf;
6089
0
}
Unexecuted instantiation: sql-fuzzer.c:tDecodeSMqSubVgEp
Unexecuted instantiation: parser.c:tDecodeSMqSubVgEp
Unexecuted instantiation: parTranslater.c:tDecodeSMqSubVgEp
Unexecuted instantiation: parUtil.c:tDecodeSMqSubVgEp
Unexecuted instantiation: parAstParser.c:tDecodeSMqSubVgEp
Unexecuted instantiation: parAuthenticator.c:tDecodeSMqSubVgEp
Unexecuted instantiation: parCalcConst.c:tDecodeSMqSubVgEp
Unexecuted instantiation: parInsertSql.c:tDecodeSMqSubVgEp
Unexecuted instantiation: parInsertUtil.c:tDecodeSMqSubVgEp
Unexecuted instantiation: taos_lemon_sql.tab.c:tDecodeSMqSubVgEp
Unexecuted instantiation: parAstCreater.c:tDecodeSMqSubVgEp
Unexecuted instantiation: parInsertSml.c:tDecodeSMqSubVgEp
Unexecuted instantiation: planner.c:tDecodeSMqSubVgEp
Unexecuted instantiation: planLogicCreater.c:tDecodeSMqSubVgEp
Unexecuted instantiation: planOptimizer.c:tDecodeSMqSubVgEp
Unexecuted instantiation: planPhysiCreater.c:tDecodeSMqSubVgEp
Unexecuted instantiation: planScaleOut.c:tDecodeSMqSubVgEp
Unexecuted instantiation: planSpliter.c:tDecodeSMqSubVgEp
Unexecuted instantiation: planUtil.c:tDecodeSMqSubVgEp
Unexecuted instantiation: planValidator.c:tDecodeSMqSubVgEp
Unexecuted instantiation: catalog.c:tDecodeSMqSubVgEp
Unexecuted instantiation: ctgAsync.c:tDecodeSMqSubVgEp
Unexecuted instantiation: ctgCache.c:tDecodeSMqSubVgEp
Unexecuted instantiation: ctgDbg.c:tDecodeSMqSubVgEp
Unexecuted instantiation: ctgRemote.c:tDecodeSMqSubVgEp
Unexecuted instantiation: ctgRent.c:tDecodeSMqSubVgEp
Unexecuted instantiation: ctgUtil.c:tDecodeSMqSubVgEp
Unexecuted instantiation: functionMgt.c:tDecodeSMqSubVgEp
Unexecuted instantiation: tudf.c:tDecodeSMqSubVgEp
Unexecuted instantiation: builtins.c:tDecodeSMqSubVgEp
Unexecuted instantiation: builtinsimpl.c:tDecodeSMqSubVgEp
Unexecuted instantiation: thistogram.c:tDecodeSMqSubVgEp
Unexecuted instantiation: tpercentile.c:tDecodeSMqSubVgEp
Unexecuted instantiation: tavgfunction.c:tDecodeSMqSubVgEp
Unexecuted instantiation: tminmax.c:tDecodeSMqSubVgEp
Unexecuted instantiation: tminmaxavx.c:tDecodeSMqSubVgEp
Unexecuted instantiation: filter.c:tDecodeSMqSubVgEp
Unexecuted instantiation: scalar.c:tDecodeSMqSubVgEp
Unexecuted instantiation: sclfunc.c:tDecodeSMqSubVgEp
Unexecuted instantiation: sclvector.c:tDecodeSMqSubVgEp
Unexecuted instantiation: nodesCloneFuncs.c:tDecodeSMqSubVgEp
Unexecuted instantiation: nodesCodeFuncs.c:tDecodeSMqSubVgEp
Unexecuted instantiation: nodesEqualFuncs.c:tDecodeSMqSubVgEp
Unexecuted instantiation: nodesMatchFuncs.c:tDecodeSMqSubVgEp
Unexecuted instantiation: nodesMsgFuncs.c:tDecodeSMqSubVgEp
Unexecuted instantiation: nodesToSQLFuncs.c:tDecodeSMqSubVgEp
Unexecuted instantiation: nodesTraverseFuncs.c:tDecodeSMqSubVgEp
Unexecuted instantiation: nodesUtilFuncs.c:tDecodeSMqSubVgEp
Unexecuted instantiation: queryUtil.c:tDecodeSMqSubVgEp
Unexecuted instantiation: querymsg.c:tDecodeSMqSubVgEp
Unexecuted instantiation: trans.c:tDecodeSMqSubVgEp
Unexecuted instantiation: transCli.c:tDecodeSMqSubVgEp
Unexecuted instantiation: transComm.c:tDecodeSMqSubVgEp
Unexecuted instantiation: transSasl.c:tDecodeSMqSubVgEp
Unexecuted instantiation: transSvr.c:tDecodeSMqSubVgEp
Unexecuted instantiation: transTLS.c:tDecodeSMqSubVgEp
Unexecuted instantiation: thttp.c:tDecodeSMqSubVgEp
Unexecuted instantiation: geomFunc.c:tDecodeSMqSubVgEp
Unexecuted instantiation: tconfig.c:tDecodeSMqSubVgEp
Unexecuted instantiation: tdigest.c:tDecodeSMqSubVgEp
Unexecuted instantiation: tlog.c:tDecodeSMqSubVgEp
Unexecuted instantiation: tmempool.c:tDecodeSMqSubVgEp
Unexecuted instantiation: mpDirect.c:tDecodeSMqSubVgEp
Unexecuted instantiation: systable.c:tDecodeSMqSubVgEp
Unexecuted instantiation: tdatablock.c:tDecodeSMqSubVgEp
Unexecuted instantiation: tdataformat.c:tDecodeSMqSubVgEp
Unexecuted instantiation: tglobal.c:tDecodeSMqSubVgEp
Unexecuted instantiation: tmisce.c:tDecodeSMqSubVgEp
Unexecuted instantiation: tname.c:tDecodeSMqSubVgEp
Unexecuted instantiation: tpriv.c:tDecodeSMqSubVgEp
Unexecuted instantiation: ttime.c:tDecodeSMqSubVgEp
Unexecuted instantiation: tvariant.c:tDecodeSMqSubVgEp
Unexecuted instantiation: streamMsg.c:tDecodeSMqSubVgEp
Unexecuted instantiation: tmsg.c:tDecodeSMqSubVgEp
Unexecuted instantiation: xnode.c:tDecodeSMqSubVgEp
Unexecuted instantiation: tencrypt.c:tDecodeSMqSubVgEp
Unexecuted instantiation: streamJson.c:tDecodeSMqSubVgEp
6090
6091
typedef struct {
6092
  char    topic[TSDB_TOPIC_FNAME_LEN];
6093
  char    db[TSDB_DB_FNAME_LEN];
6094
  SArray* vgs;  // SArray<SMqSubVgEp>
6095
} SMqSubTopicEp;
6096
6097
int32_t tEncodeMqSubTopicEp(void** buf, const SMqSubTopicEp* pTopicEp);
6098
void*   tDecodeMqSubTopicEp(void* buf, SMqSubTopicEp* pTopicEp);
6099
void    tDeleteMqSubTopicEp(SMqSubTopicEp* pSubTopicEp);
6100
6101
typedef struct {
6102
  SMqRspHead   head;
6103
  STqOffsetVal rspOffset;
6104
  int16_t      resMsgType;
6105
  int32_t      metaRspLen;
6106
  void*        metaRsp;
6107
} SMqMetaRsp;
6108
6109
int32_t tEncodeMqMetaRsp(SEncoder* pEncoder, const SMqMetaRsp* pRsp);
6110
int32_t tDecodeMqMetaRsp(SDecoder* pDecoder, SMqMetaRsp* pRsp);
6111
void    tDeleteMqMetaRsp(SMqMetaRsp* pRsp);
6112
6113
#define MQ_DATA_RSP_VERSION 100
6114
6115
typedef struct {
6116
  SMqRspHead   head;
6117
  STqOffsetVal rspOffset;
6118
  STqOffsetVal reqOffset;
6119
  int32_t      blockNum;
6120
  int8_t       withTbName;
6121
  int8_t       withSchema;
6122
  SArray*      blockDataLen;
6123
  SArray*      blockData;
6124
  SArray*      blockTbName;
6125
  SArray*      blockSchema;
6126
6127
  union {
6128
    struct {
6129
      int64_t sleepTime;
6130
    };
6131
    struct {
6132
      int32_t createTableNum;
6133
      SArray* createTableLen;
6134
      SArray* createTableReq;
6135
    };
6136
    struct {
6137
      int32_t len;
6138
      void*   rawData;
6139
    };
6140
  };
6141
  void* data;                  // for free in client, only effected if type is data or metadata. raw data not effected
6142
  bool  blockDataElementFree;  // if true, free blockDataElement in blockData,(true in server, false in client)
6143
  bool  timeout;
6144
} SMqDataRsp;
6145
6146
int32_t tEncodeMqDataRsp(SEncoder* pEncoder, const SMqDataRsp* pObj);
6147
int32_t tDecodeMqDataRsp(SDecoder* pDecoder, SMqDataRsp* pRsp);
6148
int32_t tDecodeMqRawDataRsp(SDecoder* pDecoder, SMqDataRsp* pRsp);
6149
void    tDeleteMqDataRsp(SMqDataRsp* pRsp);
6150
void    tDeleteMqRawDataRsp(SMqDataRsp* pRsp);
6151
6152
int32_t tEncodeSTaosxRsp(SEncoder* pEncoder, const SMqDataRsp* pRsp);
6153
int32_t tDecodeSTaosxRsp(SDecoder* pDecoder, SMqDataRsp* pRsp);
6154
void    tDeleteSTaosxRsp(SMqDataRsp* pRsp);
6155
6156
typedef struct SMqBatchMetaRsp {
6157
  SMqRspHead   head;  // not serialize
6158
  STqOffsetVal rspOffset;
6159
  SArray*      batchMetaLen;
6160
  SArray*      batchMetaReq;
6161
  void*        pMetaBuff;    // not serialize
6162
  uint32_t     metaBuffLen;  // not serialize
6163
} SMqBatchMetaRsp;
6164
6165
int32_t tEncodeMqBatchMetaRsp(SEncoder* pEncoder, const SMqBatchMetaRsp* pRsp);
6166
int32_t tDecodeMqBatchMetaRsp(SDecoder* pDecoder, SMqBatchMetaRsp* pRsp);
6167
int32_t tSemiDecodeMqBatchMetaRsp(SDecoder* pDecoder, SMqBatchMetaRsp* pRsp);
6168
void    tDeleteMqBatchMetaRsp(SMqBatchMetaRsp* pRsp);
6169
6170
typedef struct {
6171
  int32_t code;
6172
  SArray* topics;  // SArray<SMqSubTopicEp>
6173
} SMqAskEpRsp;
6174
6175
0
static FORCE_INLINE int32_t tEncodeSMqAskEpRsp(void** buf, const SMqAskEpRsp* pRsp) {
6176
0
  int32_t tlen = 0;
6177
0
  // tlen += taosEncodeString(buf, pRsp->cgroup);
6178
0
  int32_t sz = taosArrayGetSize(pRsp->topics);
6179
0
  tlen += taosEncodeFixedI32(buf, sz);
6180
0
  for (int32_t i = 0; i < sz; i++) {
6181
0
    SMqSubTopicEp* pVgEp = (SMqSubTopicEp*)taosArrayGet(pRsp->topics, i);
6182
0
    tlen += tEncodeMqSubTopicEp(buf, pVgEp);
6183
0
  }
6184
0
  tlen += taosEncodeFixedI32(buf, pRsp->code);
6185
0
6186
0
  return tlen;
6187
0
}
Unexecuted instantiation: sql-fuzzer.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: parser.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: parTranslater.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: parUtil.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: parAstParser.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: parAuthenticator.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: parCalcConst.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: parInsertSql.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: parInsertUtil.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: taos_lemon_sql.tab.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: parAstCreater.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: parInsertSml.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: planner.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: planLogicCreater.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: planOptimizer.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: planPhysiCreater.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: planScaleOut.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: planSpliter.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: planUtil.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: planValidator.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: catalog.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: ctgAsync.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: ctgCache.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: ctgDbg.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: ctgRemote.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: ctgRent.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: ctgUtil.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: functionMgt.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: tudf.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: builtins.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: builtinsimpl.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: thistogram.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: tpercentile.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: tavgfunction.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: tminmax.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: tminmaxavx.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: filter.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: scalar.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: sclfunc.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: sclvector.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: nodesCloneFuncs.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: nodesCodeFuncs.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: nodesEqualFuncs.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: nodesMatchFuncs.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: nodesMsgFuncs.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: nodesToSQLFuncs.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: nodesTraverseFuncs.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: nodesUtilFuncs.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: queryUtil.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: querymsg.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: trans.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: transCli.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: transComm.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: transSasl.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: transSvr.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: transTLS.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: thttp.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: geomFunc.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: tconfig.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: tdigest.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: tlog.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: tmempool.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: mpDirect.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: systable.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: tdatablock.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: tdataformat.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: tglobal.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: tmisce.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: tname.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: tpriv.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: ttime.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: tvariant.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: streamMsg.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: tmsg.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: xnode.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: tencrypt.c:tEncodeSMqAskEpRsp
Unexecuted instantiation: streamJson.c:tEncodeSMqAskEpRsp
6188
6189
0
static FORCE_INLINE void* tDecodeSMqAskEpRsp(void* buf, SMqAskEpRsp* pRsp) {
6190
0
  // buf = taosDecodeStringTo(buf, pRsp->cgroup);
6191
0
  int32_t sz;
6192
0
  buf = taosDecodeFixedI32(buf, &sz);
6193
0
  pRsp->topics = taosArrayInit(sz, sizeof(SMqSubTopicEp));
6194
0
  if (pRsp->topics == NULL) {
6195
0
    return NULL;
6196
0
  }
6197
0
  for (int32_t i = 0; i < sz; i++) {
6198
0
    SMqSubTopicEp topicEp;
6199
0
    buf = tDecodeMqSubTopicEp(buf, &topicEp);
6200
0
    if (buf == NULL) {
6201
0
      return NULL;
6202
0
    }
6203
0
    if ((taosArrayPush(pRsp->topics, &topicEp) == NULL)) {
6204
0
      return NULL;
6205
0
    }
6206
0
  }
6207
0
  buf = taosDecodeFixedI32(buf, &pRsp->code);
6208
0
6209
0
  return buf;
6210
0
}
Unexecuted instantiation: sql-fuzzer.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: parser.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: parTranslater.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: parUtil.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: parAstParser.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: parAuthenticator.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: parCalcConst.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: parInsertSql.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: parInsertUtil.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: taos_lemon_sql.tab.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: parAstCreater.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: parInsertSml.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: planner.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: planLogicCreater.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: planOptimizer.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: planPhysiCreater.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: planScaleOut.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: planSpliter.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: planUtil.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: planValidator.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: catalog.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: ctgAsync.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: ctgCache.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: ctgDbg.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: ctgRemote.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: ctgRent.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: ctgUtil.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: functionMgt.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: tudf.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: builtins.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: builtinsimpl.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: thistogram.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: tpercentile.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: tavgfunction.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: tminmax.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: tminmaxavx.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: filter.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: scalar.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: sclfunc.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: sclvector.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: nodesCloneFuncs.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: nodesCodeFuncs.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: nodesEqualFuncs.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: nodesMatchFuncs.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: nodesMsgFuncs.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: nodesToSQLFuncs.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: nodesTraverseFuncs.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: nodesUtilFuncs.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: queryUtil.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: querymsg.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: trans.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: transCli.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: transComm.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: transSasl.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: transSvr.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: transTLS.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: thttp.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: geomFunc.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: tconfig.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: tdigest.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: tlog.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: tmempool.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: mpDirect.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: systable.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: tdatablock.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: tdataformat.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: tglobal.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: tmisce.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: tname.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: tpriv.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: ttime.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: tvariant.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: streamMsg.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: tmsg.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: xnode.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: tencrypt.c:tDecodeSMqAskEpRsp
Unexecuted instantiation: streamJson.c:tDecodeSMqAskEpRsp
6211
6212
0
static FORCE_INLINE void tDeleteSMqAskEpRsp(SMqAskEpRsp* pRsp) {
6213
0
  taosArrayDestroyEx(pRsp->topics, (FDelete)tDeleteMqSubTopicEp);
6214
0
}
Unexecuted instantiation: sql-fuzzer.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: parser.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: parTranslater.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: parUtil.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: parAstParser.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: parAuthenticator.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: parCalcConst.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: parInsertSql.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: parInsertUtil.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: taos_lemon_sql.tab.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: parAstCreater.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: parInsertSml.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: planner.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: planLogicCreater.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: planOptimizer.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: planPhysiCreater.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: planScaleOut.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: planSpliter.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: planUtil.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: planValidator.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: catalog.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: ctgAsync.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: ctgCache.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: ctgDbg.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: ctgRemote.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: ctgRent.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: ctgUtil.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: functionMgt.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: tudf.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: builtins.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: builtinsimpl.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: thistogram.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: tpercentile.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: tavgfunction.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: tminmax.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: tminmaxavx.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: filter.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: scalar.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: sclfunc.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: sclvector.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: nodesCloneFuncs.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: nodesCodeFuncs.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: nodesEqualFuncs.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: nodesMatchFuncs.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: nodesMsgFuncs.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: nodesToSQLFuncs.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: nodesTraverseFuncs.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: nodesUtilFuncs.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: queryUtil.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: querymsg.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: trans.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: transCli.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: transComm.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: transSasl.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: transSvr.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: transTLS.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: thttp.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: geomFunc.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: tconfig.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: tdigest.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: tlog.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: tmempool.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: mpDirect.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: systable.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: tdatablock.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: tdataformat.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: tglobal.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: tmisce.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: tname.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: tpriv.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: ttime.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: tvariant.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: streamMsg.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: tmsg.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: xnode.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: tencrypt.c:tDeleteSMqAskEpRsp
Unexecuted instantiation: streamJson.c:tDeleteSMqAskEpRsp
6215
6216
typedef struct {
6217
  int32_t      vgId;
6218
  STqOffsetVal offset;
6219
  int64_t      rows;
6220
  int64_t      ever;
6221
} OffsetRows;
6222
6223
typedef struct {
6224
  char    topicName[TSDB_TOPIC_FNAME_LEN];
6225
  SArray* offsetRows;
6226
} TopicOffsetRows;
6227
6228
typedef struct {
6229
  int64_t consumerId;
6230
  int32_t epoch;
6231
  SArray* topics;
6232
  int8_t  pollFlag;
6233
} SMqHbReq;
6234
6235
typedef struct {
6236
  char   topic[TSDB_TOPIC_FNAME_LEN];
6237
  int8_t noPrivilege;
6238
} STopicPrivilege;
6239
6240
typedef struct {
6241
  SArray* topicPrivileges;  // SArray<STopicPrivilege>
6242
  int32_t debugFlag;
6243
} SMqHbRsp;
6244
6245
typedef struct {
6246
  SMsgHead head;
6247
  int64_t  consumerId;
6248
  char     subKey[TSDB_SUBSCRIBE_KEY_LEN];
6249
} SMqSeekReq;
6250
6251
#define TD_AUTO_CREATE_TABLE 0x1
6252
typedef struct {
6253
  int64_t       suid;
6254
  int64_t       uid;
6255
  int32_t       sver;
6256
  uint32_t      nData;
6257
  uint8_t*      pData;
6258
  SVCreateTbReq cTbReq;
6259
} SVSubmitBlk;
6260
6261
typedef struct {
6262
  SMsgHead header;
6263
  uint64_t sId;
6264
  uint64_t queryId;
6265
  uint64_t clientId;
6266
  uint64_t taskId;
6267
  uint32_t sqlLen;
6268
  uint32_t phyLen;
6269
  char*    sql;
6270
  char*    msg;
6271
  int8_t   source;
6272
  int8_t   secureDelete;
6273
} SVDeleteReq;
6274
6275
int32_t tSerializeSVDeleteReq(void* buf, int32_t bufLen, SVDeleteReq* pReq);
6276
int32_t tDeserializeSVDeleteReq(void* buf, int32_t bufLen, SVDeleteReq* pReq);
6277
6278
typedef struct {
6279
  int64_t affectedRows;
6280
} SVDeleteRsp;
6281
6282
int32_t tEncodeSVDeleteRsp(SEncoder* pCoder, const SVDeleteRsp* pReq);
6283
int32_t tDecodeSVDeleteRsp(SDecoder* pCoder, SVDeleteRsp* pReq);
6284
6285
typedef struct SDeleteRes {
6286
  uint64_t suid;
6287
  SArray*  uidList;
6288
  int64_t  skey;
6289
  int64_t  ekey;
6290
  int64_t  affectedRows;
6291
  char     tableFName[TSDB_TABLE_NAME_LEN];
6292
  char     tsColName[TSDB_COL_NAME_LEN];
6293
  int64_t  ctimeMs;  // fill by vnode
6294
  int8_t   source;
6295
  int8_t   secureDelete;  // force physical overwrite
6296
} SDeleteRes;
6297
6298
int32_t tEncodeDeleteRes(SEncoder* pCoder, const SDeleteRes* pRes);
6299
int32_t tDecodeDeleteRes(SDecoder* pCoder, SDeleteRes* pRes);
6300
6301
typedef struct {
6302
  // int64_t uid;
6303
  char    tbname[TSDB_TABLE_NAME_LEN];
6304
  int64_t startTs;
6305
  int64_t endTs;
6306
} SSingleDeleteReq;
6307
6308
int32_t tEncodeSSingleDeleteReq(SEncoder* pCoder, const SSingleDeleteReq* pReq);
6309
int32_t tDecodeSSingleDeleteReq(SDecoder* pCoder, SSingleDeleteReq* pReq);
6310
6311
typedef struct {
6312
  int64_t suid;
6313
  SArray* deleteReqs;  // SArray<SSingleDeleteReq>
6314
  int64_t ctimeMs;     // fill by vnode
6315
  int8_t  level;       // 0 tsdb(default), 1 rsma1 , 2 rsma2
6316
} SBatchDeleteReq;
6317
6318
int32_t tEncodeSBatchDeleteReq(SEncoder* pCoder, const SBatchDeleteReq* pReq);
6319
int32_t tDecodeSBatchDeleteReq(SDecoder* pCoder, SBatchDeleteReq* pReq);
6320
int32_t tDecodeSBatchDeleteReqSetCtime(SDecoder* pDecoder, SBatchDeleteReq* pReq, int64_t ctimeMs);
6321
6322
typedef struct {
6323
  int32_t msgIdx;
6324
  int32_t msgType;
6325
  int32_t msgLen;
6326
  void*   msg;
6327
} SBatchMsg;
6328
6329
typedef struct {
6330
  SMsgHead header;
6331
  SArray*  pMsgs;  // SArray<SBatchMsg>
6332
} SBatchReq;
6333
6334
typedef struct {
6335
  int32_t reqType;
6336
  int32_t msgIdx;
6337
  int32_t msgLen;
6338
  int32_t rspCode;
6339
  void*   msg;
6340
} SBatchRspMsg;
6341
6342
typedef struct {
6343
  SArray* pRsps;  // SArray<SBatchRspMsg>
6344
} SBatchRsp;
6345
6346
int32_t                  tSerializeSBatchReq(void* buf, int32_t bufLen, SBatchReq* pReq);
6347
int32_t                  tDeserializeSBatchReq(void* buf, int32_t bufLen, SBatchReq* pReq);
6348
0
static FORCE_INLINE void tFreeSBatchReqMsg(void* msg) {
6349
0
  if (NULL == msg) {
6350
0
    return;
6351
0
  }
6352
0
  SBatchMsg* pMsg = (SBatchMsg*)msg;
6353
0
  taosMemoryFree(pMsg->msg);
6354
0
}
Unexecuted instantiation: sql-fuzzer.c:tFreeSBatchReqMsg
Unexecuted instantiation: parser.c:tFreeSBatchReqMsg
Unexecuted instantiation: parTranslater.c:tFreeSBatchReqMsg
Unexecuted instantiation: parUtil.c:tFreeSBatchReqMsg
Unexecuted instantiation: parAstParser.c:tFreeSBatchReqMsg
Unexecuted instantiation: parAuthenticator.c:tFreeSBatchReqMsg
Unexecuted instantiation: parCalcConst.c:tFreeSBatchReqMsg
Unexecuted instantiation: parInsertSql.c:tFreeSBatchReqMsg
Unexecuted instantiation: parInsertUtil.c:tFreeSBatchReqMsg
Unexecuted instantiation: taos_lemon_sql.tab.c:tFreeSBatchReqMsg
Unexecuted instantiation: parAstCreater.c:tFreeSBatchReqMsg
Unexecuted instantiation: parInsertSml.c:tFreeSBatchReqMsg
Unexecuted instantiation: planner.c:tFreeSBatchReqMsg
Unexecuted instantiation: planLogicCreater.c:tFreeSBatchReqMsg
Unexecuted instantiation: planOptimizer.c:tFreeSBatchReqMsg
Unexecuted instantiation: planPhysiCreater.c:tFreeSBatchReqMsg
Unexecuted instantiation: planScaleOut.c:tFreeSBatchReqMsg
Unexecuted instantiation: planSpliter.c:tFreeSBatchReqMsg
Unexecuted instantiation: planUtil.c:tFreeSBatchReqMsg
Unexecuted instantiation: planValidator.c:tFreeSBatchReqMsg
Unexecuted instantiation: catalog.c:tFreeSBatchReqMsg
Unexecuted instantiation: ctgAsync.c:tFreeSBatchReqMsg
Unexecuted instantiation: ctgCache.c:tFreeSBatchReqMsg
Unexecuted instantiation: ctgDbg.c:tFreeSBatchReqMsg
Unexecuted instantiation: ctgRemote.c:tFreeSBatchReqMsg
Unexecuted instantiation: ctgRent.c:tFreeSBatchReqMsg
Unexecuted instantiation: ctgUtil.c:tFreeSBatchReqMsg
Unexecuted instantiation: functionMgt.c:tFreeSBatchReqMsg
Unexecuted instantiation: tudf.c:tFreeSBatchReqMsg
Unexecuted instantiation: builtins.c:tFreeSBatchReqMsg
Unexecuted instantiation: builtinsimpl.c:tFreeSBatchReqMsg
Unexecuted instantiation: thistogram.c:tFreeSBatchReqMsg
Unexecuted instantiation: tpercentile.c:tFreeSBatchReqMsg
Unexecuted instantiation: tavgfunction.c:tFreeSBatchReqMsg
Unexecuted instantiation: tminmax.c:tFreeSBatchReqMsg
Unexecuted instantiation: tminmaxavx.c:tFreeSBatchReqMsg
Unexecuted instantiation: filter.c:tFreeSBatchReqMsg
Unexecuted instantiation: scalar.c:tFreeSBatchReqMsg
Unexecuted instantiation: sclfunc.c:tFreeSBatchReqMsg
Unexecuted instantiation: sclvector.c:tFreeSBatchReqMsg
Unexecuted instantiation: nodesCloneFuncs.c:tFreeSBatchReqMsg
Unexecuted instantiation: nodesCodeFuncs.c:tFreeSBatchReqMsg
Unexecuted instantiation: nodesEqualFuncs.c:tFreeSBatchReqMsg
Unexecuted instantiation: nodesMatchFuncs.c:tFreeSBatchReqMsg
Unexecuted instantiation: nodesMsgFuncs.c:tFreeSBatchReqMsg
Unexecuted instantiation: nodesToSQLFuncs.c:tFreeSBatchReqMsg
Unexecuted instantiation: nodesTraverseFuncs.c:tFreeSBatchReqMsg
Unexecuted instantiation: nodesUtilFuncs.c:tFreeSBatchReqMsg
Unexecuted instantiation: queryUtil.c:tFreeSBatchReqMsg
Unexecuted instantiation: querymsg.c:tFreeSBatchReqMsg
Unexecuted instantiation: trans.c:tFreeSBatchReqMsg
Unexecuted instantiation: transCli.c:tFreeSBatchReqMsg
Unexecuted instantiation: transComm.c:tFreeSBatchReqMsg
Unexecuted instantiation: transSasl.c:tFreeSBatchReqMsg
Unexecuted instantiation: transSvr.c:tFreeSBatchReqMsg
Unexecuted instantiation: transTLS.c:tFreeSBatchReqMsg
Unexecuted instantiation: thttp.c:tFreeSBatchReqMsg
Unexecuted instantiation: geomFunc.c:tFreeSBatchReqMsg
Unexecuted instantiation: tconfig.c:tFreeSBatchReqMsg
Unexecuted instantiation: tdigest.c:tFreeSBatchReqMsg
Unexecuted instantiation: tlog.c:tFreeSBatchReqMsg
Unexecuted instantiation: tmempool.c:tFreeSBatchReqMsg
Unexecuted instantiation: mpDirect.c:tFreeSBatchReqMsg
Unexecuted instantiation: systable.c:tFreeSBatchReqMsg
Unexecuted instantiation: tdatablock.c:tFreeSBatchReqMsg
Unexecuted instantiation: tdataformat.c:tFreeSBatchReqMsg
Unexecuted instantiation: tglobal.c:tFreeSBatchReqMsg
Unexecuted instantiation: tmisce.c:tFreeSBatchReqMsg
Unexecuted instantiation: tname.c:tFreeSBatchReqMsg
Unexecuted instantiation: tpriv.c:tFreeSBatchReqMsg
Unexecuted instantiation: ttime.c:tFreeSBatchReqMsg
Unexecuted instantiation: tvariant.c:tFreeSBatchReqMsg
Unexecuted instantiation: streamMsg.c:tFreeSBatchReqMsg
Unexecuted instantiation: tmsg.c:tFreeSBatchReqMsg
Unexecuted instantiation: xnode.c:tFreeSBatchReqMsg
Unexecuted instantiation: tencrypt.c:tFreeSBatchReqMsg
Unexecuted instantiation: streamJson.c:tFreeSBatchReqMsg
6355
6356
int32_t tSerializeSBatchRsp(void* buf, int32_t bufLen, SBatchRsp* pRsp);
6357
int32_t tDeserializeSBatchRsp(void* buf, int32_t bufLen, SBatchRsp* pRsp);
6358
6359
0
static FORCE_INLINE void tFreeSBatchRspMsg(void* p) {
6360
0
  if (NULL == p) {
6361
0
    return;
6362
0
  }
6363
6364
0
  SBatchRspMsg* pRsp = (SBatchRspMsg*)p;
6365
0
  taosMemoryFree(pRsp->msg);
6366
0
}
Unexecuted instantiation: sql-fuzzer.c:tFreeSBatchRspMsg
Unexecuted instantiation: parser.c:tFreeSBatchRspMsg
Unexecuted instantiation: parTranslater.c:tFreeSBatchRspMsg
Unexecuted instantiation: parUtil.c:tFreeSBatchRspMsg
Unexecuted instantiation: parAstParser.c:tFreeSBatchRspMsg
Unexecuted instantiation: parAuthenticator.c:tFreeSBatchRspMsg
Unexecuted instantiation: parCalcConst.c:tFreeSBatchRspMsg
Unexecuted instantiation: parInsertSql.c:tFreeSBatchRspMsg
Unexecuted instantiation: parInsertUtil.c:tFreeSBatchRspMsg
Unexecuted instantiation: taos_lemon_sql.tab.c:tFreeSBatchRspMsg
Unexecuted instantiation: parAstCreater.c:tFreeSBatchRspMsg
Unexecuted instantiation: parInsertSml.c:tFreeSBatchRspMsg
Unexecuted instantiation: planner.c:tFreeSBatchRspMsg
Unexecuted instantiation: planLogicCreater.c:tFreeSBatchRspMsg
Unexecuted instantiation: planOptimizer.c:tFreeSBatchRspMsg
Unexecuted instantiation: planPhysiCreater.c:tFreeSBatchRspMsg
Unexecuted instantiation: planScaleOut.c:tFreeSBatchRspMsg
Unexecuted instantiation: planSpliter.c:tFreeSBatchRspMsg
Unexecuted instantiation: planUtil.c:tFreeSBatchRspMsg
Unexecuted instantiation: planValidator.c:tFreeSBatchRspMsg
Unexecuted instantiation: catalog.c:tFreeSBatchRspMsg
Unexecuted instantiation: ctgAsync.c:tFreeSBatchRspMsg
Unexecuted instantiation: ctgCache.c:tFreeSBatchRspMsg
Unexecuted instantiation: ctgDbg.c:tFreeSBatchRspMsg
Unexecuted instantiation: ctgRemote.c:tFreeSBatchRspMsg
Unexecuted instantiation: ctgRent.c:tFreeSBatchRspMsg
Unexecuted instantiation: ctgUtil.c:tFreeSBatchRspMsg
Unexecuted instantiation: functionMgt.c:tFreeSBatchRspMsg
Unexecuted instantiation: tudf.c:tFreeSBatchRspMsg
Unexecuted instantiation: builtins.c:tFreeSBatchRspMsg
Unexecuted instantiation: builtinsimpl.c:tFreeSBatchRspMsg
Unexecuted instantiation: thistogram.c:tFreeSBatchRspMsg
Unexecuted instantiation: tpercentile.c:tFreeSBatchRspMsg
Unexecuted instantiation: tavgfunction.c:tFreeSBatchRspMsg
Unexecuted instantiation: tminmax.c:tFreeSBatchRspMsg
Unexecuted instantiation: tminmaxavx.c:tFreeSBatchRspMsg
Unexecuted instantiation: filter.c:tFreeSBatchRspMsg
Unexecuted instantiation: scalar.c:tFreeSBatchRspMsg
Unexecuted instantiation: sclfunc.c:tFreeSBatchRspMsg
Unexecuted instantiation: sclvector.c:tFreeSBatchRspMsg
Unexecuted instantiation: nodesCloneFuncs.c:tFreeSBatchRspMsg
Unexecuted instantiation: nodesCodeFuncs.c:tFreeSBatchRspMsg
Unexecuted instantiation: nodesEqualFuncs.c:tFreeSBatchRspMsg
Unexecuted instantiation: nodesMatchFuncs.c:tFreeSBatchRspMsg
Unexecuted instantiation: nodesMsgFuncs.c:tFreeSBatchRspMsg
Unexecuted instantiation: nodesToSQLFuncs.c:tFreeSBatchRspMsg
Unexecuted instantiation: nodesTraverseFuncs.c:tFreeSBatchRspMsg
Unexecuted instantiation: nodesUtilFuncs.c:tFreeSBatchRspMsg
Unexecuted instantiation: queryUtil.c:tFreeSBatchRspMsg
Unexecuted instantiation: querymsg.c:tFreeSBatchRspMsg
Unexecuted instantiation: trans.c:tFreeSBatchRspMsg
Unexecuted instantiation: transCli.c:tFreeSBatchRspMsg
Unexecuted instantiation: transComm.c:tFreeSBatchRspMsg
Unexecuted instantiation: transSasl.c:tFreeSBatchRspMsg
Unexecuted instantiation: transSvr.c:tFreeSBatchRspMsg
Unexecuted instantiation: transTLS.c:tFreeSBatchRspMsg
Unexecuted instantiation: thttp.c:tFreeSBatchRspMsg
Unexecuted instantiation: geomFunc.c:tFreeSBatchRspMsg
Unexecuted instantiation: tconfig.c:tFreeSBatchRspMsg
Unexecuted instantiation: tdigest.c:tFreeSBatchRspMsg
Unexecuted instantiation: tlog.c:tFreeSBatchRspMsg
Unexecuted instantiation: tmempool.c:tFreeSBatchRspMsg
Unexecuted instantiation: mpDirect.c:tFreeSBatchRspMsg
Unexecuted instantiation: systable.c:tFreeSBatchRspMsg
Unexecuted instantiation: tdatablock.c:tFreeSBatchRspMsg
Unexecuted instantiation: tdataformat.c:tFreeSBatchRspMsg
Unexecuted instantiation: tglobal.c:tFreeSBatchRspMsg
Unexecuted instantiation: tmisce.c:tFreeSBatchRspMsg
Unexecuted instantiation: tname.c:tFreeSBatchRspMsg
Unexecuted instantiation: tpriv.c:tFreeSBatchRspMsg
Unexecuted instantiation: ttime.c:tFreeSBatchRspMsg
Unexecuted instantiation: tvariant.c:tFreeSBatchRspMsg
Unexecuted instantiation: streamMsg.c:tFreeSBatchRspMsg
Unexecuted instantiation: tmsg.c:tFreeSBatchRspMsg
Unexecuted instantiation: xnode.c:tFreeSBatchRspMsg
Unexecuted instantiation: tencrypt.c:tFreeSBatchRspMsg
Unexecuted instantiation: streamJson.c:tFreeSBatchRspMsg
6367
6368
int32_t tSerializeSMqAskEpReq(void* buf, int32_t bufLen, SMqAskEpReq* pReq);
6369
int32_t tDeserializeSMqAskEpReq(void* buf, int32_t bufLen, SMqAskEpReq* pReq);
6370
int32_t tSerializeSMqHbReq(void* buf, int32_t bufLen, SMqHbReq* pReq);
6371
int32_t tDeserializeSMqHbReq(void* buf, int32_t bufLen, SMqHbReq* pReq);
6372
void    tDestroySMqHbReq(SMqHbReq* pReq);
6373
6374
int32_t tSerializeSMqHbRsp(void* buf, int32_t bufLen, SMqHbRsp* pRsp);
6375
int32_t tDeserializeSMqHbRsp(void* buf, int32_t bufLen, SMqHbRsp* pRsp);
6376
void    tDestroySMqHbRsp(SMqHbRsp* pRsp);
6377
6378
int32_t tSerializeSMqSeekReq(void* buf, int32_t bufLen, SMqSeekReq* pReq);
6379
int32_t tDeserializeSMqSeekReq(void* buf, int32_t bufLen, SMqSeekReq* pReq);
6380
6381
0
#define TD_REQ_FROM_APP               0x0
6382
0
#define SUBMIT_REQ_AUTO_CREATE_TABLE  0x1
6383
0
#define SUBMIT_REQ_COLUMN_DATA_FORMAT 0x2
6384
0
#define SUBMIT_REQ_FROM_FILE          0x4
6385
0
#define TD_REQ_FROM_TAOX              0x8
6386
#define TD_REQ_FROM_SML               0x10
6387
0
#define SUBMIT_REQUEST_VERSION        (2)
6388
0
#define SUBMIT_REQ_WITH_BLOB          0x10
6389
#define SUBMIT_REQ_SCHEMA_RES         0x20
6390
#define SUBMIT_REQ_ONLY_CREATE_TABLE  0x40
6391
6392
#define TD_REQ_FROM_TAOX_OLD 0x1  // for compatibility
6393
6394
typedef struct {
6395
  int32_t        flags;
6396
  SVCreateTbReq* pCreateTbReq;
6397
  int64_t        suid;
6398
  int64_t        uid;
6399
  int32_t        sver;
6400
  union {
6401
    SArray* aRowP;
6402
    SArray* aCol;
6403
  };
6404
  int64_t   ctimeMs;
6405
  SBlobSet* pBlobSet;
6406
} SSubmitTbData;
6407
6408
typedef struct {
6409
  SArray* aSubmitTbData;  // SArray<SSubmitTbData>
6410
  SArray* aSubmitBlobData;
6411
  bool    raw;
6412
} SSubmitReq2;
6413
6414
typedef struct {
6415
  SMsgHead header;
6416
  int64_t  version;
6417
  char     data[];  // SSubmitReq2
6418
} SSubmitReq2Msg;
6419
6420
int32_t transformRawSSubmitTbData(void* data, int64_t suid, int64_t uid, int32_t sver);
6421
int32_t tEncodeSubmitReq(SEncoder* pCoder, const SSubmitReq2* pReq);
6422
int32_t tDecodeSubmitReq(SDecoder* pCoder, SSubmitReq2* pReq, SArray* rawList);
6423
void    tDestroySubmitTbData(SSubmitTbData* pTbData, int32_t flag);
6424
void    tDestroySubmitReq(SSubmitReq2* pReq, int32_t flag);
6425
6426
typedef struct {
6427
  int32_t affectedRows;
6428
  SArray* aCreateTbRsp;  // SArray<SVCreateTbRsp>
6429
} SSubmitRsp2;
6430
6431
int32_t tEncodeSSubmitRsp2(SEncoder* pCoder, const SSubmitRsp2* pRsp);
6432
int32_t tDecodeSSubmitRsp2(SDecoder* pCoder, SSubmitRsp2* pRsp);
6433
void    tDestroySSubmitRsp2(SSubmitRsp2* pRsp, int32_t flag);
6434
6435
0
#define TSDB_MSG_FLG_ENCODE 0x1
6436
0
#define TSDB_MSG_FLG_DECODE 0x2
6437
0
#define TSDB_MSG_FLG_CMPT   0x3
6438
6439
typedef struct {
6440
  union {
6441
    struct {
6442
      void*   msgStr;
6443
      int32_t msgLen;
6444
      int64_t ver;
6445
    };
6446
    void* pDataBlock;
6447
  };
6448
} SPackedData;
6449
6450
typedef struct {
6451
  char     fullname[TSDB_VIEW_FNAME_LEN];
6452
  char     name[TSDB_VIEW_NAME_LEN];
6453
  char     dbFName[TSDB_DB_FNAME_LEN];
6454
  char*    querySql;
6455
  char*    sql;
6456
  int8_t   orReplace;
6457
  int8_t   precision;
6458
  int32_t  numOfCols;
6459
  SSchema* pSchema;
6460
} SCMCreateViewReq;
6461
6462
int32_t tSerializeSCMCreateViewReq(void* buf, int32_t bufLen, const SCMCreateViewReq* pReq);
6463
int32_t tDeserializeSCMCreateViewReq(void* buf, int32_t bufLen, SCMCreateViewReq* pReq);
6464
void    tFreeSCMCreateViewReq(SCMCreateViewReq* pReq);
6465
6466
typedef struct {
6467
  char   fullname[TSDB_VIEW_FNAME_LEN];
6468
  char   name[TSDB_VIEW_NAME_LEN];
6469
  char   dbFName[TSDB_DB_FNAME_LEN];
6470
  char*  sql;
6471
  int8_t igNotExists;
6472
} SCMDropViewReq;
6473
6474
int32_t tSerializeSCMDropViewReq(void* buf, int32_t bufLen, const SCMDropViewReq* pReq);
6475
int32_t tDeserializeSCMDropViewReq(void* buf, int32_t bufLen, SCMDropViewReq* pReq);
6476
void    tFreeSCMDropViewReq(SCMDropViewReq* pReq);
6477
6478
typedef struct {
6479
  char fullname[TSDB_VIEW_FNAME_LEN];
6480
} SViewMetaReq;
6481
int32_t tSerializeSViewMetaReq(void* buf, int32_t bufLen, const SViewMetaReq* pReq);
6482
int32_t tDeserializeSViewMetaReq(void* buf, int32_t bufLen, SViewMetaReq* pReq);
6483
6484
typedef struct {
6485
  char     name[TSDB_VIEW_NAME_LEN];
6486
  char     dbFName[TSDB_DB_FNAME_LEN];
6487
  char*    createUser;
6488
  int64_t  ownerId;
6489
  uint64_t dbId;
6490
  uint64_t viewId;
6491
  char*    querySql;
6492
  int8_t   precision;
6493
  int8_t   type;
6494
  int32_t  version;
6495
  int32_t  numOfCols;
6496
  SSchema* pSchema;
6497
} SViewMetaRsp;
6498
int32_t tSerializeSViewMetaRsp(void* buf, int32_t bufLen, const SViewMetaRsp* pRsp);
6499
int32_t tDeserializeSViewMetaRsp(void* buf, int32_t bufLen, SViewMetaRsp* pRsp);
6500
void    tFreeSViewMetaRsp(SViewMetaRsp* pRsp);
6501
typedef struct {
6502
  char name[TSDB_TABLE_FNAME_LEN];  // table name or tsma name
6503
  bool fetchingWithTsmaName;        // if we are fetching with tsma name
6504
} STableTSMAInfoReq;
6505
6506
int32_t tSerializeTableTSMAInfoReq(void* buf, int32_t bufLen, const STableTSMAInfoReq* pReq);
6507
int32_t tDeserializeTableTSMAInfoReq(void* buf, int32_t bufLen, STableTSMAInfoReq* pReq);
6508
6509
typedef struct {
6510
  char name[TSDB_TABLE_NAME_LEN];  // rsmaName
6511
  union {
6512
    uint8_t flags;
6513
    struct {
6514
      uint8_t withColName : 1;
6515
      uint8_t reserved : 7;
6516
    };
6517
  };
6518
6519
} SRsmaInfoReq;
6520
6521
int32_t tSerializeRsmaInfoReq(void* buf, int32_t bufLen, const SRsmaInfoReq* pReq);
6522
int32_t tDeserializeRsmaInfoReq(void* buf, int32_t bufLen, SRsmaInfoReq* pReq);
6523
6524
typedef struct {
6525
  int32_t  funcId;
6526
  col_id_t colId;
6527
} STableTSMAFuncInfo;
6528
6529
typedef struct {
6530
  char     name[TSDB_TABLE_NAME_LEN];
6531
  uint64_t tsmaId;
6532
  char     targetTb[TSDB_TABLE_NAME_LEN];
6533
  char     targetDbFName[TSDB_DB_FNAME_LEN];
6534
  char     tb[TSDB_TABLE_NAME_LEN];
6535
  char     dbFName[TSDB_DB_FNAME_LEN];
6536
  uint64_t suid;
6537
  uint64_t destTbUid;
6538
  uint64_t dbId;
6539
  int32_t  version;
6540
  int64_t  interval;
6541
  int8_t   unit;
6542
  SArray*  pFuncs;     // SArray<STableTSMAFuncInfo>
6543
  SArray*  pTags;      // SArray<SSchema>
6544
  SArray*  pUsedCols;  // SArray<SSchema>
6545
  char*    ast;
6546
6547
  int64_t streamUid;
6548
  int64_t reqTs;
6549
  int64_t rspTs;
6550
  int64_t delayDuration;  // ms
6551
  bool    fillHistoryFinished;
6552
6553
  void* streamAddr;  // for stream task, the address of the stream task
6554
} STableTSMAInfo;
6555
6556
int32_t tSerializeTableTSMAInfoRsp(void* buf, int32_t bufLen, const STableTSMAInfoRsp* pRsp);
6557
int32_t tDeserializeTableTSMAInfoRsp(void* buf, int32_t bufLen, STableTSMAInfoRsp* pRsp);
6558
int32_t tCloneTbTSMAInfo(STableTSMAInfo* pInfo, STableTSMAInfo** pRes);
6559
void    tFreeTableTSMAInfo(void* p);
6560
void    tFreeAndClearTableTSMAInfo(void* p);
6561
void    tFreeTableTSMAInfoRsp(STableTSMAInfoRsp* pRsp);
6562
6563
#define STSMAHbRsp            STableTSMAInfoRsp
6564
#define tSerializeTSMAHbRsp   tSerializeTableTSMAInfoRsp
6565
#define tDeserializeTSMAHbRsp tDeserializeTableTSMAInfoRsp
6566
#define tFreeTSMAHbRsp        tFreeTableTSMAInfoRsp
6567
6568
typedef struct SDropCtbWithTsmaSingleVgReq {
6569
  SVgroupInfo vgInfo;
6570
  SArray*     pTbs;  // SVDropTbReq
6571
} SMDropTbReqsOnSingleVg;
6572
6573
int32_t tEncodeSMDropTbReqOnSingleVg(SEncoder* pEncoder, const SMDropTbReqsOnSingleVg* pReq);
6574
int32_t tDecodeSMDropTbReqOnSingleVg(SDecoder* pDecoder, SMDropTbReqsOnSingleVg* pReq);
6575
void    tFreeSMDropTbReqOnSingleVg(void* p);
6576
6577
typedef struct SDropTbsReq {
6578
  SArray* pVgReqs;  // SMDropTbReqsOnSingleVg
6579
} SMDropTbsReq;
6580
6581
int32_t tSerializeSMDropTbsReq(void* buf, int32_t bufLen, const SMDropTbsReq* pReq);
6582
int32_t tDeserializeSMDropTbsReq(void* buf, int32_t bufLen, SMDropTbsReq* pReq);
6583
void    tFreeSMDropTbsReq(void*);
6584
6585
typedef struct SVFetchTtlExpiredTbsRsp {
6586
  SArray* pExpiredTbs;  // SVDropTbReq
6587
  int32_t vgId;
6588
} SVFetchTtlExpiredTbsRsp;
6589
6590
int32_t tEncodeVFetchTtlExpiredTbsRsp(SEncoder* pCoder, const SVFetchTtlExpiredTbsRsp* pRsp);
6591
int32_t tDecodeVFetchTtlExpiredTbsRsp(SDecoder* pCoder, SVFetchTtlExpiredTbsRsp* pRsp);
6592
6593
void tFreeFetchTtlExpiredTbsRsp(void* p);
6594
6595
void setDefaultOptionsForField(SFieldWithOptions* field);
6596
void setFieldWithOptions(SFieldWithOptions* fieldWithOptions, SField* field);
6597
6598
int32_t tSerializeSVSubTablesRspImpl(SEncoder* pEncoder, SVSubTablesRsp* pRsp);
6599
int32_t tDeserializeSVSubTablesRspImpl(SDecoder* pDecoder, SVSubTablesRsp* pRsp);
6600
6601
typedef struct {
6602
  char    id[TSDB_INSTANCE_ID_LEN];
6603
  char    type[TSDB_INSTANCE_TYPE_LEN];
6604
  char    desc[TSDB_INSTANCE_DESC_LEN];
6605
  int32_t expire;
6606
} SInstanceRegisterReq;
6607
6608
int32_t tSerializeSInstanceRegisterReq(void* buf, int32_t bufLen, SInstanceRegisterReq* pReq);
6609
int32_t tDeserializeSInstanceRegisterReq(void* buf, int32_t bufLen, SInstanceRegisterReq* pReq);
6610
6611
typedef struct {
6612
  char filter_type[TSDB_INSTANCE_TYPE_LEN];
6613
} SInstanceListReq;
6614
6615
typedef struct {
6616
  int32_t count;
6617
  char**  ids;  // Array of instance IDs
6618
} SInstanceListRsp;
6619
6620
int32_t tSerializeSInstanceListReq(void* buf, int32_t bufLen, SInstanceListReq* pReq);
6621
int32_t tDeserializeSInstanceListReq(void* buf, int32_t bufLen, SInstanceListReq* pReq);
6622
int32_t tSerializeSInstanceListRsp(void* buf, int32_t bufLen, SInstanceListRsp* pRsp);
6623
int32_t tDeserializeSInstanceListRsp(void* buf, int32_t bufLen, SInstanceListRsp* pRsp);
6624
6625
#ifdef USE_MOUNT
6626
typedef struct {
6627
  char     mountName[TSDB_MOUNT_NAME_LEN];
6628
  int8_t   ignoreExist;
6629
  int16_t  nMounts;
6630
  int32_t* dnodeIds;
6631
  char**   mountPaths;
6632
  int32_t  sqlLen;
6633
  char*    sql;
6634
} SCreateMountReq;
6635
6636
int32_t tSerializeSCreateMountReq(void* buf, int32_t bufLen, SCreateMountReq* pReq);
6637
int32_t tDeserializeSCreateMountReq(void* buf, int32_t bufLen, SCreateMountReq* pReq);
6638
void    tFreeSCreateMountReq(SCreateMountReq* pReq);
6639
6640
typedef struct {
6641
  char    mountName[TSDB_MOUNT_NAME_LEN];
6642
  int8_t  ignoreNotExists;
6643
  int32_t sqlLen;
6644
  char*   sql;
6645
} SDropMountReq;
6646
6647
int32_t tSerializeSDropMountReq(void* buf, int32_t bufLen, SDropMountReq* pReq);
6648
int32_t tDeserializeSDropMountReq(void* buf, int32_t bufLen, SDropMountReq* pReq);
6649
void    tFreeSDropMountReq(SDropMountReq* pReq);
6650
6651
typedef struct {
6652
  char     mountName[TSDB_MOUNT_NAME_LEN];
6653
  char     mountPath[TSDB_MOUNT_PATH_LEN];
6654
  int64_t  mountUid;
6655
  int32_t  dnodeId;
6656
  uint32_t valLen;
6657
  int8_t   ignoreExist;
6658
  void*    pVal;
6659
} SRetrieveMountPathReq;
6660
6661
int32_t tSerializeSRetrieveMountPathReq(void* buf, int32_t bufLen, SRetrieveMountPathReq* pReq);
6662
int32_t tDeserializeSRetrieveMountPathReq(void* buf, int32_t bufLen, SRetrieveMountPathReq* pReq);
6663
6664
typedef struct {
6665
  // path
6666
  int32_t diskPrimary;
6667
  // vgInfo
6668
  int32_t  vgId;
6669
  int32_t  cacheLastSize;
6670
  int32_t  szPage;
6671
  int32_t  szCache;
6672
  uint64_t szBuf;
6673
  int8_t   cacheLast;
6674
  int8_t   standby;
6675
  int8_t   hashMethod;
6676
  uint32_t hashBegin;
6677
  uint32_t hashEnd;
6678
  int16_t  hashPrefix;
6679
  int16_t  hashSuffix;
6680
  int16_t  sttTrigger;
6681
  // syncInfo
6682
  int32_t replications;
6683
  // tsdbInfo
6684
  int8_t  precision;
6685
  int8_t  compression;
6686
  int8_t  slLevel;
6687
  int32_t daysPerFile;
6688
  int32_t keep0;
6689
  int32_t keep1;
6690
  int32_t keep2;
6691
  int32_t keepTimeOffset;
6692
  int32_t minRows;
6693
  int32_t maxRows;
6694
  int32_t tsdbPageSize;
6695
  int32_t ssChunkSize;
6696
  int32_t ssKeepLocal;
6697
  int8_t  ssCompact;
6698
  union {
6699
    uint8_t flags;
6700
    struct {
6701
      uint8_t isAudit : 1;
6702
      uint8_t allowDrop : 1;
6703
      uint8_t securityLevel : 3;
6704
      uint8_t reserved : 3;
6705
    };
6706
  };
6707
  int8_t secureDelete;
6708
  // walInfo
6709
  int32_t walFsyncPeriod;      // millisecond
6710
  int32_t walRetentionPeriod;  // secs
6711
  int32_t walRollPeriod;       // secs
6712
  int64_t walRetentionSize;
6713
  int64_t walSegSize;
6714
  int32_t walLevel;
6715
  // encryptInfo
6716
  int32_t encryptAlgorithm;
6717
  // SVState
6718
  int64_t committed;
6719
  int64_t commitID;
6720
  int64_t commitTerm;
6721
  // stats
6722
  int64_t numOfSTables;
6723
  int64_t numOfCTables;
6724
  int64_t numOfNTables;
6725
  // dbInfo
6726
  uint64_t dbId;
6727
} SMountVgInfo;
6728
6729
typedef struct {
6730
  SMCreateStbReq req;
6731
  SArray*        pColExts;  // element: column id
6732
  SArray*        pTagExts;  // element: tag id
6733
} SMountStbInfo;
6734
6735
int32_t tSerializeSMountStbInfo(void* buf, int32_t bufLen, int32_t* pFLen, SMountStbInfo* pInfo);
6736
int32_t tDeserializeSMountStbInfo(void* buf, int32_t bufLen, int32_t flen, SMountStbInfo* pInfo);
6737
6738
typedef struct {
6739
  char     dbName[TSDB_DB_FNAME_LEN];
6740
  uint64_t dbId;
6741
  SArray*  pVgs;   // SMountVgInfo
6742
  SArray*  pStbs;  // 0 serialized binary of SMountStbInfo, 1 SMountStbInfo
6743
} SMountDbInfo;
6744
6745
typedef struct {
6746
  // common fields
6747
  char     mountName[TSDB_MOUNT_NAME_LEN];
6748
  char     mountPath[TSDB_MOUNT_PATH_LEN];
6749
  int8_t   ignoreExist;
6750
  int64_t  mountUid;
6751
  int64_t  clusterId;
6752
  int32_t  dnodeId;
6753
  uint32_t valLen;
6754
  void*    pVal;
6755
6756
  // response fields
6757
  SArray* pDbs;  // SMountDbInfo
6758
6759
  // memory fields, no serialized
6760
  SArray*   pDisks[TFS_MAX_TIERS];
6761
  TdFilePtr pFile;
6762
} SMountInfo;
6763
6764
int32_t tSerializeSMountInfo(void* buf, int32_t bufLen, SMountInfo* pReq);
6765
int32_t tDeserializeSMountInfo(SDecoder* decoder, SMountInfo* pReq, bool extractStb);
6766
void    tFreeMountInfo(SMountInfo* pReq, bool stbExtracted);
6767
6768
typedef struct {
6769
  SCreateVnodeReq createReq;
6770
  char            mountPath[TSDB_MOUNT_FPATH_LEN];
6771
  char            mountName[TSDB_MOUNT_NAME_LEN];
6772
  int64_t         mountId;
6773
  int32_t         diskPrimary;
6774
  int32_t         mountVgId;
6775
  int64_t         committed;
6776
  int64_t         commitID;
6777
  int64_t         commitTerm;
6778
  int64_t         numOfSTables;
6779
  int64_t         numOfCTables;
6780
  int64_t         numOfNTables;
6781
} SMountVnodeReq;
6782
6783
int32_t tSerializeSMountVnodeReq(void* buf, int32_t* cBufLen, int32_t* tBufLen, SMountVnodeReq* pReq);
6784
int32_t tDeserializeSMountVnodeReq(void* buf, int32_t bufLen, SMountVnodeReq* pReq);
6785
int32_t tFreeSMountVnodeReq(SMountVnodeReq* pReq);
6786
6787
#endif  // USE_MOUNT
6788
6789
#pragma pack(pop)
6790
6791
typedef struct {
6792
  char        db[TSDB_DB_FNAME_LEN];
6793
  STimeWindow timeRange;
6794
  int32_t     sqlLen;
6795
  char*       sql;
6796
  SArray*     vgroupIds;
6797
} SScanDbReq;
6798
6799
int32_t tSerializeSScanDbReq(void* buf, int32_t bufLen, SScanDbReq* pReq);
6800
int32_t tDeserializeSScanDbReq(void* buf, int32_t bufLen, SScanDbReq* pReq);
6801
void    tFreeSScanDbReq(SScanDbReq* pReq);
6802
6803
typedef struct {
6804
  int32_t scanId;
6805
  int8_t  bAccepted;
6806
} SScanDbRsp;
6807
6808
int32_t tSerializeSScanDbRsp(void* buf, int32_t bufLen, SScanDbRsp* pRsp);
6809
int32_t tDeserializeSScanDbRsp(void* buf, int32_t bufLen, SScanDbRsp* pRsp);
6810
6811
typedef struct {
6812
  int32_t scanId;
6813
  int32_t sqlLen;
6814
  char*   sql;
6815
} SKillScanReq;
6816
6817
int32_t tSerializeSKillScanReq(void* buf, int32_t bufLen, SKillScanReq* pReq);
6818
int32_t tDeserializeSKillScanReq(void* buf, int32_t bufLen, SKillScanReq* pReq);
6819
void    tFreeSKillScanReq(SKillScanReq* pReq);
6820
6821
typedef struct {
6822
  int32_t scanId;
6823
  int32_t vgId;
6824
  int32_t dnodeId;
6825
} SVKillScanReq;
6826
6827
int32_t tSerializeSVKillScanReq(void* buf, int32_t bufLen, SVKillScanReq* pReq);
6828
int32_t tDeserializeSVKillScanReq(void* buf, int32_t bufLen, SVKillScanReq* pReq);
6829
6830
typedef struct {
6831
  int32_t scanId;
6832
  int32_t vgId;
6833
  int32_t dnodeId;
6834
  int32_t numberFileset;
6835
  int32_t finished;
6836
  int32_t progress;
6837
  int64_t remainingTime;
6838
} SQueryScanProgressRsp;
6839
6840
int32_t tSerializeSQueryScanProgressRsp(void* buf, int32_t bufLen, SQueryScanProgressRsp* pReq);
6841
int32_t tDeserializeSQueryScanProgressRsp(void* buf, int32_t bufLen, SQueryScanProgressRsp* pReq);
6842
6843
typedef struct {
6844
  int32_t scanId;
6845
  int32_t vgId;
6846
  int32_t dnodeId;
6847
} SQueryScanProgressReq;
6848
6849
int32_t tSerializeSQueryScanProgressReq(void* buf, int32_t bufLen, SQueryScanProgressReq* pReq);
6850
int32_t tDeserializeSQueryScanProgressReq(void* buf, int32_t bufLen, SQueryScanProgressReq* pReq);
6851
6852
typedef struct {
6853
  int64_t     dbUid;
6854
  char        db[TSDB_DB_FNAME_LEN];
6855
  int64_t     scanStartTime;
6856
  STimeWindow tw;
6857
  int32_t     scanId;
6858
} SScanVnodeReq;
6859
6860
int32_t tSerializeSScanVnodeReq(void* buf, int32_t bufLen, SScanVnodeReq* pReq);
6861
int32_t tDeserializeSScanVnodeReq(void* buf, int32_t bufLen, SScanVnodeReq* pReq);
6862
6863
#ifdef __cplusplus
6864
}
6865
#endif
6866
6867
#endif /*_TD_COMMON_TAOS_MSG_H_*/