Do not report ERROR when sample rate equals 100

This commit is contained in:
ZenoWang
2024-02-06 14:49:31 +00:00
committed by ob-robot
parent 1f1d5c08ae
commit c8ef409bf3
3710 changed files with 486984 additions and 3083329 deletions

View File

@ -62,7 +62,7 @@ int parse_init(ParseResult *p)
static __thread char error_msg[MAX_ERROR_MSG] = {'\0'};
p->error_msg_ = error_msg;
if (OB_UNLIKELY(NULL == p || NULL == p->malloc_pool_)) {
ret = OB_PARSER_ERR_UNEXPECTED;
ret = -1;
if (NULL != p) {
(void)snprintf(p->error_msg_, MAX_ERROR_MSG, "malloc_pool_ must be set");
}
@ -108,15 +108,6 @@ int parse_init(ParseResult *p)
#ifdef OB_BUILD_ORACLE_PARSER
}
#endif
#define ENOMEM 12 /* Out of memory */
//refine parser error code to OB error code
if (0 == ret) {
ret = OB_PARSER_SUCCESS;
} else if (ENOMEM == ret) {
ret = OB_PARSER_ERR_NO_MEMORY;
} else {
ret = OB_PARSER_ERR_PARSE_SQL;
}
}
return ret;
}