[jira] Commented: (DERBY-1501) PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL Exception if given sqlType is LONGVARBINARY in embedded mode
[ https://issues.apache.org/jira/browse/DERBY-1501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12499359 ] Myrna van Lunteren commented on DERBY-1501: --- I don't see any particular check-in for this bug, the fix went in referring to DERBY-1610. So I'd like to remove the application impact check. See also my recent comment re DERBY-1610. > PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL > Exception if given sqlType is LONGVARBINARY in embedded mode > -- > > Key: DERBY-1501 > URL: https://issues.apache.org/jira/browse/DERBY-1501 > Project: Derby > Issue Type: Bug > Components: JDBC >Affects Versions: 10.1.1.0 > Environment: WindowsXP >Reporter: Markus Fuchs > Fix For: 10.3.0.0 > > Attachments: ByteArrayTest.java > > > When inserting a row into following table > BYTEARRAY_TEST( ID int, BYTEARRAY_VAL blob) > PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL > Exception if given sqlType is LONGVARBINARY. You must give sqlType BLOB to > make the insert work. The same test works using sqlType LONGVARBINARY in > network mode. The following combinations don't work: > Column type sqlType not working mandatory sqlType > BLOB LONGVARBINARY BLOB > CLOB LONGVARCHARCLOB > The issue here is that first Derby behaves differently in network and > embedded mode. And secondly, should accept LONGVARBINARY/LONGVARCHAR for > BLOB/CLOB columns. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-1501) PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL Exception if given sqlType is LONGVARBINARY in embedded mode
[ http://issues.apache.org/jira/browse/DERBY-1501?page=comments#action_12421304 ] Knut Anders Hatlen commented on DERBY-1501: --- Lance Andersen wrote on derby-dev: > i have removed the rogue sentence in its entirety from the javadocs for > setNull(int,int, String) as it is not needed and is not correct in regards to > typeCode. > PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL > Exception if given sqlType is LONGVARBINARY in embedded mode > -- > > Key: DERBY-1501 > URL: http://issues.apache.org/jira/browse/DERBY-1501 > Project: Derby > Issue Type: Bug > Components: JDBC >Affects Versions: 10.1.1.0 > Environment: WindowsXP >Reporter: Markus Fuchs > Attachments: ByteArrayTest.java > > > When inserting a row into following table > BYTEARRAY_TEST( ID int, BYTEARRAY_VAL blob) > PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL > Exception if given sqlType is LONGVARBINARY. You must give sqlType BLOB to > make the insert work. The same test works using sqlType LONGVARBINARY in > network mode. The following combinations don't work: > Column type sqlType not working mandatory sqlType > BLOB LONGVARBINARY BLOB > CLOB LONGVARCHARCLOB > The issue here is that first Derby behaves differently in network and > embedded mode. And secondly, should accept LONGVARBINARY/LONGVARCHAR for > BLOB/CLOB columns. -- 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
Re: [jira] Commented: (DERBY-1501) PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL Exception if given sqlType is LONGVARBINARY in embedded mode
i have removed the rogue sentence in its entirety from the javadocs for setNull(int,int, String) as it is not needed and is not correct in regards to typeCode. -lance Daniel John Debrunner (JIRA) wrote: [ http://issues.apache.org/jira/browse/DERBY-1501?page=comments#action_12420620 ] Daniel John Debrunner commented on DERBY-1501: -- Knut Anders indicates setNull(int,int,String) - If a JDBC driver does not need the type code or type name information, it may ignore it. setNull(int,int) You must specify the parameter's SQL type. Interesting, here the issue is about setNull(int,int) which doesn't have that comment about ignoring typeCode. Could the omission be intentional and the wording in setNull(int,int,String) meant to be clearer, so that one of typeCode or typeName could be ignored, but not both? With setNull(1, Types.LONGVARBINARY) it is saying send a NULL of LONGVARBINARY to the engine, the engine should then treat it the same as a cast of a LONGVARCHAR FOR BIT DATA to the target type. PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL Exception if given sqlType is LONGVARBINARY in embedded mode -- Key: DERBY-1501 URL: http://issues.apache.org/jira/browse/DERBY-1501 Project: Derby Type: Bug Versions: 10.1.1.0 Environment: WindowsXP Reporter: Markus Fuchs Attachments: ByteArrayTest.java When inserting a row into following table BYTEARRAY_TEST( ID int, BYTEARRAY_VAL blob) PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL Exception if given sqlType is LONGVARBINARY. You must give sqlType BLOB to make the insert work. The same test works using sqlType LONGVARBINARY in network mode. The following combinations don't work: Column type sqlType not working mandatory sqlType BLOB LONGVARBINARY BLOB CLOB LONGVARCHARCLOB The issue here is that first Derby behaves differently in network and embedded mode. And secondly, should accept LONGVARBINARY/LONGVARCHAR for BLOB/CLOB columns.
[jira] Commented: (DERBY-1501) PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL Exception if given sqlType is LONGVARBINARY in embedded mode
[ http://issues.apache.org/jira/browse/DERBY-1501?page=comments#action_12421173 ] Daniel John Debrunner commented on DERBY-1501: -- Yes, sorry I got confused. I'd assumed since I'd seen some other e-mails saying some method needed to be added because it was missing that this was a JDBC 4 issue. > PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL > Exception if given sqlType is LONGVARBINARY in embedded mode > -- > > Key: DERBY-1501 > URL: http://issues.apache.org/jira/browse/DERBY-1501 > Project: Derby > Issue Type: Bug > Components: JDBC >Affects Versions: 10.1.1.0 > Environment: WindowsXP >Reporter: Markus Fuchs > Attachments: ByteArrayTest.java > > > When inserting a row into following table > BYTEARRAY_TEST( ID int, BYTEARRAY_VAL blob) > PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL > Exception if given sqlType is LONGVARBINARY. You must give sqlType BLOB to > make the insert work. The same test works using sqlType LONGVARBINARY in > network mode. The following combinations don't work: > Column type sqlType not working mandatory sqlType > BLOB LONGVARBINARY BLOB > CLOB LONGVARCHARCLOB > The issue here is that first Derby behaves differently in network and > embedded mode. And secondly, should accept LONGVARBINARY/LONGVARCHAR for > BLOB/CLOB columns. -- 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
[jira] Commented: (DERBY-1501) PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL Exception if given sqlType is LONGVARBINARY in embedded mode
[ http://issues.apache.org/jira/browse/DERBY-1501?page=comments#action_12421166 ] Knut Anders Hatlen commented on DERBY-1501: --- Dan wrote: > So let's check this out before we change the existing > behaviour. Remember the javadoc that Knut Anders quoted from is from > some *draft* of the JDBC 4 spec. The javadoc was quoted from the draft that is called "JDBC 3.0 Specification (Final Release)". ;) But I agree. Let's wait until it is clarified what the expected behaviour is. > PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL > Exception if given sqlType is LONGVARBINARY in embedded mode > -- > > Key: DERBY-1501 > URL: http://issues.apache.org/jira/browse/DERBY-1501 > Project: Derby > Issue Type: Bug > Components: JDBC >Affects Versions: 10.1.1.0 > Environment: WindowsXP >Reporter: Markus Fuchs > Attachments: ByteArrayTest.java > > > When inserting a row into following table > BYTEARRAY_TEST( ID int, BYTEARRAY_VAL blob) > PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL > Exception if given sqlType is LONGVARBINARY. You must give sqlType BLOB to > make the insert work. The same test works using sqlType LONGVARBINARY in > network mode. The following combinations don't work: > Column type sqlType not working mandatory sqlType > BLOB LONGVARBINARY BLOB > CLOB LONGVARCHARCLOB > The issue here is that first Derby behaves differently in network and > embedded mode. And secondly, should accept LONGVARBINARY/LONGVARCHAR for > BLOB/CLOB columns. -- 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
[jira] Commented: (DERBY-1501) PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL Exception if given sqlType is LONGVARBINARY in embedded mode
[ http://issues.apache.org/jira/browse/DERBY-1501?page=comments#action_12421145 ] Daniel John Debrunner commented on DERBY-1501: -- Lance Andersen wrote on the derv-dev list: I am not sure why the wording was added to the overloaded setNull method which was added in JDBC 3. i probably would expect it to not ignore the specified sql type in order to make sure the action requested is valid. I would have to check the SQL standard and discuss this with the EG further but it is something else to try and clean up and added it to my ever growing to do list So let's check this out before we change the existing behaviour. Remember the javadoc that Knut Anders quoted from is from some *draft* of the JDBC 4 spec. > PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL > Exception if given sqlType is LONGVARBINARY in embedded mode > -- > > Key: DERBY-1501 > URL: http://issues.apache.org/jira/browse/DERBY-1501 > Project: Derby > Issue Type: Bug > Components: JDBC >Affects Versions: 10.1.1.0 > Environment: WindowsXP >Reporter: Markus Fuchs > Attachments: ByteArrayTest.java > > > When inserting a row into following table > BYTEARRAY_TEST( ID int, BYTEARRAY_VAL blob) > PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL > Exception if given sqlType is LONGVARBINARY. You must give sqlType BLOB to > make the insert work. The same test works using sqlType LONGVARBINARY in > network mode. The following combinations don't work: > Column type sqlType not working mandatory sqlType > BLOB LONGVARBINARY BLOB > CLOB LONGVARCHARCLOB > The issue here is that first Derby behaves differently in network and > embedded mode. And secondly, should accept LONGVARBINARY/LONGVARCHAR for > BLOB/CLOB columns. -- 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
Re: [jira] Commented: (DERBY-1501) PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL Exception if given sqlType is LONGVARBINARY in embedded mode
I am not sure why the wording was added to the overloaded setNull method which was added in JDBC 3. i probably would expect it to not ignore the specified sql type in order to make sure the action requested is valid. I would have to check the SQL standard and discuss this with the EG further but it is something else to try and clean up and added it to my ever growing to do list Daniel John Debrunner (JIRA) wrote: [ http://issues.apache.org/jira/browse/DERBY-1501?page=comments#action_12420620 ] Daniel John Debrunner commented on DERBY-1501: -- Knut Anders indicates setNull(int,int,String) - If a JDBC driver does not need the type code or type name information, it may ignore it. setNull(int,int) You must specify the parameter's SQL type. Interesting, here the issue is about setNull(int,int) which doesn't have that comment about ignoring typeCode. Could the omission be intentional and the wording in setNull(int,int,String) meant to be clearer, so that one of typeCode or typeName could be ignored, but not both? With setNull(1, Types.LONGVARBINARY) it is saying send a NULL of LONGVARBINARY to the engine, the engine should then treat it the same as a cast of a LONGVARCHAR FOR BIT DATA to the target type. PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL Exception if given sqlType is LONGVARBINARY in embedded mode -- Key: DERBY-1501 URL: http://issues.apache.org/jira/browse/DERBY-1501 Project: Derby Type: Bug Versions: 10.1.1.0 Environment: WindowsXP Reporter: Markus Fuchs Attachments: ByteArrayTest.java When inserting a row into following table BYTEARRAY_TEST( ID int, BYTEARRAY_VAL blob) PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL Exception if given sqlType is LONGVARBINARY. You must give sqlType BLOB to make the insert work. The same test works using sqlType LONGVARBINARY in network mode. The following combinations don't work: Column type sqlType not working mandatory sqlType BLOB LONGVARBINARY BLOB CLOB LONGVARCHARCLOB The issue here is that first Derby behaves differently in network and embedded mode. And secondly, should accept LONGVARBINARY/LONGVARCHAR for BLOB/CLOB columns.
[jira] Commented: (DERBY-1501) PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL Exception if given sqlType is LONGVARBINARY in embedded mode
[ http://issues.apache.org/jira/browse/DERBY-1501?page=comments#action_12420910 ] Markus Fuchs commented on DERBY-1501: - I would certainly appreciate, if the second issue would be handled as suggested by Knut : "Derby doesn't need the type code, so ignoring it would be OK." Thanks! > PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL > Exception if given sqlType is LONGVARBINARY in embedded mode > -- > > Key: DERBY-1501 > URL: http://issues.apache.org/jira/browse/DERBY-1501 > Project: Derby > Type: Bug > Components: JDBC > Versions: 10.1.1.0 > Environment: WindowsXP > Reporter: Markus Fuchs > Attachments: ByteArrayTest.java > > When inserting a row into following table > BYTEARRAY_TEST( ID int, BYTEARRAY_VAL blob) > PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL > Exception if given sqlType is LONGVARBINARY. You must give sqlType BLOB to > make the insert work. The same test works using sqlType LONGVARBINARY in > network mode. The following combinations don't work: > Column type sqlType not working mandatory sqlType > BLOB LONGVARBINARY BLOB > CLOB LONGVARCHARCLOB > The issue here is that first Derby behaves differently in network and > embedded mode. And secondly, should accept LONGVARBINARY/LONGVARCHAR for > BLOB/CLOB columns. -- 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
[jira] Commented: (DERBY-1501) PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL Exception if given sqlType is LONGVARBINARY in embedded mode
[ http://issues.apache.org/jira/browse/DERBY-1501?page=comments#action_12420620 ] Daniel John Debrunner commented on DERBY-1501: -- Knut Anders indicates setNull(int,int,String) - If a JDBC driver does not need the type code or type name information, it may ignore it. setNull(int,int) You must specify the parameter's SQL type. Interesting, here the issue is about setNull(int,int) which doesn't have that comment about ignoring typeCode. Could the omission be intentional and the wording in setNull(int,int,String) meant to be clearer, so that one of typeCode or typeName could be ignored, but not both? With setNull(1, Types.LONGVARBINARY) it is saying send a NULL of LONGVARBINARY to the engine, the engine should then treat it the same as a cast of a LONGVARCHAR FOR BIT DATA to the target type. > PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL > Exception if given sqlType is LONGVARBINARY in embedded mode > -- > > Key: DERBY-1501 > URL: http://issues.apache.org/jira/browse/DERBY-1501 > Project: Derby > Type: Bug > Versions: 10.1.1.0 > Environment: WindowsXP > Reporter: Markus Fuchs > Attachments: ByteArrayTest.java > > When inserting a row into following table > BYTEARRAY_TEST( ID int, BYTEARRAY_VAL blob) > PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL > Exception if given sqlType is LONGVARBINARY. You must give sqlType BLOB to > make the insert work. The same test works using sqlType LONGVARBINARY in > network mode. The following combinations don't work: > Column type sqlType not working mandatory sqlType > BLOB LONGVARBINARY BLOB > CLOB LONGVARCHARCLOB > The issue here is that first Derby behaves differently in network and > embedded mode. And secondly, should accept LONGVARBINARY/LONGVARCHAR for > BLOB/CLOB columns. -- 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
[jira] Commented: (DERBY-1501) PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL Exception if given sqlType is LONGVARBINARY in embedded mode
[ http://issues.apache.org/jira/browse/DERBY-1501?page=comments#action_12420549 ] Knut Anders Hatlen commented on DERBY-1501: --- Kristian wrote: > But what about the second issue? The embedded driver determines if > the type of the parameter is "compatible" with the specified SQL > type. Currently, BLOB is not seen to be compatible with BINARY, > VARBINARY or LONGVARBINARY. The same goes for CLOB and the character > types. I think the embedded driver might be doing the right thing. I > have no problem understanding the logic in DataTypeDescriptor when I > look at table B-5 in the JDBC 4 spec, but the table is for > setObject. Can anyone weigh in on this? I think table B-5 is the correct place to determine which types should be considered compatible in setNull(). Therefore, embedded does not violate the spec when it raises an exception. However, I also think the client behaviour is compliant. The javadoc for setNull(int,int) says nothing about this issue, but the javadoc for setNull(int,int,String) says: If a JDBC driver does not need the type code or type name information, it may ignore it. Derby doesn't need the type code, so ignoring it would be OK. > PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL > Exception if given sqlType is LONGVARBINARY in embedded mode > -- > > Key: DERBY-1501 > URL: http://issues.apache.org/jira/browse/DERBY-1501 > Project: Derby > Type: Bug > Versions: 10.1.1.0 > Environment: WindowsXP > Reporter: Markus Fuchs > Attachments: ByteArrayTest.java > > When inserting a row into following table > BYTEARRAY_TEST( ID int, BYTEARRAY_VAL blob) > PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL > Exception if given sqlType is LONGVARBINARY. You must give sqlType BLOB to > make the insert work. The same test works using sqlType LONGVARBINARY in > network mode. The following combinations don't work: > Column type sqlType not working mandatory sqlType > BLOB LONGVARBINARY BLOB > CLOB LONGVARCHARCLOB > The issue here is that first Derby behaves differently in network and > embedded mode. And secondly, should accept LONGVARBINARY/LONGVARCHAR for > BLOB/CLOB columns. -- 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
[jira] Commented: (DERBY-1501) PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL Exception if given sqlType is LONGVARBINARY in embedded mode
[ http://issues.apache.org/jira/browse/DERBY-1501?page=comments#action_12420542 ] Knut Anders Hatlen commented on DERBY-1501: --- The first issue (difference between embedded and client) is already logged as DERBY-1494. > PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL > Exception if given sqlType is LONGVARBINARY in embedded mode > -- > > Key: DERBY-1501 > URL: http://issues.apache.org/jira/browse/DERBY-1501 > Project: Derby > Type: Bug > Versions: 10.1.1.0 > Environment: WindowsXP > Reporter: Markus Fuchs > Attachments: ByteArrayTest.java > > When inserting a row into following table > BYTEARRAY_TEST( ID int, BYTEARRAY_VAL blob) > PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL > Exception if given sqlType is LONGVARBINARY. You must give sqlType BLOB to > make the insert work. The same test works using sqlType LONGVARBINARY in > network mode. The following combinations don't work: > Column type sqlType not working mandatory sqlType > BLOB LONGVARBINARY BLOB > CLOB LONGVARCHARCLOB > The issue here is that first Derby behaves differently in network and > embedded mode. And secondly, should accept LONGVARBINARY/LONGVARCHAR for > BLOB/CLOB columns. -- 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
[jira] Commented: (DERBY-1501) PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL Exception if given sqlType is LONGVARBINARY in embedded mode
[ http://issues.apache.org/jira/browse/DERBY-1501?page=comments#action_12420487 ] Daniel John Debrunner commented on DERBY-1501: -- Derby does support the JDBC type LONGVARBINARY, it corresponds to the SQL type LONGVARCHAR FOR BIT DATA See http://db.apache.org/derby/docs/dev/ref/rrefsqlj30118.html > PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL > Exception if given sqlType is LONGVARBINARY in embedded mode > -- > > Key: DERBY-1501 > URL: http://issues.apache.org/jira/browse/DERBY-1501 > Project: Derby > Type: Bug > Versions: 10.1.1.0 > Environment: WindowsXP > Reporter: Markus Fuchs > Attachments: ByteArrayTest.java > > When inserting a row into following table > BYTEARRAY_TEST( ID int, BYTEARRAY_VAL blob) > PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL > Exception if given sqlType is LONGVARBINARY. You must give sqlType BLOB to > make the insert work. The same test works using sqlType LONGVARBINARY in > network mode. The following combinations don't work: > Column type sqlType not working mandatory sqlType > BLOB LONGVARBINARY BLOB > CLOB LONGVARCHARCLOB > The issue here is that first Derby behaves differently in network and > embedded mode. And secondly, should accept LONGVARBINARY/LONGVARCHAR for > BLOB/CLOB columns. -- 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
[jira] Commented: (DERBY-1501) PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL Exception if given sqlType is LONGVARBINARY in embedded mode
[ http://issues.apache.org/jira/browse/DERBY-1501?page=comments#action_12420468 ] Markus Fuchs commented on DERBY-1501: - Table B-4 in the JDBC 4 spec also recommends mapping byte[] to LONGVARBINARY. As LONGVARBINARY is not supported by Derby, it should at least be regarded compatible with BLOB. > PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL > Exception if given sqlType is LONGVARBINARY in embedded mode > -- > > Key: DERBY-1501 > URL: http://issues.apache.org/jira/browse/DERBY-1501 > Project: Derby > Type: Bug > Versions: 10.1.1.0 > Environment: WindowsXP > Reporter: Markus Fuchs > Attachments: ByteArrayTest.java > > When inserting a row into following table > BYTEARRAY_TEST( ID int, BYTEARRAY_VAL blob) > PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL > Exception if given sqlType is LONGVARBINARY. You must give sqlType BLOB to > make the insert work. The same test works using sqlType LONGVARBINARY in > network mode. The following combinations don't work: > Column type sqlType not working mandatory sqlType > BLOB LONGVARBINARY BLOB > CLOB LONGVARCHARCLOB > The issue here is that first Derby behaves differently in network and > embedded mode. And secondly, should accept LONGVARBINARY/LONGVARCHAR for > BLOB/CLOB columns. -- 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
[jira] Commented: (DERBY-1501) PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL Exception if given sqlType is LONGVARBINARY in embedded mode
[ http://issues.apache.org/jira/browse/DERBY-1501?page=comments#action_12420458 ] Kristian Waagan commented on DERBY-1501: The inconsistent behavior between the client and embedded driver is a bug. But what about the second issue? The embedded driver determines if the type of the parameter is "compatible" with the specified SQL type. Currently, BLOB is not seen to be compatible with BINARY, VARBINARY or LONGVARBINARY. The same goes for CLOB and the character types. I think the embedded driver might be doing the right thing. I have no problem understanding the logic in DataTypeDescriptor when I look at table B-5 in the JDBC 4 spec, but the table is for setObject. Can anyone weigh in on this? > PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL > Exception if given sqlType is LONGVARBINARY in embedded mode > -- > > Key: DERBY-1501 > URL: http://issues.apache.org/jira/browse/DERBY-1501 > Project: Derby > Type: Bug > Versions: 10.1.1.0 > Environment: WindowsXP > Reporter: Markus Fuchs > Attachments: ByteArrayTest.java > > When inserting a row into following table > BYTEARRAY_TEST( ID int, BYTEARRAY_VAL blob) > PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL > Exception if given sqlType is LONGVARBINARY. You must give sqlType BLOB to > make the insert work. The same test works using sqlType LONGVARBINARY in > network mode. The following combinations don't work: > Column type sqlType not working mandatory sqlType > BLOB LONGVARBINARY BLOB > CLOB LONGVARCHARCLOB > The issue here is that first Derby behaves differently in network and > embedded mode. And secondly, should accept LONGVARBINARY/LONGVARCHAR for > BLOB/CLOB columns. -- 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