修复兼容b库中,创建自定义函数时core的问题

This commit is contained in:
yuchao
2024-02-08 11:02:55 +08:00
committed by totaj
parent fad409334e
commit b600fe4f82

View File

@ -377,6 +377,8 @@ static int internal_yylex(TokenAuxData* auxdata)
int token;
const char* yytext = NULL;
errno_t rc = memset_s(auxdata, sizeof(TokenAuxData), 0, sizeof(TokenAuxData));
securec_check(rc, "\0", "\0");
Assert(u_sess->plsql_cxt.curr_compile_context);
PLpgSQL_compile_context* curr_compile = u_sess->plsql_cxt.curr_compile_context;
if (curr_compile->num_pushbacks > 0) {
@ -1045,7 +1047,7 @@ static int plpgsql_parse_declare(int* loc)
int tok3 = -1;
tok2 = internal_yylex(&aux2);
tok3 = internal_yylex(&aux3);
if (tok3 != IDENT) {
if (tok3 != IDENT || aux3.lval.str == NULL) {
push_back_token(tok3, &aux3);
push_back_token(tok2, &aux2);
push_back_token(tok1, &aux1);