Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 54935 invoked from network); 13 Sep 2010 20:40:10 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 13 Sep 2010 20:40:10 -0000 Received: (qmail 70794 invoked by uid 500); 13 Sep 2010 20:40:10 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 70662 invoked by uid 500); 13 Sep 2010 20:40:09 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 70650 invoked by uid 99); 13 Sep 2010 20:40:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Sep 2010 20:40:08 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [87.248.110.138] (HELO n21.bullet.mail.ukl.yahoo.com) (87.248.110.138) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 13 Sep 2010 20:39:59 +0000 Received: from [217.146.182.179] by n21.bullet.mail.ukl.yahoo.com with NNFMP; 13 Sep 2010 20:39:37 -0000 Received: from [87.248.110.200] by t5.bullet.ukl.yahoo.com with NNFMP; 13 Sep 2010 20:39:37 -0000 Received: from [127.0.0.1] by omp230.mail.ukl.yahoo.com with NNFMP; 13 Sep 2010 20:39:37 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 464392.40411.bm@omp230.mail.ukl.yahoo.com Received: (qmail 59691 invoked by uid 60001); 13 Sep 2010 20:39:37 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s1024; t=1284410377; bh=HuFq+AsXOpHr3ERtBWViVOqTx//JMO7fFtm1yQfc328=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=ZXA3abx+gEh+YEkX4hLrCoWh3A+P4Xf5YbH5Qv6eqTTWoJUYEX5LZgXMxZRk/98h3HzcWEUaXMMZiPAsHGX68U9TzogkgGmiQkdloVYyohvSumYHXkKGXLLfRsxcg/BbNavo3wwixTW76mq/X8MEJz+HnqDgzm5kuryVjQ02kUc= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=aGZQ1TJSz6/b9xUOW36fMTMLDIkSw+ZYLRBZYtFTkOR5AEU223D1+sEJgznPTNSjXQ6bknrAyWFSi7U6C7ouLCn15PQ9+xynJmVPqx8S3l62ozUCdlYgEk26ho5okOB+a7/u2AWAdArcP9eRB1z/PVre6Ia1oA/N04iQAPp8YtM=; Message-ID: <156385.56364.qm@web29107.mail.ird.yahoo.com> X-YMail-OSG: 1ux5GxYVM1mqSp9po98b4v9pZ72qy1MkRpM.EddKgP87Nkx q4UdPl1l5mI4d861wQ8YGq4epxZaWYkFQ9x_7q0L_W.cunkToFuduCv.KUTp ULZaI3DQO0F2_hPOgRmE0iuwUjNCp.J_YwdblwtCP0m3dnOFecU5iAx4QEMJ Ai5mFciHFp3mWkYWwB5ZV3Qb_9rzi1zwQEmPAZNL.0MAjE9Vf78_.aP6mCeK LhWT4YIR62yM- Received: from [109.246.226.163] by web29107.mail.ird.yahoo.com via HTTP; Mon, 13 Sep 2010 20:39:37 GMT X-Mailer: YahooMailRC/470 YahooMailWebService/0.8.105.279950 References: <866536.18935.qm@web29109.mail.ird.yahoo.com> <215495.51344.qm@web29101.mail.ird.yahoo.com> Date: Mon, 13 Sep 2010 20:39:37 +0000 (GMT) From: Tiago Espinha Subject: Re: Database name length To: derby-dev@db.apache.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Aha, we do indeed Knut, but I just found a bug that is present at least on = =0A10.5.3.0. If you try to create a database using the client driver with 2= 43 =0A[excluding ;create=3Dtrue] Latin characters (e.g. '=E7'), the server = will throw the =0Afollowing exception: =0A=0A--------------8<--------------= --=0A2010-09-13 20:26:11.052 GMT : fromIndex(518) > toIndex(275)=0Ajava.lan= g.IllegalArgumentException: fromIndex(518) > toIndex(275)=0A at java= .util.Arrays.rangeCheck(Arrays.java:1306)=0A at java.util.Arrays.fil= l(Arrays.java:2567)=0A at org.apache.derby.impl.drda.DDMWriter.padBy= tes(Unknown Source)=0A at org.apache.derby.impl.drda.DDMWriter.write= ScalarPaddedBytes(Unknown =0ASource)=0A at org.apache.derby.impl.drd= a.DRDAConnThread.writeRDBNAM(Unknown Source)=0A------------8<--------------= ---------=0A=0AThis causes havoc as probably '=E7' is indeed requiring more= than one byte to be =0Aencoded. I'm actually surprised this works at all b= ut it's probably some obscure =0Aaddition of EBCDIC on top of just regular = US-ASCII. When I try to get the bytes =0Afor '=E7' in plain US-ASCII, I get= 63 which is ASCII for the question mark.=0A=0AThis means that as it is, on= the client driver, the limit will be shorter than =0A255 characters if the= se special characters are used. The only matter for concern =0Ais that in p= revious releases this limit isn't properly handled and we just let =0Athe s= erver crash with a serious unhandled exception.=0A=0AI'm all for raising th= is limit if the community agrees that this does not =0Aviolate the DRDA pro= tocol. I think Kathey also expressed some concern about the =0Alimit on JIR= A, so it would be interesting to hear her thoughts on this.=0A=0ATiago=0A= =0A----- Original Message ----=0AFrom: Knut Anders Hatlen =0ATo: derby-dev@db.apache.org=0ASent: Mon, 13 September, 2010 12:53= :11=0ASubject: Re: Database name length=0A=0ATiago Espinha writes:=0A=0A> Thank you Knut, for your reply.=0A>=0A> Your point= #1 is correct. As for point #2 and #3 just a small correction. It is =0A>= =0A> all characters falling outside the *US-ASCII* encoding that will get a= length =0A> lower than 255 characters as anything other than ASCII require= s more than just =0A>1 =0A>=0A> byte to encode. I'm fairly sure that at thi= s point we do not support ISO-8859-1 =0A>=0A> through the client driver as = these characters (the extended ones like =E1=E9=F3 etc) =0A=0A> fall outsid= e US-ASCII. So hopefully this won't break anything as we didn't =0A> suppor= t these characters previously.=0A=0AI think we do support this. At least, t= his code ran fine on my machine=0Awith Derby 10.6.1.0 and created a databas= e named =E1=E9=F3:=0A=0A Connection c =3D DriverManager.getConnection(= =0A "jdbc:derby://localhost/\u00E1\u00E9\u00F3;create=3Dtrue");= =0A=0A> As for your suggestion of increasing the length of the field, I'm n= ot sure =0A> that's an option. This length limitation is imposed by the DRD= A specification =0A> and the ACR unfortunately didn't change this. On the A= CR it reads "As of DDM =0A> Level 7, the RDBNAM can accommodate an RDB name= of up to 255 bytes in length, =0A> and its format will vary depending on t= he length of the RDB name". So =0A> essentially, we could easily support a = much larger RDB name on Derby but the =0A> specification forbids it.=0A=0AD= RDA does allow product-unique extensions. I have a hard time seeing any=0Ad= ownside with extending the protocol here. Sending a longer string than=0Awh= at a strict reading of the spec permits sounds like a lesser evil to=0Ame t= han disallowing network access to the database.=0A=0A-- =0AKnut Anders=0A= =0A=0A=0A