[
https://issues.apache.org/jira/browse/TRAFODION-2205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16435847#comment-16435847
]
ASF GitHub Bot commented on TRAFODION-2205:
-------------------------------------------
GitHub user robertamarton opened a pull request:
https://github.com/apache/trafodion/pull/1516
[TRAFODION-2205] invalid char at create schema when authorization nam…
…e is long
There is code that converts the user ID to its username. The buffer size
requested was not big enough to hold the return value. In addition, the
buffer
size check was returning an error but did not add an error to the ComDiags
area;
therefore the returned error was ignored.
- Changed max len in calls to getAuthNameFromAuthID to the correct size.
- Set up the Diags area when buffer size is too small so the error is
reported
correctly.
Also removed redundant methods:
- getDBUserNameFromID - calls getAuthNameFromID instead
- getDBUserIDFromName - calls GetAuthIDFromName instead
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/robertamarton/incubator-trafodion stuff
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/trafodion/pull/1516.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 #1516
----
commit affe1f60ff02610d40a9d58702b12d9c9473de34
Author: Roberta Marton <roberta.marton@...>
Date: 2018-04-12T16:07:02Z
[TRAFODION-2205] invalid char at create schema when authorization name is
long
There is code that converts the user ID to its username. The buffer size
requested was not big enough to hold the return value. In addition, the
buffer
size check was returning an error but did not add an error to the ComDiags
area;
therefore the returned error was ignored.
- Changed max len in calls to getAuthNameFromAuthID to the correct size.
- Set up the Diags area when buffer size is too small so the error is
reported
correctly, returns error 20235:
"Error returned while converting auth ID to auth name, status: xx ID: xx."
Also removed redundant methods:
- getDBUserNameFromID - calls getAuthNameFromID instead
- getDBUserIDFromName - calls GetAuthIDFromName instead
----
> invalid character error at create schema when authorization is long user
> ------------------------------------------------------------------------
>
> Key: TRAFODION-2205
> URL: https://issues.apache.org/jira/browse/TRAFODION-2205
> Project: Apache Trafodion
> Issue Type: Bug
> Components: sql-cmu
> Environment: Centos6.7
> R2.2 0825daily
> Reporter: Gao, Rui-Xian
> Assignee: Roberta Marton
> Priority: Major
>
> invalid character error at create schema when authorization is long user.
> The error can only be reproduced from trafci, there is no problem in sqlci.
> SQL>create schema myschema4 authorization
> qauser_1012345678201234567830123456784012345678501234567860123456787012345678801234567890123456781001234567110123456712012345128;
>
> *** ERROR[2109] Invalid Character error converting SQL statement from
> character set UTF8 to character set UCS2 (character position 137, byte offset
> 137). [2016-09-01 08:09:10]
> *** ERROR[1323] Unable to grant privileges while creating SB_HISTOGRAMS.
> [2016-09-01 08:09:10]
> *** ERROR[1029] Object TRAFODION.MYSCHEMA4.SB_HISTOGRAMS could not be
> created. [2016-09-01 08:09:10]
> *** ERROR[1058] Unable to create histogram table SB_HISTOGRAMS. [2016-09-01
> 08:09:10]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)