Re: Urgent question about JIra issue DERBY-526

2014-12-04 Thread Rick Hillegas

On 12/3/14 12:09 AM, Lin Ren wrote:


Hi Guys,

Sorry for the broadcast… I have a quick question about issue 
DERBY-526, I’m currently using Derby version 10.10.1.3, and still meet 
the same problem:


When I using IPv6 JDBC URL like: 
“jdbc:derby://2001:db8:0:f101:0:0:0:9:1527/xxx;create=true;user=xxx;password=xxx”


I got the exception: java.lang.NumberFormatException: For input 
string: db8:0:f101:0:0:0:9:1527


My searched Jira and found out the issue 526, but seems it is still in 
open state, can anyone tell me whether the issue is fixed now? And in 
which version if yes?


Thanks so much!

Lin


Hi Lin,

Myrna has responded on the issue. It has not been fixed. The issue lists 
a couple workarounds.


Hope this is useful,
-Rick


Blob column behaviour, when we dont have data when having less data

2014-12-04 Thread kosurusekhar
Hi Folks,

We have requirement to store the files in DB, we created a Blob column. As
per derby manuals we need to specify the size of the content while creating
the column. We have 4 different sizes of files like 200KB, 512KB, 1MB, 6MB 
some times we don't have any content into this column. If I go with max size
6MB, 

1) whether derby will occupy 6MB space for this row even i am not inserting
data in to this column?

2) whether derby will occupy complete 6MB space if I am trying to insert
small size files like 512KB or 1MB?

Please let me know how derby database behaves in this case. I am using Derby
(Network server) 10.9 version.

Thanks in Advance.

Regards
Sekhar.



--
View this message in context: 
http://apache-database.10148.n7.nabble.com/Blob-column-behaviour-when-we-dont-have-data-when-having-less-data-tp143363.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Re: Duplicate key feature request

2014-12-04 Thread John English

On 02/12/2014 00:30, Rick Hillegas wrote:

On 12/1/14 4:08 AM, John English wrote:

However, why not in any case consider deriving a separate subclass of
SQLException for the duplicate key case? It wouldn't break any existing code,
it's presumably easy to identify the code sites which should throw it, and it
would clarify exception handling in some cases.

Hi John,

Note that the SQLException which is thrown is already a refined subclass of
SQLException. The failed insert will throw a
java.sql.SQLIntegrityConstraintViolationException. That may help you code this
approach to the problem.


But wouldn't this also be thrown by other causes such as a check constraint or 
foreign key violation? In such cases, an if statement would still be needed to 
check the actual cause.

--
John English


Re: Urgent question about JIra issue DERBY-526

2014-12-04 Thread Myrna van Lunteren
Hi,

I posted a reply to your comment in DERBY-526 as well - no, unfortunately,
nothing further has happened on that issue so the problem still exists.
The workaround is still to use the hostname.

Myrna

On Wed, Dec 3, 2014 at 12:09 AM, Lin Ren lin@oracle.com wrote:

 Hi Guys,



 Sorry for the broadcast… I have a quick question about issue DERBY-526,
 I’m currently using Derby version 10.10.1.3, and still meet the same
 problem:



 When I using IPv6 JDBC URL like:
 “jdbc:derby://2001:db8:0:f101:0:0:0:9:1527/xxx;create=true;user=xxx;password=xxx”



 I got the exception: java.lang.NumberFormatException: For input string:
 db8:0:f101:0:0:0:9:1527



 My searched Jira and found out the issue 526, but seems it is still in
 open state, can anyone tell me whether the issue is fixed now? And in which
 version if yes?



 Thanks so much!



 Lin



Re: Urgent question about JIra issue DERBY-526

2014-12-04 Thread Peter Ondruška
Try:

jdbc:derby://[2001:db8:0:f101:0:0:0:9]:1527/xxx;create=true;user=xxx;password=xxx

On 3 December 2014 at 09:09, Lin Ren lin@oracle.com wrote:

 Hi Guys,



 Sorry for the broadcast… I have a quick question about issue DERBY-526,
 I’m currently using Derby version 10.10.1.3, and still meet the same
 problem:



 When I using IPv6 JDBC URL like:
 “jdbc:derby://2001:db8:0:f101:0:0:0:9:1527/xxx;create=true;user=xxx;password=xxx”



 I got the exception: java.lang.NumberFormatException: For input string:
 db8:0:f101:0:0:0:9:1527



 My searched Jira and found out the issue 526, but seems it is still in
 open state, can anyone tell me whether the issue is fixed now? And in which
 version if yes?



 Thanks so much!



 Lin




-- 
Peter Ondruška


Re: Blob column behaviour, when we dont have data when having less data

2014-12-04 Thread kosurusekhar
Thanks Mike for quick reply.

 2) whether derby will occupy complete 6MB space if I am trying to insert 
 small size files like 512KB or 1MB? 
*space used will be that of the size of the inserted column plus some 
metadata overhead/page overhead. *

This means that in a 6MB column if I save 512KB content file then it will
occupy 6MB + metadata size. Right?

Is there any provision to space in this kind of scenario ?


Thanks 
Sekhar.



--
View this message in context: 
http://apache-database.10148.n7.nabble.com/Blob-column-behaviour-when-we-dont-have-data-when-having-less-data-tp143363p143376.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Re: Blob column behaviour, when we dont have data when having less data

2014-12-04 Thread Peter Ondruška
Derby uses only as much space as the size of your BLOB. The DDL for size of
BLOB column is the maximum BLOB you can store.

On 5 December 2014 at 06:57, kosurusekhar kosurusek...@gmail.com wrote:

 Thanks Mike for quick reply.

  2) whether derby will occupy complete 6MB space if I am trying to insert
  small size files like 512KB or 1MB?
 *space used will be that of the size of the inserted column plus some
 metadata overhead/page overhead. *

 This means that in a 6MB column if I save 512KB content file then it will
 occupy 6MB + metadata size. Right?

 Is there any provision to space in this kind of scenario ?


 Thanks
 Sekhar.



 --
 View this message in context:
 http://apache-database.10148.n7.nabble.com/Blob-column-behaviour-when-we-dont-have-data-when-having-less-data-tp143363p143376.html
 Sent from the Apache Derby Users mailing list archive at Nabble.com.




-- 
Peter Ondruška


Re: Blob column behaviour, when we dont have data when having less data

2014-12-04 Thread Mamta Satoor
Sekhar, you asked, This means that in a 6MB column if I save 512KB content
file then it will occupy 6MB + metadata size. Right?. I think the answer
is no. The size will be 512KB+metadata size. Mike, please correct me if I
am wrong.

On Thu, Dec 4, 2014 at 10:10 PM, Peter Ondruška peter.ondru...@kaibo.eu
wrote:

 Derby uses only as much space as the size of your BLOB. The DDL for size
 of BLOB column is the maximum BLOB you can store.

 On 5 December 2014 at 06:57, kosurusekhar kosurusek...@gmail.com wrote:

 Thanks Mike for quick reply.

  2) whether derby will occupy complete 6MB space if I am trying to insert
  small size files like 512KB or 1MB?
 *space used will be that of the size of the inserted column plus some
 metadata overhead/page overhead. *

 This means that in a 6MB column if I save 512KB content file then it will
 occupy 6MB + metadata size. Right?

 Is there any provision to space in this kind of scenario ?


 Thanks
 Sekhar.



 --
 View this message in context:
 http://apache-database.10148.n7.nabble.com/Blob-column-behaviour-when-we-dont-have-data-when-having-less-data-tp143363p143376.html
 Sent from the Apache Derby Users mailing list archive at Nabble.com.




 --
 Peter Ondruška