[ 
https://issues.apache.org/jira/browse/DERBY-961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12617336#action_12617336
 ] 

Knut Anders Hatlen commented on DERBY-961:
------------------------------------------

Thanks Bryan. The patch looks fine to me. Since the message is only used as 
part of another message and is not a full error message in itself, it would 
perhaps be better to give it an identifier that doesn't look like an SQL state 
and move the constant from SQLState.java to MessageId.java. Then the message 
should also be moved to another section of messages.xml. Look for the section 
with this heading in messages.xml:

<!-- 
This section contains all of the internationalized messages which are
undocumented. This includes messages with handles which are
pseudo-SQLStates, documented in SQLState.java. This also includes
messages with non-SQLState handles which are documented in
MessageId.java.
-->

    <section>
        <desc>Undocumented messages with pseudo-SQLStates or no SQLStates</desc>

> Error 22001 can include 'XX-RESOLVE-XX' which should be removed
> ---------------------------------------------------------------
>
>                 Key: DERBY-961
>                 URL: https://issues.apache.org/jira/browse/DERBY-961
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.2.1.6
>            Reporter: Myrna van Lunteren
>            Assignee: Bryan Pendleton
>            Priority: Minor
>             Fix For: 10.5.0.0
>
>         Attachments: i18nHiddenString.txt, msgChangeWithTest.diff, 
> tweakMsg.diff
>
>
> In some cases, error 22001 can come up as follows: 
> A truncation error was encountered trying to shrink CHAR () FOR BIT DATA 
> 'XX-RESOLVE-XX' to length 40.
> This message makes it appear as if there is a column called XX-RESOLVE-XX, 
> however, this string is coming out of SQLBinary.java.
> It should be removed from the message.
> Other references for this string are in the masters for 
> updatableResultSet.out, and in the test lang/concateTests.java (referring to 
> DERBY-124).
> So, running updatableResultSet will generate the message.
>  
> The stack trace I saw:
>  at 
> org.apache.derby.iapi.error.StandardException.newException(StandardException.java:362)
>  at 
> org.apache.derby.iapi.types.SQLBinary.checkHostVariable(SQLBinary.java:977)
>  at org.apache.derby.exe.ac05550069x0109x5d95xbdfcxffff9c80fb80163.e0 
> (Unknown Source)
>  at 
> org.apache.derby.impl.services.reflect.DirectCall.invoke(ReflectGeneratedClass.java:138)
>  at 
> org.apache.derby.impl.sql.execute.RowResultSet.getNextRowCore(RowResultSet.java:155)
>  at org.apache.derby.impl.sql.execute.NormalizeResultSet.getNextRowCore 
> (NormalizeResultSet.java:204)
>  at 
> org.apache.derby.impl.sql.execute.DMLWriteResultSet.getNextRowCore(DMLWriteResultSet.java:123)
>  at 
> org.apache.derby.impl.sql.execute.InsertResultSet.open(InsertResultSet.java:521)
>  at 
> org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:359)
>  at 
> org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1142)
>  at 
> org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(EmbedPreparedStatement.java:1421)
>  at 
> org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(EmbedPreparedStatement.java:263)
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to