[jira] [Commented] (TRAFODION-1745) show more related info when TRANSLATE run into SQL Error
[ https://issues.apache.org/jira/browse/TRAFODION-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15341983#comment-15341983 ] ASF GitHub Bot commented on TRAFODION-1745: --- Github user asfgit closed the pull request at: https://github.com/apache/incubator-trafodion/pull/547 > 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)
[jira] [Commented] (TRAFODION-1745) show more related info when TRANSLATE run into SQL Error
[ https://issues.apache.org/jira/browse/TRAFODION-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)
[jira] [Commented] (TRAFODION-1745) show more related info when TRANSLATE run into SQL Error
[ https://issues.apache.org/jira/browse/TRAFODION-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15339878#comment-15339878 ] 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_r67723426 --- 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); --- End diff -- The memset is unneeded since stringToHex also does a memset, but it doesn't hurt any. > 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)
[jira] [Commented] (TRAFODION-1745) show more related info when TRANSLATE run into SQL Error
[ https://issues.apache.org/jira/browse/TRAFODION-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15332936#comment-15332936 ] ASF GitHub Bot commented on TRAFODION-1745: --- GitHub user traflm opened a pull request: https://github.com/apache/incubator-trafodion/pull/547 [TRAFODION-1745] show more related info when TRANSLATE run into SQL E… …rror Show what is the translation: from which charset to what charset, and showing the offending data in HEX mode. This will help troubleshooting. You can merge this pull request into a Git repository by running: $ git pull https://github.com/traflm/incubator-trafodion TRAFODION-2046-1 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/547.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #547 commit 4934fdec0bc98aa037db5793366ab8600e544f58 Author: Liu MingDate: 2016-06-16T02:17:18Z [TRAFODION-1745] show more related info when TRANSLATE run into SQL Error > 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)