[jira] Commented: (DERBY-4256) allow alter table to increase the maximum size of a blob and a clob.
[ https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12786032#action_12786032 ] Evan Leonard commented on DERBY-4256: - Thank you Bryan for taking the time to create the 10.5 patch. However I'm not sure this will suit my environment. We ship a product with many dependencies, derby being one of them, and its not advisable to start up custom branches of dependencies since we then have to track the changes in every subsequent release. Any chance this patch could be included in 10.5.3.1 or 10.5.4? What is the proper channel to request this? Thanks again! > allow alter table to increase the maximum size of a blob and a clob. > > > Key: DERBY-4256 > URL: https://issues.apache.org/jira/browse/DERBY-4256 > Project: Derby > Issue Type: Improvement > Components: SQL >Affects Versions: 10.5.1.1 >Reporter: Mike Matrigali >Assignee: Eranda Sooriyabandara >Priority: Minor > Fix For: 10.6.0.0 > > Attachments: A.txt, Clob.java, derby4256.diff, derby4256.diff, > derby4256.diff, derby4256.diff, ten_5_codeOnly.diff > > > Allow new syntax that allows user to alter the maximum length of a blob > and/or clob column: > ALTER TABLE binarydata ALTER COLUMN data SET DATA TYPE blob(128M) > The syntax should match up with the existing functionality to increase the > size of varchar fields. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-4256) allow alter table to increase the maximum size of a blob and a clob.
[ https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12785987#action_12785987 ] Evan Leonard commented on DERBY-4256: - Any chance this could be merged to 10.5? I'd quite like to make use of this fix, but am not excited about having to wait for 10.6 next year. From this attached diffs, it looks like it is a small localized fix that could safely be applied to 10.5. > allow alter table to increase the maximum size of a blob and a clob. > > > Key: DERBY-4256 > URL: https://issues.apache.org/jira/browse/DERBY-4256 > Project: Derby > Issue Type: Improvement > Components: SQL >Affects Versions: 10.5.1.1 >Reporter: Mike Matrigali >Assignee: Eranda Sooriyabandara >Priority: Minor > Fix For: 10.6.0.0 > > Attachments: A.txt, Clob.java, derby4256.diff, derby4256.diff, > derby4256.diff, derby4256.diff > > > Allow new syntax that allows user to alter the maximum length of a blob > and/or clob column: > ALTER TABLE binarydata ALTER COLUMN data SET DATA TYPE blob(128M) > The syntax should match up with the existing functionality to increase the > size of varchar fields. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-4256) allow alter table to increase the maximum size of a blob and a clob.
[ https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12741684#action_12741684 ] Eranda Sooriyabandara commented on DERBY-4256: -- Hi Bryan,I am sorry for the mistake I have done and thanks for committing the patch. I am closing this issue. > allow alter table to increase the maximum size of a blob and a clob. > > > Key: DERBY-4256 > URL: https://issues.apache.org/jira/browse/DERBY-4256 > Project: Derby > Issue Type: Improvement > Components: SQL >Affects Versions: 10.5.1.1 >Reporter: Mike Matrigali >Assignee: Eranda Sooriyabandara >Priority: Minor > Fix For: 10.6.0.0 > > Attachments: A.txt, Clob.java, derby4256.diff, derby4256.diff, > derby4256.diff, derby4256.diff > > > Allow new syntax that allows user to alter the maximum length of a blob > and/or clob column: > ALTER TABLE binarydata ALTER COLUMN data SET DATA TYPE blob(128M) > The syntax should match up with the existing functionality to increase the > size of varchar fields. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-4256) allow alter table to increase the maximum size of a blob and a clob.
[ https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12741671#action_12741671 ] Bryan Pendleton commented on DERBY-4256: Hi Eranda, I think maybe you meant to attach these latest patches and comments to DERBY-4282, not DERBY-4256? > allow alter table to increase the maximum size of a blob and a clob. > > > Key: DERBY-4256 > URL: https://issues.apache.org/jira/browse/DERBY-4256 > Project: Derby > Issue Type: Improvement > Components: SQL >Affects Versions: 10.5.1.1 >Reporter: Mike Matrigali >Assignee: Eranda Sooriyabandara >Priority: Minor > Attachments: A.txt, Clob.java, derby4256.diff, derby4256.diff, > derby4256.diff, derby4256.diff, DERBY4282.diff, DERBY4282.diff > > > Allow new syntax that allows user to alter the maximum length of a blob > and/or clob column: > ALTER TABLE binarydata ALTER COLUMN data SET DATA TYPE blob(128M) > The syntax should match up with the existing functionality to increase the > size of varchar fields. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-4256) allow alter table to increase the maximum size of a blob and a clob.
[ https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12741355#action_12741355 ] Bryan Pendleton commented on DERBY-4256: Thanks Eranda for the updated patch. I am running the full regression suite and will commit this patch soon. > allow alter table to increase the maximum size of a blob and a clob. > > > Key: DERBY-4256 > URL: https://issues.apache.org/jira/browse/DERBY-4256 > Project: Derby > Issue Type: Improvement > Components: SQL >Affects Versions: 10.5.1.1 >Reporter: Mike Matrigali >Assignee: Eranda Sooriyabandara >Priority: Minor > Attachments: A.txt, Clob.java, derby4256.diff, derby4256.diff, > derby4256.diff, derby4256.diff > > > Allow new syntax that allows user to alter the maximum length of a blob > and/or clob column: > ALTER TABLE binarydata ALTER COLUMN data SET DATA TYPE blob(128M) > The syntax should match up with the existing functionality to increase the > size of varchar fields. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
Re: [jira] Commented: (DERBY-4256) allow alter table to increase the maximum size of a blob and a clob.
Kristian Waagan wrote: FYI, we do have the classes LoopingAlphabetStream and LoopingAlphabetReader that can be used to construct large streams without materializing the whole value in memory. Thanks Kristian! Eranda found the class o.a.derbyTesting.functionTests.util.TestInputStream, which seems to fit the task nicely. For this particular test, we don't care about the contents of the Blob/Clob, just about its size, so the TestInputStream class is easy to use for that purpose. thanks, bryan
Re: [jira] Commented: (DERBY-4256) allow alter table to increase the maximum size of a blob and a clob.
Bryan Pendleton (JIRA) wrote:
[ https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12740903#action_12740903 ]
Bryan Pendleton commented on DERBY-4256:
[ snip ]
I think that we could avoid the need for a separate text file by constructing a string in memory ,
and then constructing an input stream from the string by using ByteArrayInputStream and String.getBytes.
FYI, we do have the classes LoopingAlphabetStream and
LoopingAlphabetReader that can be used to construct large streams
without materializing the whole value in memory.
The reader class also supports using various alphabets which differ in
how many bytes each character results in when written to disk - i.e. 20K
characters can result in anything from 20K to 60K bytes.
Regards,
--
Kristian
That might make the test program easier to integrate into one of our existing
classes
For example, here's a simple method to construct a string in memory of an
arbitrary length:
private static String makeString( int count )
{
char[] raw = new char[ count ];
Arrays.fill( raw, 'a' );
return new String( raw );
}
allow alter table to increase the maximum size of a blob and a clob.
Key: DERBY-4256
URL: https://issues.apache.org/jira/browse/DERBY-4256
Project: Derby
Issue Type: Improvement
Components: SQL
Affects Versions: 10.5.1.1
Reporter: Mike Matrigali
Assignee: Eranda Sooriyabandara
Priority: Minor
Attachments: A.txt, Clob.java, derby4256.diff, derby4256.diff
Allow new syntax that allows user to alter the maximum length of a blob and/or
clob column:
ALTER TABLE binarydata ALTER COLUMN data SET DATA TYPE blob(128M)
The syntax should match up with the existing functionality to increase the size
of varchar fields.
[jira] Commented: (DERBY-4256) allow alter table to increase the maximum size of a blob and a clob.
[ https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12740916#action_12740916 ] Bryan Pendleton commented on DERBY-4256: Hi Eranda, this looks like a very good test, thanks for putting it together. I believe that you can alter the message by editing the file java/engine/org/apache/derby/loc/messages.xml If you want to investigate modifying the message, then after that I'll look into committing this fix. > allow alter table to increase the maximum size of a blob and a clob. > > > Key: DERBY-4256 > URL: https://issues.apache.org/jira/browse/DERBY-4256 > Project: Derby > Issue Type: Improvement > Components: SQL >Affects Versions: 10.5.1.1 >Reporter: Mike Matrigali >Assignee: Eranda Sooriyabandara >Priority: Minor > Attachments: A.txt, Clob.java, derby4256.diff, derby4256.diff, > derby4256.diff > > > Allow new syntax that allows user to alter the maximum length of a blob > and/or clob column: > ALTER TABLE binarydata ALTER COLUMN data SET DATA TYPE blob(128M) > The syntax should match up with the existing functionality to increase the > size of varchar fields. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-4256) allow alter table to increase the maximum size of a blob and a clob.
[
https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12740903#action_12740903
]
Bryan Pendleton commented on DERBY-4256:
Hi Eranda,
This code seems like a good approach.
Clob.java reproduces the bug for me, and I also confirmed that if I apply your
change to ModifyColumnNode.java,
Clob.java then works correctly (it can insert the 20K clob into the column
which has been altered from 10K).
This is good progress, thanks for working on the test program.
I think that we could avoid the need for a separate text file by constructing a
string in memory ,
and then constructing an input stream from the string by using
ByteArrayInputStream and String.getBytes.
That might make the test program easier to integrate into one of our existing
classes
For example, here's a simple method to construct a string in memory of an
arbitrary length:
private static String makeString( int count )
{
char[] raw = new char[ count ];
Arrays.fill( raw, 'a' );
return new String( raw );
}
> allow alter table to increase the maximum size of a blob and a clob.
>
>
> Key: DERBY-4256
> URL: https://issues.apache.org/jira/browse/DERBY-4256
> Project: Derby
> Issue Type: Improvement
> Components: SQL
>Affects Versions: 10.5.1.1
>Reporter: Mike Matrigali
>Assignee: Eranda Sooriyabandara
>Priority: Minor
> Attachments: A.txt, Clob.java, derby4256.diff, derby4256.diff
>
>
> Allow new syntax that allows user to alter the maximum length of a blob
> and/or clob column:
> ALTER TABLE binarydata ALTER COLUMN data SET DATA TYPE blob(128M)
> The syntax should match up with the existing functionality to increase the
> size of varchar fields.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-4256) allow alter table to increase the maximum size of a blob and a clob.
[ https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12736701#action_12736701 ] Mamta A. Satoor commented on DERBY-4256: Eranda, I quickly went through your patch and it looks good to me. Would it be possible to try to create smaller blob/clob columns, increase their size and then insert data which is bigger than the original size but smaller than the new size to see if we are able to store and retrieve bigger data. Once we know this works fine on a standalone case, we should add a junit test to put it into our regression suite for this change. > allow alter table to increase the maximum size of a blob and a clob. > > > Key: DERBY-4256 > URL: https://issues.apache.org/jira/browse/DERBY-4256 > Project: Derby > Issue Type: Improvement > Components: SQL >Affects Versions: 10.5.1.1 >Reporter: Mike Matrigali >Assignee: Eranda Sooriyabandara >Priority: Minor > Attachments: derby4256.diff, derby4256.diff > > > Allow new syntax that allows user to alter the maximum length of a blob > and/or clob column: > ALTER TABLE binarydata ALTER COLUMN data SET DATA TYPE blob(128M) > The syntax should match up with the existing functionality to increase the > size of varchar fields. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-4256) allow alter table to increase the maximum size of a blob and a clob.
[ https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12717568#action_12717568 ] Knut Anders Hatlen commented on DERBY-4256: --- This looks like a duplicate of DERBY-3920. > allow alter table to increase the maximum size of a blob and a clob. > > > Key: DERBY-4256 > URL: https://issues.apache.org/jira/browse/DERBY-4256 > Project: Derby > Issue Type: New Feature >Affects Versions: 10.5.1.1 >Reporter: Mike Matrigali >Assignee: Eranda Sooriyabandara >Priority: Minor > > Allow new syntax that allows user to alter the maximum length of a blob > and/or clob column: > ALTER TABLE binarydata ALTER COLUMN data SET DATA TYPE blob(128M) > The syntax should match up with the existing functionality to increase the > size of varchar fields. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-4256) allow alter table to increase the maximum size of a blob and a clob.
[ https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12716055#action_12716055 ] Bryan Pendleton commented on DERBY-4256: I'm cautiously optimistic that no additional changes will be needed. I'm eager to see what results you find by simply modifying ModifyColumnNode.java. The relevant portion of the grammar is around line 12740 in the columnAlterClause() method of impl/sql/compile/sqlgrammar.jj The relevant execution code is the modifyColumnType() method in o.a.d.impl.sql.execute.AlterTableConstantAction I took a quick peek at both places and it *seemed* like they should not require changes for the extension to blob/clob. But it was a very quick peek... > allow alter table to increase the maximum size of a blob and a clob. > > > Key: DERBY-4256 > URL: https://issues.apache.org/jira/browse/DERBY-4256 > Project: Derby > Issue Type: New Feature >Affects Versions: 10.5.1.1 >Reporter: Mike Matrigali >Assignee: Eranda Sooriyabandara >Priority: Minor > > Allow new syntax that allows user to alter the maximum length of a blob > and/or clob column: > ALTER TABLE binarydata ALTER COLUMN data SET DATA TYPE blob(128M) > The syntax should match up with the existing functionality to increase the > size of varchar fields. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-4256) allow alter table to increase the maximum size of a blob and a clob.
[ https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12716029#action_12716029 ] Evan Leonard commented on DERBY-4256: - The changes there in ModifyColumnNode are straight forward enough. When Mike was referring to "parser changes and some execution time changes" do you have a sense of where he's referring? > allow alter table to increase the maximum size of a blob and a clob. > > > Key: DERBY-4256 > URL: https://issues.apache.org/jira/browse/DERBY-4256 > Project: Derby > Issue Type: New Feature >Affects Versions: 10.5.1.1 >Reporter: Mike Matrigali >Assignee: Eranda Sooriyabandara >Priority: Minor > > Allow new syntax that allows user to alter the maximum length of a blob > and/or clob column: > ALTER TABLE binarydata ALTER COLUMN data SET DATA TYPE blob(128M) > The syntax should match up with the existing functionality to increase the > size of varchar fields. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-4256) allow alter table to increase the maximum size of a blob and a clob.
[ https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12715998#action_12715998 ] Bryan Pendleton commented on DERBY-4256: Hi Evan, thanks for having a look at this. I think the first place to start is with the 'checkUserType()' method in o.a.d.impl.sql.compile.ModifyColumnNode. Look around line 118. > allow alter table to increase the maximum size of a blob and a clob. > > > Key: DERBY-4256 > URL: https://issues.apache.org/jira/browse/DERBY-4256 > Project: Derby > Issue Type: New Feature >Affects Versions: 10.5.1.1 >Reporter: Mike Matrigali >Priority: Minor > > Allow new syntax that allows user to alter the maximum length of a blob > and/or clob column: > ALTER TABLE binarydata ALTER COLUMN data SET DATA TYPE blob(128M) > The syntax should match up with the existing functionality to increase the > size of varchar fields. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-4256) allow alter table to increase the maximum size of a blob and a clob.
[ https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12715995#action_12715995 ] Evan Leonard commented on DERBY-4256: - I'll try and take a look. Can you point me toward the VARCHAR work? > allow alter table to increase the maximum size of a blob and a clob. > > > Key: DERBY-4256 > URL: https://issues.apache.org/jira/browse/DERBY-4256 > Project: Derby > Issue Type: New Feature >Affects Versions: 10.5.1.1 >Reporter: Mike Matrigali >Priority: Minor > > Allow new syntax that allows user to alter the maximum length of a blob > and/or clob column: > ALTER TABLE binarydata ALTER COLUMN data SET DATA TYPE blob(128M) > The syntax should match up with the existing functionality to increase the > size of varchar fields. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
