db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Army <qoz...@sbcglobal.net>
Subject Re: [jira] Updated: (DERBY-374) Invalid URL with Derby Client when connecting to Network Server causes protocol exception.
Date Mon, 19 Sep 2005 17:27:42 GMT
Hi Deepa,

The think the patch now handles the case of double-quotes correctly, but I'm 
wondering if we need to worry about single quotes, as well?  I tried some 
examples in embedded vs server mode (after applying your patch) and here's what 
I noticed:

// Embedded.
ij> connect 'jdbc:derby:''good_1'';create=true';
<connection successful>
ij> connect 'jdbc:derby:''C:/my/db/path/bad'';create=true';
ERROR 08001: No suitable driver

// Network Server w/ Derby client.
ij> connect 'jdbc:derby://localhost:1527/''good_3'';create=true';
<connection successful>
ij> connect 'jdbc:derby://localhost:1527/''C:/my/db/path/bad'';create=true';
ERROR (no SQLState): A communication error has been detected. Communication 
protocol being used: Reply.fill(). Communication API being used: 
InputStream.read(). Location where the error was detected: insufficient data. 
Communication function detecting the error: *. Protocol specific error codes(s) 

I don't think we can just add a check for single quotes like you did for double 
quotes because that would mean that cases where a pathless database name is 
given in single quotes--a situation that currently works--would then fail, which 
I think would technically be a regression.  So you might have to add logic to 
allow single quotes around a pathless database name, but to disallow them (with 
a syntax error) if an actual path is specified...?

I haven't tried any of this on a non-Windows machine, so I don't know if the 
results are different there.

Hope I'm not being too picky...

View raw message