You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Kathey Marsden (Updated) (JIRA)" <ji...@apache.org> on 2012/02/17 19:02:00 UTC
[jira] [Updated] (DERBY-5338) When attempting to insert a 4GB
stream client gives SQLState XN015 network protocol error vs embedded 22003
data too large for type
[ https://issues.apache.org/jira/browse/DERBY-5338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kathey Marsden updated DERBY-5338:
----------------------------------
Urgency: Normal
Bug behavior facts: Crash,Embedded/Client difference (was: Embedded/Client difference)
Labels: derby_triage10_9 (was: )
Triaging for 10.9. Marking urgency as normal as this is a disallowed operation, but since the connection is lost, marking it as a crash. This test in LobLimitsTest should be changed to eliminate the special client condition to reproduce the issue.
public void test_02_BlobNegative() throws SQLException {
// Negative Test, use setBlob api to insert a 4GB blob.
setAutoCommit(false);
PreparedStatement insertBlob =
prepareStatement("INSERT INTO BLOBTBL values (?,?,?,?)");
BlobImplT _4GbBlob =
new BlobImplT(new RandomByteStreamT(new java.util.Random(),
_4GB), _4GB);
try {
insertBlob_SetBlob("BlobTest #7 (setBlob with 4Gb blob",
insertBlob, _4GbBlob,
_4GB, 0, 1, 0);
fail("Inserting 4BG blob should have thrown exception");
} catch (SQLException sqle) {
// DERBY DOES NOT SUPPORT INSERT OF 4GB BLOB
if (usingDerbyNetClient()) {
// DERBY-5338 client gives wrong SQLState and protocol error
// inserting a 4GB clob. Should be 22003
assertSQLState("XN015",sqle);
} else {
assertSQLState("22003", sqle);
}
commit();
}
> When attempting to insert a 4GB stream client gives SQLState XN015 network protocol error vs embedded 22003 data too large for type
> -----------------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-5338
> URL: https://issues.apache.org/jira/browse/DERBY-5338
> Project: Derby
> Issue Type: Bug
> Components: Network Client
> Affects Versions: 10.9.0.0
> Reporter: Kathey Marsden
> Priority: Minor
> Labels: derby_triage10_9
>
> In converting LobLimits test DERBY-1903, I see that attempting to insert a 4GB stream with client gives the error XN015
> Caused by: org.apache.derby.client.am.SqlException: Network protocol error: the specified size of the InputStream, parameter #4, is less than the actual InputStream length.
> at org.apache.derby.client.net.Request.writePlainScalarStream(Request.java:359)
> at org.apache.derby.client.net.Request.writeScalarStream(Request.java:247)
> at org.apache.derby.client.net.NetStatementRequest.buildEXTDTA(NetStatementRequest.java:963)
> at org.apache.derby.client.net.NetStatementRequest.writeExecute(NetStatementRequest.java:151)
> at org.apache.derby.client.net.NetPreparedStatement.writeExecute_(NetPreparedStatement.java:174)
> at org.apache.derby.client.am.PreparedStatement.writeExecute(PreparedStatement.java:1800)
> at org.apache.derby.client.am.PreparedStatement.flowExecute(PreparedStatement.java:2030)
> at org.apache.derby.client.am.PreparedStatement.executeUpdateX(PreparedStatement.java:417)
> at org.apache.derby.client.am.PreparedStatement.executeUpdate(PreparedStatement.java:403)
> ... 38 more
> vs's embedded's 22003, the length exceeds the maximum length for the data type.
> I am not sure if the connection is lost or not. It typically is with protocol errors.
> Look for this bug number in largedata.LobLimits.java for test case.
> You can remove the exclusion for usingDerbyNetClient and run org.apache.derbyTesting.functionTests.tests.largedata.LobLimitsLiteTest
> to reproduce the problem. I will check the test case in soon as part of DERBY-1903
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira