Skip to content

Commit

Permalink
[CBRD-24428] dblink: correct error message for repeated query executi…
Browse files Browse the repository at this point in the history
  • Loading branch information
beyondykk9 authored Jul 19, 2022
1 parent e77de6d commit 0f338b9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/query/dblink_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,7 @@ dblink_scan_next (DBLINK_SCAN_INFO * scan_info, val_list_node * val_list)
else
{
TP_DOMAIN dom;
TP_DOMAIN_STATUS status;

tp_domain_init (&dom, (DB_TYPE) db_value_domain_type (valptrp->val));

Expand All @@ -851,8 +852,10 @@ dblink_scan_next (DBLINK_SCAN_INFO * scan_info, val_list_node * val_list)
dom.codeset = db_get_string_codeset (valptrp->val);
dom.scale = db_value_scale (valptrp->val);

if (db_value_coerce (&cci_value, valptrp->val, &dom) != DOMAIN_COMPATIBLE)
if ((status =
tp_value_cast_preserve_domain (&cci_value, valptrp->val, &dom, false, true)) != DOMAIN_COMPATIBLE)
{
(void) tp_domain_status_er_set (status, ARG_FILE_LINE, &cci_value, &dom);
goto close_exit;
}
}
Expand Down

0 comments on commit 0f338b9

Please sign in to comment.