clientMsgHandler.c 13.9 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

H
Haojun Liao 已提交
23
int (*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;
}

H
Haojun Liao 已提交
30
int 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
}

39 40
int processConnectRsp(void* param, const SDataBuf* pMsg, int32_t code) {
  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

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

50
  SConnectRsp *pConnect = (SConnectRsp *)pMsg->pData;
H
Haojun Liao 已提交
51 52
  pConnect->acctId    = htonl(pConnect->acctId);
  pConnect->connId    = htonl(pConnect->connId);
53
  pConnect->clusterId = htobe64(pConnect->clusterId);
H
Haojun Liao 已提交
54

55 56
  assert(pConnect->epSet.numOfEps > 0);
  for(int32_t i = 0; i < pConnect->epSet.numOfEps; ++i) {
H
Haojun Liao 已提交
57
    pConnect->epSet.eps[i].port = htons(pConnect->epSet.eps[i].port);
58 59
  }

H
Haojun Liao 已提交
60 61 62 63 64
  if (!isEpsetEqual(&pTscObj->pAppInfo->mgmtEp.epSet, &pConnect->epSet)) {
    updateEpSet_s(&pTscObj->pAppInfo->mgmtEp, &pConnect->epSet);
  }

  for (int i = 0; i < pConnect->epSet.numOfEps; ++i) {
H
Haojun Liao 已提交
65 66
    tscDebug("0x%" PRIx64 " epSet.fqdn[%d]:%s port:%d, connObj:0x%"PRIx64, pRequest->requestId, i, pConnect->epSet.eps[i].fqdn,
        pConnect->epSet.eps[i].port, pTscObj->id);
H
Haojun Liao 已提交
67 68 69
  }

  pTscObj->connId = pConnect->connId;
H
Haojun Liao 已提交
70
  pTscObj->acctId = pConnect->acctId;
71
  tstrncpy(pTscObj->ver, pConnect->sVersion, tListLen(pTscObj->ver));
H
Haojun Liao 已提交
72 73 74 75 76

  // update the appInstInfo
  pTscObj->pAppInfo->clusterId = pConnect->clusterId;
  atomic_add_fetch_64(&pTscObj->pAppInfo->numOfConns, 1);

77 78
  pTscObj->connType = HEARTBEAT_TYPE_QUERY;

L
Liu Jicong 已提交
79
  /*hbRegisterConn(pTscObj->pAppInfo->pAppHbMgr, pConnect->connId, pConnect->clusterId, HEARTBEAT_TYPE_QUERY);*/
L
Liu Jicong 已提交
80

81
  //  pRequest->body.resInfo.pRspMsg = pMsg->pData;
82 83
  tscDebug("0x%" PRIx64 " clusterId:%" PRId64 ", totalConn:%" PRId64, pRequest->requestId, pConnect->clusterId,
           pTscObj->pAppInfo->numOfConns);
84

H
Haojun Liao 已提交
85
  free(pMsg->pData);
86
  sem_post(&pRequest->body.rspSem);
87 88
  return 0;
}
H
Haojun Liao 已提交
89

90
SMsgSendInfo* buildMsgInfoImpl(SRequestObj *pRequest) {
91 92
  SMsgSendInfo* pMsgSendInfo = calloc(1, sizeof(SMsgSendInfo));

H
Haojun Liao 已提交
93 94 95 96 97 98 99
  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 已提交
100
      SRetrieveTableReq* pRetrieveMsg = calloc(1, sizeof(SRetrieveTableReq));
H
Haojun Liao 已提交
101 102 103 104
      if (pRetrieveMsg == NULL) {
        return NULL;
      }

105
      pRetrieveMsg->showId = htobe64(pRequest->body.showInfo.execId);
H
Haojun Liao 已提交
106
      pMsgSendInfo->msgInfo.pData = pRetrieveMsg;
S
Shengliang Guan 已提交
107
      pMsgSendInfo->msgInfo.len = sizeof(SRetrieveTableReq);
H
Haojun Liao 已提交
108 109 110 111 112 113
    } else {
      SVShowTablesFetchReq* pFetchMsg = calloc(1, sizeof(SVShowTablesFetchReq));
      if (pFetchMsg == NULL) {
        return NULL;
      }

114 115 116
      pFetchMsg->id = htobe64(pRequest->body.showInfo.execId);
      pFetchMsg->head.vgId = htonl(pRequest->body.showInfo.vgId);

H
Haojun Liao 已提交
117 118 119
      pMsgSendInfo->msgInfo.pData = pFetchMsg;
      pMsgSendInfo->msgInfo.len = sizeof(SVShowTablesFetchReq);
    }
120 121
  } else {
    assert(pRequest != NULL);
H
Haojun Liao 已提交
122
    pMsgSendInfo->msgInfo = pRequest->body.requestMsg;
H
Haojun Liao 已提交
123
  }
124

H
Haojun Liao 已提交
125
  pMsgSendInfo->fp = (handleRequestRspFp[TMSG_INDEX(pRequest->type)] == NULL)? genericRspCallback:handleRequestRspFp[TMSG_INDEX(pRequest->type)];
126
  return pMsgSendInfo;
127 128
}

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

  SShowRsp* pShow = (SShowRsp *)pMsg->pData;
138
  pShow->showId   = htobe64(pShow->showId);
139

S
Shengliang Guan 已提交
140
  STableMetaRsp *pMetaMsg = &(pShow->tableMeta);
141 142 143 144 145
  pMetaMsg->numOfColumns = htonl(pMetaMsg->numOfColumns);

  SSchema* pSchema = pMetaMsg->pSchema;
  pMetaMsg->tuid = htobe64(pMetaMsg->tuid);
  for (int i = 0; i < pMetaMsg->numOfColumns; ++i) {
H
Haojun Liao 已提交
146
    pSchema->bytes = htonl(pSchema->bytes);
H
Haojun Liao 已提交
147
    pSchema->colId = htonl(pSchema->colId);
148 149 150
    pSchema++;
  }

H
Haojun Liao 已提交
151
  pSchema = pMetaMsg->pSchema;
H
Haojun Liao 已提交
152
  tfree(pRequest->body.resInfo.pRspMsg);
153

154
  pRequest->body.resInfo.pRspMsg = pMsg->pData;
155
  SReqResultInfo* pResInfo = &pRequest->body.resInfo;
156

H
Haojun Liao 已提交
157 158 159 160 161 162 163
  if (pResInfo->fields == NULL) {
    TAOS_FIELD* pFields = calloc(pMetaMsg->numOfColumns, sizeof(TAOS_FIELD));
    for (int32_t i = 0; i < pMetaMsg->numOfColumns; ++i) {
      tstrncpy(pFields[i].name, pSchema[i].name, tListLen(pFields[i].name));
      pFields[i].type = pSchema[i].type;
      pFields[i].bytes = pSchema[i].bytes;
    }
H
Haojun Liao 已提交
164

H
Haojun Liao 已提交
165 166 167 168
    pResInfo->fields = pFields;
  }

  pResInfo->numOfCols = pMetaMsg->numOfColumns;
169 170 171 172 173 174 175 176 177 178 179
  pRequest->body.showInfo.execId = pShow->showId;

  // 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;
  }

180
  tsem_post(&pRequest->body.rspSem);
H
Haojun Liao 已提交
181 182 183
  return 0;
}

184
int32_t processRetrieveMnodeRsp(void* param, const SDataBuf* pMsg, int32_t code) {
H
Haojun Liao 已提交
185 186
  SRequestObj    *pRequest = param;
  SReqResultInfo *pResInfo = &pRequest->body.resInfo;
H
Haojun Liao 已提交
187
  tfree(pResInfo->pRspMsg);
H
Haojun Liao 已提交
188

H
Haojun Liao 已提交
189
  if (code != TSDB_CODE_SUCCESS) {
H
Haojun Liao 已提交
190
    setErrno(pRequest, code);
H
Haojun Liao 已提交
191 192 193 194
    tsem_post(&pRequest->body.rspSem);
    return code;
  }

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

197
  SRetrieveTableRsp *pRetrieve = (SRetrieveTableRsp *) pMsg->pData;
H
Haojun Liao 已提交
198 199 200
  pRetrieve->numOfRows  = htonl(pRetrieve->numOfRows);
  pRetrieve->precision  = htons(pRetrieve->precision);

201
  pResInfo->pRspMsg   = pMsg->pData;
H
Haojun Liao 已提交
202
  pResInfo->numOfRows = pRetrieve->numOfRows;
H
Haojun Liao 已提交
203
  pResInfo->pData     = pRetrieve->data;
D
dapan1121 已提交
204
  pResInfo->completed = pRetrieve->completed;
H
Haojun Liao 已提交
205 206 207 208 209

  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,
210
           pRetrieve->completed, pRequest->body.showInfo.execId);
211 212

  tsem_post(&pRequest->body.rspSem);
H
Haojun Liao 已提交
213 214 215
  return 0;
}

H
Haojun Liao 已提交
216 217
int32_t processRetrieveVndRsp(void* param, const SDataBuf* pMsg, int32_t code) {
  SRequestObj* pRequest = param;
218 219 220

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

  if (code != TSDB_CODE_SUCCESS) {
H
Haojun Liao 已提交
223
    setErrno(pRequest, code);
H
Haojun Liao 已提交
224 225 226 227
    tsem_post(&pRequest->body.rspSem);
    return code;
  }

228 229 230
  assert(pMsg->len >= sizeof(SRetrieveTableRsp));

  pResInfo->pRspMsg    = pMsg->pData;
H
Haojun Liao 已提交
231 232 233 234 235 236 237 238 239 240 241 242 243

  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,
244
           pFetchRsp->completed, pRequest->body.showInfo.execId);
H
Haojun Liao 已提交
245 246 247 248 249

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

250
int32_t processCreateDbRsp(void* param, const SDataBuf* pMsg, int32_t code) {
H
Haojun Liao 已提交
251
  // todo rsp with the vnode id list
252
  SRequestObj* pRequest = param;
H
Haojun Liao 已提交
253
  free(pMsg->pData);
254
  tsem_post(&pRequest->body.rspSem);
H
Haojun Liao 已提交
255
}
H
Haojun Liao 已提交
256

257
int32_t processUseDbRsp(void* param, const SDataBuf* pMsg, int32_t code) {
H
Haojun Liao 已提交
258 259 260
  SRequestObj* pRequest = param;

  if (code != TSDB_CODE_SUCCESS) {
H
Haojun Liao 已提交
261
    free(pMsg->pData);
H
Haojun Liao 已提交
262 263 264 265 266
    setErrno(pRequest, code);
    tsem_post(&pRequest->body.rspSem);
    return code;
  }

267
  SUseDbRsp* pUseDbRsp = (SUseDbRsp*) pMsg->pData;
268 269 270 271 272
  SName name = {0};
  tNameFromString(&name, pUseDbRsp->db, T_NAME_ACCT|T_NAME_DB);

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

274
  setConnectionDB(pRequest->pTscObj, db);
H
Haojun Liao 已提交
275
  free(pMsg->pData);
276 277
  tsem_post(&pRequest->body.rspSem);
  return 0;
278 279
}

280
int32_t processCreateTableRsp(void* param, const SDataBuf* pMsg, int32_t code) {
H
Haojun Liao 已提交
281
  assert(pMsg != NULL && param != NULL);
282
  SRequestObj* pRequest = param;
H
Haojun Liao 已提交
283

284
  free(pMsg->pData);
H
Haojun Liao 已提交
285 286 287 288 289 290
  if (code != TSDB_CODE_SUCCESS) {
    setErrno(pRequest, code);
    tsem_post(&pRequest->body.rspSem);
    return code;
  }

291
  tsem_post(&pRequest->body.rspSem);
H
Haojun Liao 已提交
292
  return code;
293 294
}

295 296
int32_t processDropDbRsp(void* param, const SDataBuf* pMsg, int32_t code) {
  SRequestObj* pRequest = param;
H
Haojun Liao 已提交
297 298 299 300 301 302
  if (code != TSDB_CODE_SUCCESS) {
    setErrno(pRequest, code);
    tsem_post(&pRequest->body.rspSem);
    return code;
  }

D
dapan1121 已提交
303
  SDropDbRsp *rsp = (SDropDbRsp *)pMsg->pData;
D
dapan1121 已提交
304 305

  struct SCatalog *pCatalog = NULL;
D
dapan1121 已提交
306
  rsp->uid = be64toh(rsp->uid);
D
dapan1121 已提交
307 308 309

  catalogGetHandle(pRequest->pTscObj->pAppInfo->clusterId, &pCatalog);
  
D
dapan1121 已提交
310
  catalogRemoveDB(pCatalog, rsp->db, rsp->uid);
D
dapan1121 已提交
311

312
  tsem_post(&pRequest->body.rspSem);
H
Haojun Liao 已提交
313
  return code;
314 315
}

H
Haojun Liao 已提交
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340
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 已提交
341
  tscBuildMsg[TSDB_SQL_UPDATE_TAG_VAL] = tscBuildUpdateTagMsg;
H
Haojun Liao 已提交
342 343 344 345 346 347 348 349 350 351
  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 已提交
352
  tscBuildMsg[TSDB_SQL_RETRIEVE_MNODE] = tscBuildRetrieveFromMgmtMsg;
H
Haojun Liao 已提交
353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369
  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 已提交
370
  tscProcessMsgRsp[TSDB_SQL_RETRIEVE_MNODE] = tscProcessRetrieveRspFromNode;  // rsp handled by same function.
H
Haojun Liao 已提交
371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391
  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 已提交
392 393 394 395 396 397 398
  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 已提交
399 400 401

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