clientMsgHandler.c 13.7 KB
Newer Older
H
Haojun Liao 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/*
 * Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
 *
 * This program is free software: you can use, redistribute, and/or modify
 * it under the terms of the GNU Affero General Public License, version 3
 * or later ("AGPL"), as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */

H
Haojun Liao 已提交
16
#include "os.h"
H
Haojun Liao 已提交
17
#include "tdef.h"
H
Haojun Liao 已提交
18
#include "tname.h"
H
Haojun Liao 已提交
19
#include "clientInt.h"
20
#include "clientLog.h"
D
dapan1121 已提交
21
#include "catalog.h"
H
Haojun Liao 已提交
22

S
Shengliang Guan 已提交
23
int32_t (*handleRequestRspFp[TDMT_MAX])(void*, const SDataBuf* pMsg, int32_t code);
H
Haojun Liao 已提交
24

H
Haojun Liao 已提交
25 26 27 28 29
static void setErrno(SRequestObj* pRequest, int32_t code) {
  pRequest->code = code;
  terrno = code;
}

S
Shengliang Guan 已提交
30
int32_t genericRspCallback(void* param, const SDataBuf* pMsg, int32_t code) {
31
  SRequestObj* pRequest = param;
H
Haojun Liao 已提交
32 33
  setErrno(pRequest, code);

H
Haojun Liao 已提交
34
  free(pMsg->pData);
35
  sem_post(&pRequest->body.rspSem);
H
Haojun Liao 已提交
36
  return code;
37 38
}

S
Shengliang Guan 已提交
39
int32_t processConnectRsp(void* param, const SDataBuf* pMsg, int32_t code) {
40
  SRequestObj* pRequest = param;
H
Haojun Liao 已提交
41
  if (code != TSDB_CODE_SUCCESS) {
H
Haojun Liao 已提交
42
    free(pMsg->pData);
H
Haojun Liao 已提交
43
    setErrno(pRequest, code);
H
Haojun Liao 已提交
44
    sem_post(&pRequest->body.rspSem);
H
Haojun Liao 已提交
45 46
    return code;
  }
47

S
Shengliang Guan 已提交
48
  STscObj* pTscObj = pRequest->pTscObj;
H
Haojun Liao 已提交
49

S
Shengliang Guan 已提交
50 51 52
  SConnectRsp connectRsp = {0};
  tDeserializeSConnectRsp(pMsg->pData, pMsg->len, &connectRsp);
  assert(connectRsp.epSet.numOfEps > 0);
H
Haojun Liao 已提交
53

S
Shengliang Guan 已提交
54 55
  if (!isEpsetEqual(&pTscObj->pAppInfo->mgmtEp.epSet, &connectRsp.epSet)) {
    updateEpSet_s(&pTscObj->pAppInfo->mgmtEp, &connectRsp.epSet);
56 57
  }

S
Shengliang Guan 已提交
58
  for (int32_t i = 0; i < connectRsp.epSet.numOfEps; ++i) {
S
Shengliang Guan 已提交
59
    tscDebug("0x%" PRIx64 " epSet.fqdn[%d]:%s port:%d, connObj:0x%" PRIx64, pRequest->requestId, i,
S
Shengliang Guan 已提交
60
             connectRsp.epSet.eps[i].fqdn, connectRsp.epSet.eps[i].port, pTscObj->id);
H
Haojun Liao 已提交
61 62
  }

S
Shengliang Guan 已提交
63 64 65
  pTscObj->connId = connectRsp.connId;
  pTscObj->acctId = connectRsp.acctId;
  tstrncpy(pTscObj->ver, connectRsp.sVersion, tListLen(pTscObj->ver));
H
Haojun Liao 已提交
66 67

  // update the appInstInfo
S
Shengliang Guan 已提交
68
  pTscObj->pAppInfo->clusterId = connectRsp.clusterId;
H
Haojun Liao 已提交
69 70
  atomic_add_fetch_64(&pTscObj->pAppInfo->numOfConns, 1);

71 72
  pTscObj->connType = HEARTBEAT_TYPE_QUERY;

S
Shengliang Guan 已提交
73
  hbRegisterConn(pTscObj->pAppInfo->pAppHbMgr, connectRsp.connId, connectRsp.clusterId, HEARTBEAT_TYPE_QUERY);
L
Liu Jicong 已提交
74

75
  //  pRequest->body.resInfo.pRspMsg = pMsg->pData;
S
Shengliang Guan 已提交
76
  tscDebug("0x%" PRIx64 " clusterId:%" PRId64 ", totalConn:%" PRId64, pRequest->requestId, connectRsp.clusterId,
77
           pTscObj->pAppInfo->numOfConns);
78

H
Haojun Liao 已提交
79
  free(pMsg->pData);
80
  sem_post(&pRequest->body.rspSem);
81 82
  return 0;
}
H
Haojun Liao 已提交
83

84
SMsgSendInfo* buildMsgInfoImpl(SRequestObj *pRequest) {
85 86
  SMsgSendInfo* pMsgSendInfo = calloc(1, sizeof(SMsgSendInfo));

H
Haojun Liao 已提交
87 88 89 90 91 92 93
  pMsgSendInfo->requestObjRefId = pRequest->self;
  pMsgSendInfo->requestId       = pRequest->requestId;
  pMsgSendInfo->param           = pRequest;
  pMsgSendInfo->msgType         = pRequest->type;

  if (pRequest->type == TDMT_MND_SHOW_RETRIEVE || pRequest->type == TDMT_VND_SHOW_TABLES_FETCH) {
    if (pRequest->type == TDMT_MND_SHOW_RETRIEVE) {
S
Shengliang Guan 已提交
94 95 96 97 98 99 100 101
      SRetrieveTableReq retrieveReq = {0};
      retrieveReq.showId = pRequest->body.showInfo.execId;

      int32_t contLen = tSerializeSRetrieveTableReq(NULL, 0, &retrieveReq);
      void*   pReq = malloc(contLen);
      tSerializeSRetrieveTableReq(pReq, contLen, &retrieveReq);
      pMsgSendInfo->msgInfo.pData = pReq;
      pMsgSendInfo->msgInfo.len = contLen;
dengyihao's avatar
dengyihao 已提交
102
      pMsgSendInfo->msgInfo.handle = NULL;
H
Haojun Liao 已提交
103 104 105 106 107 108
    } else {
      SVShowTablesFetchReq* pFetchMsg = calloc(1, sizeof(SVShowTablesFetchReq));
      if (pFetchMsg == NULL) {
        return NULL;
      }

109 110 111
      pFetchMsg->id = htobe64(pRequest->body.showInfo.execId);
      pFetchMsg->head.vgId = htonl(pRequest->body.showInfo.vgId);

H
Haojun Liao 已提交
112 113
      pMsgSendInfo->msgInfo.pData = pFetchMsg;
      pMsgSendInfo->msgInfo.len = sizeof(SVShowTablesFetchReq);
dengyihao's avatar
dengyihao 已提交
114
      pMsgSendInfo->msgInfo.handle = NULL;
H
Haojun Liao 已提交
115
    }
116 117
  } else {
    assert(pRequest != NULL);
H
Haojun Liao 已提交
118
    pMsgSendInfo->msgInfo = pRequest->body.requestMsg;
H
Haojun Liao 已提交
119
  }
120

H
Haojun Liao 已提交
121
  pMsgSendInfo->fp = (handleRequestRspFp[TMSG_INDEX(pRequest->type)] == NULL)? genericRspCallback:handleRequestRspFp[TMSG_INDEX(pRequest->type)];
122
  return pMsgSendInfo;
123 124
}

125 126 127
int32_t processShowRsp(void* param, const SDataBuf* pMsg, int32_t code) {
  SRequestObj* pRequest = param;
  if (code != TSDB_CODE_SUCCESS) {
H
Haojun Liao 已提交
128
    setErrno(pRequest, code);
129 130 131 132
    tsem_post(&pRequest->body.rspSem);
    return code;
  }

S
Shengliang Guan 已提交
133 134 135
  SShowRsp showRsp = {0};
  tDeserializeSShowRsp(pMsg->pData, pMsg->len, &showRsp);
  STableMetaRsp *pMetaMsg = &showRsp.tableMeta;
136

H
Haojun Liao 已提交
137
  tfree(pRequest->body.resInfo.pRspMsg);
138
  pRequest->body.resInfo.pRspMsg = pMsg->pData;
139
  SReqResultInfo* pResInfo = &pRequest->body.resInfo;
140

H
Haojun Liao 已提交
141 142 143
  if (pResInfo->fields == NULL) {
    TAOS_FIELD* pFields = calloc(pMetaMsg->numOfColumns, sizeof(TAOS_FIELD));
    for (int32_t i = 0; i < pMetaMsg->numOfColumns; ++i) {
S
Shengliang Guan 已提交
144 145 146 147
      SSchema* pSchema = &pMetaMsg->pSchemas[i];
      tstrncpy(pFields[i].name, pSchema->name, tListLen(pFields[i].name));
      pFields[i].type = pSchema->type;
      pFields[i].bytes = pSchema->bytes;
H
Haojun Liao 已提交
148
    }
H
Haojun Liao 已提交
149

H
Haojun Liao 已提交
150 151 152 153
    pResInfo->fields = pFields;
  }

  pResInfo->numOfCols = pMetaMsg->numOfColumns;
S
Shengliang Guan 已提交
154 155
  pRequest->body.showInfo.execId = showRsp.showId;
  tFreeSShowRsp(&showRsp);
156 157 158 159 160 161 162 163 164 165

  // todo
  if (pRequest->type == TDMT_VND_SHOW_TABLES) {
    SShowReqInfo* pShowInfo = &pRequest->body.showInfo;

    int32_t index = pShowInfo->currentIndex;
    SVgroupInfo* pInfo = taosArrayGet(pShowInfo->pArray, index);
    pShowInfo->vgId = pInfo->vgId;
  }

166
  tsem_post(&pRequest->body.rspSem);
H
Haojun Liao 已提交
167 168 169
  return 0;
}

170
int32_t processRetrieveMnodeRsp(void* param, const SDataBuf* pMsg, int32_t code) {
H
Haojun Liao 已提交
171 172
  SRequestObj    *pRequest = param;
  SReqResultInfo *pResInfo = &pRequest->body.resInfo;
H
Haojun Liao 已提交
173
  tfree(pResInfo->pRspMsg);
H
Haojun Liao 已提交
174

H
Haojun Liao 已提交
175
  if (code != TSDB_CODE_SUCCESS) {
H
Haojun Liao 已提交
176
    setErrno(pRequest, code);
H
Haojun Liao 已提交
177 178 179 180
    tsem_post(&pRequest->body.rspSem);
    return code;
  }

H
Haojun Liao 已提交
181 182
  assert(pMsg->len >= sizeof(SRetrieveTableRsp));

183
  SRetrieveTableRsp *pRetrieve = (SRetrieveTableRsp *) pMsg->pData;
H
Haojun Liao 已提交
184 185 186
  pRetrieve->numOfRows  = htonl(pRetrieve->numOfRows);
  pRetrieve->precision  = htons(pRetrieve->precision);

187
  pResInfo->pRspMsg   = pMsg->pData;
H
Haojun Liao 已提交
188
  pResInfo->numOfRows = pRetrieve->numOfRows;
H
Haojun Liao 已提交
189
  pResInfo->pData     = pRetrieve->data;
D
dapan1121 已提交
190
  pResInfo->completed = pRetrieve->completed;
H
Haojun Liao 已提交
191 192 193 194 195

  pResInfo->current = 0;
  setResultDataPtr(pResInfo, pResInfo->fields, pResInfo->numOfCols, pResInfo->numOfRows);

  tscDebug("0x%"PRIx64" numOfRows:%d, complete:%d, qId:0x%"PRIx64, pRequest->self, pRetrieve->numOfRows,
196
           pRetrieve->completed, pRequest->body.showInfo.execId);
197 198

  tsem_post(&pRequest->body.rspSem);
H
Haojun Liao 已提交
199 200 201
  return 0;
}

H
Haojun Liao 已提交
202 203
int32_t processRetrieveVndRsp(void* param, const SDataBuf* pMsg, int32_t code) {
  SRequestObj* pRequest = param;
204 205 206

  SReqResultInfo* pResInfo = &pRequest->body.resInfo;
  tfree(pResInfo->pRspMsg);
H
Haojun Liao 已提交
207 208

  if (code != TSDB_CODE_SUCCESS) {
H
Haojun Liao 已提交
209
    setErrno(pRequest, code);
H
Haojun Liao 已提交
210 211 212 213
    tsem_post(&pRequest->body.rspSem);
    return code;
  }

214 215 216
  assert(pMsg->len >= sizeof(SRetrieveTableRsp));

  pResInfo->pRspMsg    = pMsg->pData;
H
Haojun Liao 已提交
217 218 219 220 221 222 223 224 225 226 227 228 229

  SVShowTablesFetchRsp *pFetchRsp = (SVShowTablesFetchRsp *) pMsg->pData;
  pFetchRsp->numOfRows  = htonl(pFetchRsp->numOfRows);
  pFetchRsp->precision  = htons(pFetchRsp->precision);

  pResInfo->pRspMsg   = pMsg->pData;
  pResInfo->numOfRows = pFetchRsp->numOfRows;
  pResInfo->pData     = pFetchRsp->data;

  pResInfo->current = 0;
  setResultDataPtr(pResInfo, pResInfo->fields, pResInfo->numOfCols, pResInfo->numOfRows);

  tscDebug("0x%"PRIx64" numOfRows:%d, complete:%d, qId:0x%"PRIx64, pRequest->self, pFetchRsp->numOfRows,
230
           pFetchRsp->completed, pRequest->body.showInfo.execId);
H
Haojun Liao 已提交
231 232 233 234 235

  tsem_post(&pRequest->body.rspSem);
  return 0;
}

236
int32_t processCreateDbRsp(void* param, const SDataBuf* pMsg, int32_t code) {
H
Haojun Liao 已提交
237
  // todo rsp with the vnode id list
238
  SRequestObj* pRequest = param;
H
Haojun Liao 已提交
239
  free(pMsg->pData);
240
  tsem_post(&pRequest->body.rspSem);
H
Haojun Liao 已提交
241
}
H
Haojun Liao 已提交
242

243
int32_t processUseDbRsp(void* param, const SDataBuf* pMsg, int32_t code) {
H
Haojun Liao 已提交
244 245 246
  SRequestObj* pRequest = param;

  if (code != TSDB_CODE_SUCCESS) {
H
Haojun Liao 已提交
247
    free(pMsg->pData);
H
Haojun Liao 已提交
248 249 250 251 252
    setErrno(pRequest, code);
    tsem_post(&pRequest->body.rspSem);
    return code;
  }

S
Shengliang Guan 已提交
253 254 255
  SUseDbRsp usedbRsp = {0};
  tDeserializeSUseDbRsp(pMsg->pData, pMsg->len, &usedbRsp);

256
  SName name = {0};
S
Shengliang Guan 已提交
257 258 259
  tNameFromString(&name, usedbRsp.db, T_NAME_ACCT|T_NAME_DB);

  tFreeSUsedbRsp(&usedbRsp);
260 261 262

  char db[TSDB_DB_NAME_LEN] = {0};
  tNameGetDbName(&name, db);
263

264
  setConnectionDB(pRequest->pTscObj, db);
H
Haojun Liao 已提交
265
  free(pMsg->pData);
266 267
  tsem_post(&pRequest->body.rspSem);
  return 0;
268 269
}

270
int32_t processCreateTableRsp(void* param, const SDataBuf* pMsg, int32_t code) {
H
Haojun Liao 已提交
271
  assert(pMsg != NULL && param != NULL);
272
  SRequestObj* pRequest = param;
H
Haojun Liao 已提交
273

274
  free(pMsg->pData);
H
Haojun Liao 已提交
275 276 277 278 279 280
  if (code != TSDB_CODE_SUCCESS) {
    setErrno(pRequest, code);
    tsem_post(&pRequest->body.rspSem);
    return code;
  }

281
  tsem_post(&pRequest->body.rspSem);
H
Haojun Liao 已提交
282
  return code;
283 284
}

285 286
int32_t processDropDbRsp(void* param, const SDataBuf* pMsg, int32_t code) {
  SRequestObj* pRequest = param;
H
Haojun Liao 已提交
287 288 289 290 291 292
  if (code != TSDB_CODE_SUCCESS) {
    setErrno(pRequest, code);
    tsem_post(&pRequest->body.rspSem);
    return code;
  }

S
Shengliang Guan 已提交
293 294
  SDropDbRsp dropdbRsp = {0};
  tDeserializeSDropDbRsp(pMsg->pData, pMsg->len, &dropdbRsp);
D
dapan1121 已提交
295

S
Shengliang Guan 已提交
296
  struct SCatalog* pCatalog = NULL;
D
dapan1121 已提交
297
  catalogGetHandle(pRequest->pTscObj->pAppInfo->clusterId, &pCatalog);
S
Shengliang Guan 已提交
298
  catalogRemoveDB(pCatalog, dropdbRsp.db, dropdbRsp.uid);
D
dapan1121 已提交
299

300
  tsem_post(&pRequest->body.rspSem);
H
Haojun Liao 已提交
301
  return code;
302 303
}

H
Haojun Liao 已提交
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328
void initMsgHandleFp() {
#if 0
  tscBuildMsg[TSDB_SQL_SELECT] = tscBuildQueryMsg;
  tscBuildMsg[TSDB_SQL_INSERT] = tscBuildSubmitMsg;
  tscBuildMsg[TSDB_SQL_FETCH] = tscBuildFetchMsg;

  tscBuildMsg[TSDB_SQL_CREATE_DB] = tscBuildCreateDbMsg;
  tscBuildMsg[TSDB_SQL_CREATE_USER] = tscBuildUserMsg;
  tscBuildMsg[TSDB_SQL_CREATE_FUNCTION] = tscBuildCreateFuncMsg;

  tscBuildMsg[TSDB_SQL_CREATE_ACCT] = tscBuildAcctMsg;
  tscBuildMsg[TSDB_SQL_ALTER_ACCT] = tscBuildAcctMsg;

  tscBuildMsg[TSDB_SQL_CREATE_TABLE] = tscBuildCreateTableMsg;
  tscBuildMsg[TSDB_SQL_DROP_USER] = tscBuildDropUserAcctMsg;
  tscBuildMsg[TSDB_SQL_DROP_ACCT] = tscBuildDropUserAcctMsg;
  tscBuildMsg[TSDB_SQL_DROP_DB] = tscBuildDropDbMsg;
  tscBuildMsg[TSDB_SQL_DROP_FUNCTION] = tscBuildDropFuncMsg;
  tscBuildMsg[TSDB_SQL_SYNC_DB_REPLICA] = tscBuildSyncDbReplicaMsg;
  tscBuildMsg[TSDB_SQL_DROP_TABLE] = tscBuildDropTableMsg;
  tscBuildMsg[TSDB_SQL_ALTER_USER] = tscBuildUserMsg;
  tscBuildMsg[TSDB_SQL_CREATE_DNODE] = tscBuildCreateDnodeMsg;
  tscBuildMsg[TSDB_SQL_DROP_DNODE] = tscBuildDropDnodeMsg;
  tscBuildMsg[TSDB_SQL_CFG_DNODE] = tscBuildCfgDnodeMsg;
  tscBuildMsg[TSDB_SQL_ALTER_TABLE] = tscBuildAlterTableMsg;
H
Haojun Liao 已提交
329
  tscBuildMsg[TSDB_SQL_UPDATE_TAG_VAL] = tscBuildUpdateTagMsg;
H
Haojun Liao 已提交
330 331 332 333 334 335 336 337 338 339
  tscBuildMsg[TSDB_SQL_ALTER_DB] = tscAlterDbMsg;
  tscBuildMsg[TSDB_SQL_COMPACT_VNODE] = tscBuildCompactMsg;


  tscBuildMsg[TSDB_SQL_USE_DB] = tscBuildUseDbMsg;
  tscBuildMsg[TSDB_SQL_STABLEVGROUP] = tscBuildSTableVgroupMsg;
  tscBuildMsg[TSDB_SQL_RETRIEVE_FUNC] = tscBuildRetrieveFuncMsg;

  tscBuildMsg[TSDB_SQL_HB] = tscBuildHeartBeatMsg;
  tscBuildMsg[TSDB_SQL_SHOW] = tscBuildShowMsg;
H
Haojun Liao 已提交
340
  tscBuildMsg[TSDB_SQL_RETRIEVE_MNODE] = tscBuildRetrieveFromMgmtMsg;
H
Haojun Liao 已提交
341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357
  tscBuildMsg[TSDB_SQL_KILL_QUERY] = tscBuildKillMsg;
  tscBuildMsg[TSDB_SQL_KILL_STREAM] = tscBuildKillMsg;
  tscBuildMsg[TSDB_SQL_KILL_CONNECTION] = tscBuildKillMsg;

  tscProcessMsgRsp[TSDB_SQL_SELECT] = tscProcessQueryRsp;
  tscProcessMsgRsp[TSDB_SQL_FETCH] = tscProcessRetrieveRspFromNode;

  tscProcessMsgRsp[TSDB_SQL_DROP_DB] = tscProcessDropDbRsp;
  tscProcessMsgRsp[TSDB_SQL_DROP_TABLE] = tscProcessDropTableRsp;

  tscProcessMsgRsp[TSDB_SQL_USE_DB] = tscProcessUseDbRsp;
  tscProcessMsgRsp[TSDB_SQL_META] = tscProcessTableMetaRsp;
  tscProcessMsgRsp[TSDB_SQL_STABLEVGROUP] = tscProcessSTableVgroupRsp;
  tscProcessMsgRsp[TSDB_SQL_MULTI_META] = tscProcessMultiTableMetaRsp;
  tscProcessMsgRsp[TSDB_SQL_RETRIEVE_FUNC] = tscProcessRetrieveFuncRsp;

  tscProcessMsgRsp[TSDB_SQL_SHOW] = tscProcessShowRsp;
H
Haojun Liao 已提交
358
  tscProcessMsgRsp[TSDB_SQL_RETRIEVE_MNODE] = tscProcessRetrieveRspFromNode;  // rsp handled by same function.
H
Haojun Liao 已提交
359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379
  tscProcessMsgRsp[TSDB_SQL_DESCRIBE_TABLE] = tscProcessDescribeTableRsp;

  tscProcessMsgRsp[TSDB_SQL_CURRENT_DB]   = tscProcessLocalRetrieveRsp;
  tscProcessMsgRsp[TSDB_SQL_CURRENT_USER] = tscProcessLocalRetrieveRsp;
  tscProcessMsgRsp[TSDB_SQL_SERV_VERSION] = tscProcessLocalRetrieveRsp;
  tscProcessMsgRsp[TSDB_SQL_CLI_VERSION]  = tscProcessLocalRetrieveRsp;
  tscProcessMsgRsp[TSDB_SQL_SERV_STATUS]  = tscProcessLocalRetrieveRsp;

  tscProcessMsgRsp[TSDB_SQL_RETRIEVE_EMPTY_RESULT] = tscProcessEmptyResultRsp;

  tscProcessMsgRsp[TSDB_SQL_RETRIEVE_GLOBALMERGE] = tscProcessRetrieveGlobalMergeRsp;

  tscProcessMsgRsp[TSDB_SQL_ALTER_TABLE] = tscProcessAlterTableMsgRsp;
  tscProcessMsgRsp[TSDB_SQL_ALTER_DB] = tscProcessAlterDbMsgRsp;
  tscProcessMsgRsp[TSDB_SQL_COMPACT_VNODE] = tscProcessCompactRsp;

  tscProcessMsgRsp[TSDB_SQL_SHOW_CREATE_TABLE] = tscProcessShowCreateRsp;
  tscProcessMsgRsp[TSDB_SQL_SHOW_CREATE_STABLE] = tscProcessShowCreateRsp;
  tscProcessMsgRsp[TSDB_SQL_SHOW_CREATE_DATABASE] = tscProcessShowCreateRsp;
#endif

D
catalog  
dapan1121 已提交
380 381 382 383 384 385 386
  handleRequestRspFp[TMSG_INDEX(TDMT_MND_CONNECT)]       = processConnectRsp;
  handleRequestRspFp[TMSG_INDEX(TDMT_MND_SHOW)]          = processShowRsp;
  handleRequestRspFp[TMSG_INDEX(TDMT_MND_SHOW_RETRIEVE)] = processRetrieveMnodeRsp;
  handleRequestRspFp[TMSG_INDEX(TDMT_MND_CREATE_DB)]     = processCreateDbRsp;
  handleRequestRspFp[TMSG_INDEX(TDMT_MND_USE_DB)]        = processUseDbRsp;
  handleRequestRspFp[TMSG_INDEX(TDMT_MND_CREATE_STB)]    = processCreateTableRsp;
  handleRequestRspFp[TMSG_INDEX(TDMT_MND_DROP_DB)]       = processDropDbRsp;
H
Haojun Liao 已提交
387 388 389

  handleRequestRspFp[TMSG_INDEX(TDMT_VND_SHOW_TABLES)]   = processShowRsp;
  handleRequestRspFp[TMSG_INDEX(TDMT_VND_SHOW_TABLES_FETCH)]   = processRetrieveVndRsp;
L
Liu Jicong 已提交
390
}