db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Pendleton (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-961) Error 22001 can include 'XX-RESOLVE-XX' which should be removed
Date Fri, 18 Jul 2008 20:26:33 GMT

     [ https://issues.apache.org/jira/browse/DERBY-961?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Bryan Pendleton updated DERBY-961:

    Attachment: tweakMsg.diff

I took a look at the message in question, and it appears
that the intent of the XX-RESOLVE-XX message parameter
is to hold the actual value which could not be shrunk to fit
in the column.

I imagine that the reason for the XX-RESOLVE-XX is
because for a SQLBinary data type, the actual value may
not be human-readable, and so cannot be displayed.

So I created the attached experimental diff (tweakMsg.diff),
which changes the XX-RESOLVE-XX parameter to the
message to "(Binary data value not displayed)", which
I hope would give a better hint to the person who received
this error message about what was going on.

I ran the entire regression suite with the modified test, and got
no failures, and I also grepped the source tree for XX-RESOLVE-XX
and got no hits.

However, I'm not totally sure how to make this problem occur,
in order to verify that the new message in fact looks better
than the old one.

In order to make this a complete fix worthy of submitting, I
think I'll need to find a test case which provokes this error,
and verify that the error message looks better.

But in the meantime, if anybody has any comments on this
approach, I'd be most grateful.

> 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:
>            Reporter: Myrna van Lunteren
>            Priority: Minor
>         Attachments: 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.

View raw message