fix proxy parser core caused by access null ptr
This commit is contained in:
@ -151,8 +151,10 @@ int parse_sql_stmt(ParseResult *parse_result)
|
|||||||
void setup_token_pos_info(ParseNode *node, int off, int len)
|
void setup_token_pos_info(ParseNode *node, int off, int len)
|
||||||
{
|
{
|
||||||
#ifdef SQL_PARSER_COMPILATION
|
#ifdef SQL_PARSER_COMPILATION
|
||||||
node->token_off_ = off;
|
if (node != NULL) {
|
||||||
node->token_len_ = len;
|
node->token_off_ = off;
|
||||||
|
node->token_len_ = len;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
// do nothing
|
// do nothing
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user