[
https://issues.apache.org/jira/browse/DERBY-2713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Anurag Shekhar updated DERBY-2713:
----------------------------------
Attachment: derby-2713v2.diff
1) LOBStreamControl calls a protected method initControl() from its constructor
to set the buffer size. Wouldn't it be better to put that code into the new
constructor? That would allow bufferSize to be final.
changed it to final.
2) The new constructor for LOBStreamControl is only used by
EmbedBlob(byte[],EmbedConnection). Shouldn't it also have been used by
EmbedBlob(DataValueDescriptor,EmbedConnection) when dvd.getStream() returns
null?
changed to use new constructor from EmbedBlob when dvd doesn't have stream.
3) Should EmbedClob(String,EmbedConnection) have used the new ClobStreamControl
constructor?
This constructor is now removed as part of clob cleanup.
4) I was wondering, should LOBStreamControl.init() set dataBytes to null? It
doesn't seem to be used after init() has been called.
added code to set dataBytes to null in init
5) I noticed this diff:
while (sz < length) {
- int len = (int) (((length - sz) >= MAX_BUF_SIZE) ? MAX_BUF_SIZE
+ int len = (int) (((length - sz) >= bufferSize) ? bufferSize
: length - sz);
Would it have been clearer if it was written as Math.min(...)?
changed it to use Math.min
6) Typos in class javadoc for LOBStreamControl: "suplied" -> "supplied",
"indial" -> "initial"
fixed
7) Could you reword this comment in LOBStreamControl? It's not quite clear to
me what it means.
"If the class is created with initial data, the buffer
+ * size is set to the size of the byte array suplied the buffer size is set
+ * to DEFAULT_MAX_BUF_SIZE is an empty LOBStreamControl is created or if the
+ * initial data is smaller than DEFAULT_MAX_BUF_SIZE."
rephrased to comment.
8) Typos in javadoc for LOBStreamControl.initControl(): "initialzes" ->
"initializes", "initialze" -> "initialize"
fixed
> Ensure that a temporary file is not created for a lob obtained from resultset
> unless user updates it.
> -----------------------------------------------------------------------------------------------------
>
> Key: DERBY-2713
> URL: https://issues.apache.org/jira/browse/DERBY-2713
> Project: Derby
> Issue Type: Bug
> Components: JDBC
> Affects Versions: 10.3.0.0
> Reporter: Anurag Shekhar
> Assignee: Anurag Shekhar
> Fix For: 10.3.0.0
>
> Attachments: derby-2713.diff, derby-2713v2.diff
>
>
> Currently LOBStreamControl has a buffer limit of 4k if the lob is larger than
> this a temporary file is created. Ensure that lob data is kept in memory
> unless user start to update it.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.