Skip to content

Commit

Permalink
[CBRD-24939] dblink query could return zero column count in column in…
Browse files Browse the repository at this point in the history
  • Loading branch information
beyondykk9 authored Aug 21, 2023
1 parent 3b952af commit e33e202
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions src/parser/name_resolution.c
Original file line number Diff line number Diff line change
Expand Up @@ -5245,22 +5245,6 @@ pt_dblink_table_get_column_defs (PARSER_CONTEXT * parser, PT_NODE * dblink, S_RE
err = NO_ERROR;

set_parser_error:
if (req >= 0)
{
if ((err = cci_close_req_handle (req)) < 0)
{
cci_get_err_msg (err, cci_error.err_msg, sizeof (cci_error.err_msg));
}
}

if (err >= 0 && conn >= 0)
{
if ((err = cci_disconnect (conn, &cci_error)) < 0)
{
cci_get_err_msg (err, cci_error.err_msg, sizeof (cci_error.err_msg));
}
}

if (err < 0)
{
if (cci_error.err_msg[0] == '\0')
Expand All @@ -5282,6 +5266,16 @@ pt_dblink_table_get_column_defs (PARSER_CONTEXT * parser, PT_NODE * dblink, S_RE
}
}

if (req >= 0)
{
cci_close_req_handle (req);
}

if (conn >= 0)
{
cci_disconnect (conn, &cci_error);
}

return err;
}

Expand Down

0 comments on commit e33e202

Please sign in to comment.