db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristian Waagan <Kristian.Waa...@Sun.COM>
Subject Re: [jira] Commented: (DERBY-4256) allow alter table to increase the maximum size of a blob and a clob.
Date Sun, 09 Aug 2009 10:14:24 GMT
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.
>>     
>
>   


Mime
View raw message