[
https://issues.apache.org/jira/browse/TRAFODION-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15339881#comment-15339881
]
ASF GitHub Bot commented on TRAFODION-1745:
-------------------------------------------
Github user DaveBirdsall commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/547#discussion_r67723546
--- Diff: core/sql/exp/exp_conv.cpp ---
@@ -4280,6 +4341,9 @@ unicodeToSByteTarget(
if ( allowInvalidCodePoint == FALSE )
{
ExRaiseSqlError(heap, diagsArea,
EXE_INVALID_CHAR_IN_TRANSLATE_FUNC);
+ char hexstr[256];
+ memset(hexstr,0,256);
+ *(*diagsArea) << DgString0("UNICODE") << DgString1("ISO88591")
<< DgString2(stringToHex(hexstr,256,source,sourceLen));
--- End diff --
It's a bit more robust to say, sizeof(hexstr) rather than hard-coding 256.
> show more related info when TRANSLATE run into SQL Error
> --------------------------------------------------------
>
> Key: TRAFODION-1745
> URL: https://issues.apache.org/jira/browse/TRAFODION-1745
> Project: Apache Trafodion
> Issue Type: Improvement
> Reporter: liu ming
> Assignee: liu ming
>
> The current error message for a TRANSLATE error can be :
> 8690 "An invalid character value encountered in TRANSLATE function."
> Need to show more helping info for easier debug, and user friendly.
> to include a short section of offending source data (may be in hex form),
> source charset, and target charset.
> Checking other SQL errors related if possible.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)