fix: fix stmt memory leak
This commit is contained in:
parent
fdd9f3c406
commit
d266bfe187
|
@ -33,7 +33,7 @@ typedef struct {
|
||||||
SDiskSize size;
|
SDiskSize size;
|
||||||
} SDiskSpace;
|
} SDiskSpace;
|
||||||
|
|
||||||
bool taosCheckSystemIsSmallEnd();
|
bool taosCheckSystemIsLittleEnd();
|
||||||
void taosGetSystemInfo();
|
void taosGetSystemInfo();
|
||||||
int32_t taosGetEmail(char *email, int32_t maxLen);
|
int32_t taosGetEmail(char *email, int32_t maxLen);
|
||||||
int32_t taosGetOsReleaseName(char *releaseName, int32_t maxLen);
|
int32_t taosGetOsReleaseName(char *releaseName, int32_t maxLen);
|
||||||
|
|
|
@ -158,8 +158,8 @@ static void taosCleanupArgs() {
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char const *argv[]) {
|
int main(int argc, char const *argv[]) {
|
||||||
if (!taosCheckSystemIsSmallEnd()) {
|
if (!taosCheckSystemIsLittleEnd()) {
|
||||||
printf("failed to start since on non-small-end machines\n");
|
printf("failed to start since on non-little-end machines\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -913,8 +913,8 @@ void udfdConnectMnodeThreadFunc(void *args) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
if (!taosCheckSystemIsSmallEnd()) {
|
if (!taosCheckSystemIsLittleEnd()) {
|
||||||
printf("failed to start since on non-small-end machines\n");
|
printf("failed to start since on non-little-end machines\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -210,7 +210,7 @@ static int32_t taosGetProcCpuInfo(ProcCpuInfo *cpuInfo) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool taosCheckSystemIsSmallEnd() {
|
bool taosCheckSystemIsLittleEnd() {
|
||||||
union check {
|
union check {
|
||||||
int16_t i;
|
int16_t i;
|
||||||
char ch[2];
|
char ch[2];
|
||||||
|
|
|
@ -299,7 +299,7 @@ CaseCtrl gCaseCtrl = { // query case with specified col&oper
|
||||||
.printRes = true,
|
.printRes = true,
|
||||||
.runTimes = 0,
|
.runTimes = 0,
|
||||||
.caseRunIdx = -1,
|
.caseRunIdx = -1,
|
||||||
.caseIdx = 23,
|
.caseIdx = 5,
|
||||||
.caseNum = 1,
|
.caseNum = 1,
|
||||||
.caseRunNum = 1,
|
.caseRunNum = 1,
|
||||||
};
|
};
|
||||||
|
@ -1408,7 +1408,7 @@ void bpCheckColFields(TAOS_STMT *stmt, TAOS_MULTI_BIND* pBind) {
|
||||||
void bpShowBindParam(TAOS_MULTI_BIND *bind, int32_t num) {
|
void bpShowBindParam(TAOS_MULTI_BIND *bind, int32_t num) {
|
||||||
for (int32_t i = 0; i < num; ++i) {
|
for (int32_t i = 0; i < num; ++i) {
|
||||||
TAOS_MULTI_BIND* b = &bind[i];
|
TAOS_MULTI_BIND* b = &bind[i];
|
||||||
printf("Bind %d: type[%d],buf[%p],buflen[%d],len[%],null[%d],num[%d]\n",
|
printf("Bind %d: type[%d],buf[%p],buflen[%d],len[%d],null[%d],num[%d]\n",
|
||||||
i, b->buffer_type, b->buffer, b->buffer_length, b->length ? *b->length : 0, b->is_null ? *b->is_null : 0, b->num);
|
i, b->buffer_type, b->buffer, b->buffer_length, b->length ? *b->length : 0, b->is_null ? *b->is_null : 0, b->num);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2599,7 +2599,6 @@ void runAll(TAOS *taos) {
|
||||||
runCaseList(taos);
|
runCaseList(taos);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|
||||||
strcpy(gCaseCtrl.caseCatalog, "Micro DB precision Test");
|
strcpy(gCaseCtrl.caseCatalog, "Micro DB precision Test");
|
||||||
printf("%s Begin\n", gCaseCtrl.caseCatalog);
|
printf("%s Begin\n", gCaseCtrl.caseCatalog);
|
||||||
gCaseCtrl.precision = TIME_PRECISION_MICRO;
|
gCaseCtrl.precision = TIME_PRECISION_MICRO;
|
||||||
|
@ -2655,13 +2654,15 @@ void runAll(TAOS *taos) {
|
||||||
gCaseCtrl.bindColNum = 6;
|
gCaseCtrl.bindColNum = 6;
|
||||||
runCaseList(taos);
|
runCaseList(taos);
|
||||||
gCaseCtrl.bindColNum = 0;
|
gCaseCtrl.bindColNum = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
strcpy(gCaseCtrl.caseCatalog, "Bind Col Type Test");
|
strcpy(gCaseCtrl.caseCatalog, "Bind Col Type Test");
|
||||||
printf("%s Begin\n", gCaseCtrl.caseCatalog);
|
printf("%s Begin\n", gCaseCtrl.caseCatalog);
|
||||||
gCaseCtrl.bindColTypeNum = tListLen(bindColTypeList);
|
gCaseCtrl.bindColTypeNum = tListLen(bindColTypeList);
|
||||||
gCaseCtrl.bindColTypeList = bindColTypeList;
|
gCaseCtrl.bindColTypeList = bindColTypeList;
|
||||||
runCaseList(taos);
|
runCaseList(taos);
|
||||||
#endif
|
*/
|
||||||
|
|
||||||
printf("All Test End\n");
|
printf("All Test End\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue