Merge pull request #1779 from taosdata/hotfix/uninitialized

initialize SCqCfg structure
This commit is contained in:
slguan 2020-05-03 10:05:59 +08:00 committed by GitHub
commit 72552aa016
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -312,8 +312,6 @@ typedef struct SSqlObj {
void (*fp)();
void (*fetchFp)();
void * param;
uint32_t ip;
short vnode;
int64_t stime;
uint32_t queryId;
void * pStream;

View File

@ -32,6 +32,8 @@ int taosGetFqdn(char *fqdn) {
uError("failed to get host name");
return -1;
}
free(h);
}
uint32_t taosGetIpFromFqdn(const char *fqdn) {

View File

@ -194,9 +194,10 @@ int32_t vnodeOpen(int32_t vnode, char *rootDir) {
pVnode->wqueue = dnodeAllocateWqueue(pVnode);
pVnode->rqueue = dnodeAllocateRqueue(pVnode);
SCqCfg cqCfg;
SCqCfg cqCfg = {0};
sprintf(cqCfg.user, "root");
strcpy(cqCfg.pass, tsInternalPass);
cqCfg.vgId = vnode;
cqCfg.cqWrite = vnodeWriteToQueue;
pVnode->cq = cqOpen(pVnode, &cqCfg);