Skip to content

Commit

Permalink
[CBRD-24587] Core dumped in do_alter_server (#4167)
Browse files Browse the repository at this point in the history
http://jira.cubrid.org/browse/CBRD-24587

* fix core dumped in do_alter_server after  [CBRD-24573]
  • Loading branch information
ctshim authored Mar 9, 2023
1 parent d352c15 commit aeea57a
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions src/query/execute_statement.c
Original file line number Diff line number Diff line change
Expand Up @@ -20435,8 +20435,15 @@ do_alter_server (PARSER_CONTEXT * parser, PT_NODE * statement)

if (alter->xbits.bit_dbname)
{
assert (alter->dbname->node_type == PT_NAME);
pt = (char *) alter->dbname->info.name.original;
assert (alter->dbname->node_type == PT_NAME || alter->dbname->node_type == PT_VALUE);
if (alter->dbname->node_type == PT_VALUE)
{
pt = (char *) PT_VALUE_GET_BYTES (alter->dbname);
}
else
{
pt = (char *) alter->dbname->info.name.original;
}

assert (pt && *pt);
db_make_string (&value, pt);
Expand All @@ -20450,8 +20457,15 @@ do_alter_server (PARSER_CONTEXT * parser, PT_NODE * statement)

if (alter->xbits.bit_user)
{
assert (alter->user->node_type == PT_NAME);
pt = (char *) alter->user->info.name.original;
assert (alter->user->node_type == PT_NAME || alter->user->node_type == PT_VALUE);
if (alter->user->node_type == PT_VALUE)
{
pt = (char *) PT_VALUE_GET_BYTES (alter->user);
}
else
{
pt = (char *) alter->user->info.name.original;
}

assert (pt && *pt);
db_make_string (&value, pt);
Expand Down

0 comments on commit aeea57a

Please sign in to comment.