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 "Mike Matrigali (JIRA)" <ji...@apache.org> on 2009/06/03 19:04:07 UTC
[jira] Created: (DERBY-4256) allow alter table to increase the
maximum size of a blob and a clob.
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] Assigned: (DERBY-4256) allow alter table to increase the
maximum size of a blob and a clob.
Posted by "Eranda Sooriyabandara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eranda Sooriyabandara reassigned DERBY-4256:
--------------------------------------------
Assignee: Eranda Sooriyabandara
> 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] Updated: (DERBY-4256) allow alter table to increase the
maximum size of a blob and a clob.
Posted by "Eranda Sooriyabandara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eranda Sooriyabandara updated DERBY-4256:
-----------------------------------------
Attachment: derby4256.diff
Hi Bryan,
I made some changes to the code as,
if (!(typeName.equals(TypeId.VARCHAR_NAME)) &&
!(typeName.equals(TypeId.VARBIT_NAME))&&!(typeName.equals(TypeId.BLOB_NAME)))
{
throw StandardException.newException(
SQLState.LANG_MODIFY_COLUMN_INVALID_TYPE);
}
and this succeed the test
ij version 10.6
ij> connect 'jdbc:derby:testdb;create=true';
ij> create table binarydata(c1 int,data blob(64));
0 rows inserted/updated/deleted
ij> ALTER TABLE binarydata ALTER COLUMN data SET DATA TYPE blob(256M);
0 rows inserted/updated/deleted
Here I am attaching the patch file with this.
> 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
>
>
> 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.
Posted by "Evan Leonard (JIRA)" <ji...@apache.org>.
[ 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.
Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
[ 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] Updated: (DERBY-4256) allow alter table to increase the
maximum size of a blob and a clob.
Posted by "Mike Matrigali (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mike Matrigali updated DERBY-4256:
----------------------------------
go ahead and ignore my comments about parser, it was not based on reading the code. I am sure about the
store part of my comments that it is safe to just go ahead and change the catalogs and not have to do anything
to the data.
. Bryan has the
experience in this area. I was just thinking that it was going to add syntax and did not realize that datatype
part of the syntax would not need parser changes, but it looks like the part that
handles different datatypes does not really need parser changes. The called routines can handle many
different datatypes.
> 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] Updated: (DERBY-4256) allow alter table to increase the
maximum size of a blob and a clob.
Posted by "Eranda Sooriyabandara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eranda Sooriyabandara updated DERBY-4256:
-----------------------------------------
Attachment: derby4256.diff
Hi Bryan,My last patch I was not think about the clob and I think to include
a little coding to enable the clob to be increase its size.
Here I attach the new patch with this.
> 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.
Posted by "Eranda Sooriyabandara (JIRA)" <ji...@apache.org>.
[ 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] Updated: (DERBY-4256) allow alter table to increase the
maximum size of a blob and a clob.
Posted by "Mike Matrigali (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mike Matrigali updated DERBY-4256:
----------------------------------
Derby Categories: [Newcomer]
I believe that this project would be a good one for a new comer. I don't think it would be too hard.
I would suggest finding the code path that allows alter table to increase the size of a varchar field and
mimic the code to apply to blob and clob fields. It will require some parser changes and some execution
time changes. The files can be pointed out if necessary.
What makes this easy is to only allow INCREASE of size. For blob and clob the size field is really only used
for error checking at the higher levels of the code, there is no storage difference between a small one and
a large one. No format difference. Also no space difference as we only use space to store whatever the
actual size is. By only allowing increase then there is no need to go and check the length of every value, and
figure out what to do if there exists a value that exceeds the new proposed maximum.
> 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] Updated: (DERBY-4256) allow alter table to increase the
maximum size of a blob and a clob.
Posted by "Mike Matrigali (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mike Matrigali updated DERBY-4256:
----------------------------------
I logged this issue based on the following discussion list posting:
Hello again,
As a corollary to my upgrade question, I have another issue I would like to get some input on.
Several old databases in production were created with blob columns at the then default blob size of 1mb. How can I go about upgrading these columns to be longer?
This is the best approach I've come up with so far:
ALTER TABLE binarydata ADD COLUMN data2 blob(128M)
UPDATE binarydata SET data2 = data;
ALTER TABLE binarydata DROP COLUMN data RESTRICT;
RENAME COLUMN binarydata.data2 TO data;
The issue with this approach is that some deployed databases are nearly 1GB in size with a large portion of that being in this table I'm trying to adjust. When I ran this query as a test on such a database, the size of the db on disk balloon to over twice its starting size, and then failed because I was running it on a temp drive without enough storage to complete, so I haven't been able to fully test even if this will work.
Is there a good reason why blob columns can't have their size adjusted directly? I've tried:
ALTER TABLE binarydata ALTER COLUMN data SET DATA TYPE blob(128M)
but this failed with an error.
Any ideas?
Evan
> 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] Updated: (DERBY-4256) allow alter table to increase the
maximum size of a blob and a clob.
Posted by "Eranda Sooriyabandara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eranda Sooriyabandara updated DERBY-4256:
-----------------------------------------
Comment: was deleted
(was: Hi Bryan,
I test with your update and found some problems,
1.When I use the code as,
Statement st1 = conn.createStatement();
st1.setCursorName("c1");
ResultSet rs1 = st1.executeQuery("elect * from t1 where c2 = 2 for
update of c1");
rs1.next();
st.executeUpdate("update t1 set c1 = c1 where current of \"c1\"");
assertStatementError("23513", st,
"update t1 set c1 = c1 + 1 where current of \"c1\"");
it is successfully working but when I change the code as,
Statement st1 = conn.createStatement();
st1.setCursorName("c1");
ResultSet rs1 = st1.executeQuery("select * from t1 where c2 = 2 for
update of c1");
rs1.next();
expRS=new String[][]{
{"2","2"}
};
JDBC.assertFullResultSet(rs1, expRS);
st.executeUpdate("update t1 set c1 = c1 where current of \"c1\"");
assertStatementError("23513", st,
"update t1 set c1 = c1 + 1 where current of \"c1\"");
It gave me the error "unexpected row count:expected<1> but was<0>" in the
line of "JDBC.assertFullResultSet(rs1, expRS);";.
I think this is because in the JDBC they called the rs.next() until it's
become false. So the cursor ends from there.
When we reach the line "st.executeUpdate("update t1 set c1 = c1 where
current of \"c1\"");" cursor not available. So we can't use both of them
together. I thought to skip the part of,
expRS=new String[][]{
{"2","2"}
};
JDBC.assertFullResultSet(rs1, expRS);
from the code.
So I try a method which successful at the end.I send it as a patch file
here.
If it is fine for you then I can do as the same thing for the rest of the
commented codes.
)
> 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, 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.
Posted by "Evan Leonard (JIRA)" <ji...@apache.org>.
[ 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.
Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
[ 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.
Posted by "Evan Leonard (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Commented: (DERBY-4256) allow alter table to increase the
maximum size of a blob and a clob.
Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
[ 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] Updated: (DERBY-4256) allow alter table to increase the
maximum size of a blob and a clob.
Posted by "Eranda Sooriyabandara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eranda Sooriyabandara updated DERBY-4256:
-----------------------------------------
Attachment: derby4256.diff
Hi Bryan,
Here I change the error message and I am attaching the changed patch.
> 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.
[jira] Commented: (DERBY-4256) allow alter table to increase the
maximum size of a blob and a clob.
Posted by "Evan Leonard (JIRA)" <ji...@apache.org>.
[ 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] Updated: (DERBY-4256) allow alter table to increase the
maximum size of a blob and a clob.
Posted by "Eranda Sooriyabandara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eranda Sooriyabandara updated DERBY-4256:
-----------------------------------------
Attachment: DERBY4282.diff
Hi Bryan,
I test with your update and found some problems,
1.When I use the code as,
Statement st1 = conn.createStatement();
st1.setCursorName("c1");
ResultSet rs1 = st1.executeQuery("elect * from t1 where c2 = 2 for
update of c1");
rs1.next();
st.executeUpdate("update t1 set c1 = c1 where current of \"c1\"");
assertStatementError("23513", st,
"update t1 set c1 = c1 + 1 where current of \"c1\"");
it is successfully working but when I change the code as,
Statement st1 = conn.createStatement();
st1.setCursorName("c1");
ResultSet rs1 = st1.executeQuery("select * from t1 where c2 = 2 for
update of c1");
rs1.next();
expRS=new String[][]{
{"2","2"}
};
JDBC.assertFullResultSet(rs1, expRS);
st.executeUpdate("update t1 set c1 = c1 where current of \"c1\"");
assertStatementError("23513", st,
"update t1 set c1 = c1 + 1 where current of \"c1\"");
It gave me the error "unexpected row count:expected<1> but was<0>" in the
line of "JDBC.assertFullResultSet(rs1, expRS);";.
I think this is because in the JDBC they called the rs.next() until it's
become false. So the cursor ends from there.
When we reach the line "st.executeUpdate("update t1 set c1 = c1 where
current of \"c1\"");" cursor not available. So we can't use both of them
together. I thought to skip the part of,
expRS=new String[][]{
{"2","2"}
};
JDBC.assertFullResultSet(rs1, expRS);
from the code.
So I try a method which successful at the end.I send it as a patch file
here.
If it is fine for you then I can do as the same thing for the rest of the
commented codes.
> 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
>
>
> 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] Resolved: (DERBY-4256) allow alter table to increase the
maximum size of a blob and a clob.
Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Pendleton resolved DERBY-4256.
------------------------------------
Resolution: Fixed
Fix Version/s: 10.6.0.0
Patch committed to the trunk as svn revision 802985.
Thanks for the contribution to Derby, Eranda!
> 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, 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] Updated: (DERBY-4256) allow alter table to increase the
maximum size of a blob and a clob.
Posted by "Mike Matrigali (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mike Matrigali updated DERBY-4256:
----------------------------------
Component/s: SQL
> 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
> Components: SQL
> 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] Updated: (DERBY-4256) allow alter table to increase the
maximum size of a blob and a clob.
Posted by "Eranda Sooriyabandara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eranda Sooriyabandara updated DERBY-4256:
-----------------------------------------
Attachment: (was: DERBY4282.diff)
> 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] Updated: (DERBY-4256) allow alter table to increase the
maximum size of a blob and a clob.
Posted by "Eranda Sooriyabandara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eranda Sooriyabandara updated DERBY-4256:
-----------------------------------------
Attachment: Clob.java
A.txt
Hi Bryan,Here is the java file I reproduce the bug. I find this code in a
IBM help site and edited my self.
I crated a clob column of 10K and alter that column to 20K.Also I use a
A.txt file about 19K with this to enter to the clob column and to show that
it works.
Thanks
Eranda
> 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] Updated: (DERBY-4256) allow alter table to increase the
maximum size of a blob and a clob.
Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Pendleton updated DERBY-4256:
-----------------------------------
Attachment: ten_5_codeOnly.diff
Hi Evan,
I think that the code changes are straightforward, and should apply to 10.5 without trouble.
The test changes are trickier, because the relevant test (AlterTableTest.java) doesn't exist in 10.5.
Attached is 10_5_codeOnly.diff, which is a patch that you should be able to
apply to the 10.5 branch in your environment. I created this patch by running
svn merge -r 802984:802985 https://svn.apache.org/repos/asf/db/derby/code/trunk/
and then reverting modifyColumn.out. (I didn't need to revert modifyColumn.out, but since
the test portion of the patch was mostly in AlterTableTest, I thought it would be
clearer if this diff *only* contained code changes, not any partial test changes)
Depending on what your needs are, hopefully the attached patch is useful to
you (e.g., if you want to build your own modified version of 10.5 and use it
to alter the column definitions in your database).
> 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.
Posted by "Mamta A. Satoor (JIRA)" <ji...@apache.org>.
[ 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.
Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Updated: (DERBY-4256) allow alter table to increase the
maximum size of a blob and a clob.
Posted by "Eranda Sooriyabandara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eranda Sooriyabandara updated DERBY-4256:
-----------------------------------------
Attachment: DERBY4282.diff
Hi Bryan,Here I am attaching the full patch that I edited for your concern.
> 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] Updated: (DERBY-4256) allow alter table to increase the
maximum size of a blob and a clob.
Posted by "Eranda Sooriyabandara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eranda Sooriyabandara updated DERBY-4256:
-----------------------------------------
Attachment: (was: DERBY4282.diff)
> 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.
Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
[ 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.
Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
[ 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] Updated: (DERBY-4256) allow alter table to increase the
maximum size of a blob and a clob.
Posted by "Eranda Sooriyabandara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eranda Sooriyabandara updated DERBY-4256:
-----------------------------------------
Attachment: derby4256.diff
Hi Bryan,
I created updated the AlterTableTest according to the new issue and add the
method testJira4256().
I think this will be fine as a test.(It takes my full day).What you think
about the test?
And the exception give as "Only columns of type VARCHAR may have their
length altered".So we must add CLOB and BLOB as data types that can alter
its length.
Thanks
Eranda
> 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] Updated: (DERBY-4256) allow alter table to increase the
maximum size of a blob and a clob.
Posted by "Eranda Sooriyabandara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eranda Sooriyabandara updated DERBY-4256:
-----------------------------------------
Comment: was deleted
(was: Hi Bryan,Here I am attaching the full patch that I edited for your concern.
)
> 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, 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.
Re: [jira] Commented: (DERBY-4256) allow alter table to increase
the maximum size of a blob and a clob.
Posted by Bryan Pendleton <bp...@amberpoint.com>.
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.
Posted by Kristian Waagan <Kr...@Sun.COM>.
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.
Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
[ 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] Closed: (DERBY-4256) allow alter table to increase the
maximum size of a blob and a clob.
Posted by "Eranda Sooriyabandara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-4256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eranda Sooriyabandara closed 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
> 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.