[ http://issues.apache.org/jira/browse/DERBY-1610?page=all ]

Tomohito Nakayama updated DERBY-1610:
-------------------------------------

    Attachment: TestNullChar.java

Result of the execution is as next :

In the case of Network Client/Server :
[EMAIL PROTECTED]:~/derby/test/20060730$ java TestNullChar
streamAsNull:
null
setNull:
null

In the case of Engine :
[EMAIL PROTECTED]:~/derby/test/20060730$ java TestNullChar embedded
streamAsNull:
java.sql.SQLException: An attempt was made to get a data value of type 'CHAR' 
from a data value of type 'java.io.InputStream'.
        at 
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:44)
        at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:88)
        at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:94)
        at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:180)
        at 
org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(EmbedConnection.java:1958)
        at 
org.apache.derby.impl.jdbc.ConnectionChild.newSQLException(ConnectionChild.java:153)
        at 
org.apache.derby.impl.jdbc.EmbedPreparedStatement.dataTypeConversion(EmbedPreparedStatement.java:1611)
        at 
org.apache.derby.impl.jdbc.EmbedPreparedStatement.checkBinaryStreamConditions(EmbedPreparedStatement.java:923)
        at 
org.apache.derby.impl.jdbc.EmbedPreparedStatement.setBinaryStream(EmbedPreparedStatement.java:839)
        at 
org.apache.derby.impl.jdbc.EmbedPreparedStatement.setBinaryStream(EmbedPreparedStatement.java:853)
        at TestNullChar.updateStreamAsNull(TestNullChar.java:118)
        at TestNullChar.main(TestNullChar.java:46)
java.sql.SQLException: Invalid cursor state - no current row.
        at 
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:44)
        at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:88)
        at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:104)
        at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:168)
        at 
org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(EmbedConnection.java:1952)
        at 
org.apache.derby.impl.jdbc.ConnectionChild.newSQLException(ConnectionChild.java:147)
        at 
org.apache.derby.impl.jdbc.EmbedResultSet.checkOnRow(EmbedResultSet.java:325)
        at 
org.apache.derby.impl.jdbc.EmbedResultSet.getColumn(EmbedResultSet.java:4378)
        at 
org.apache.derby.impl.jdbc.EmbedResultSet.getString(EmbedResultSet.java:680)
        at TestNullChar.updateStreamAsNull(TestNullChar.java:139)
        at TestNullChar.main(TestNullChar.java:46)
setNull:
null

> Engine take it as type compatibility error to update column typed as CHAR to 
> value passed via setBinaryStream(null), though Network Client and Network 
> Server does not take it as error.
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1610
>                 URL: http://issues.apache.org/jira/browse/DERBY-1610
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server, Network Client
>            Reporter: Tomohito Nakayama
>         Assigned To: Tomohito Nakayama
>         Attachments: TestNullChar.java
>
>
> There exists difference between Engine and Network Client/Engine around type 
> compatibility judgement in character typed column when null value was passed 
> as InputStream.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to