db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mamta Satoor" <msat...@gmail.com>
Subject Hard upgrade vs soft upgrade : Using 10.3 database against main codeline without upgrade=true flag
Date Wed, 29 Aug 2007 17:21:15 GMT
Hi,

I am little puzzled by the behavior I see when I use a 10.3 database against
main codeline. I have not given upgrade=true and hence no hard upgrade
involved here. (Note that I have to use
derby.database.allowPreReleaseUpgrade=true to allow use of 10.4 beta code on
a 10.3 database). Following is how I am connecting to the 10.3 database
           Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
           Properties p = System.getProperties();
           p.put("derby.database.allowPreReleaseUpgrade", "true");
           Connection conn = DriverManager.getConnection
("jdbc:derby:c:/dellater/db103Norway",p);

I was under the impression that the scenario about would mean I am in soft
upgrade. But the following code is not following soft upgrade code
           DatabaseMetaData dbmd = conn.getMetaData();
           ResultSet rs = dbmd.getTables(null,"APP",null,null);

When I debug the getTables call above, I had expected the code to think it
is in soft upgrade mode and hence goto metadata.properties to get the sql
for getTables. But instead, the code thinks it is not, and we are going to
SYSSTATMENTS for getTables. The code to check for softupgrade is in
EmbedDatabaseMetaData.getPreparedQuery line 3542.

Would appreicate if anyone can help clear this for me ie is it right for the
code to think that we are not in soft upgrade mode?

thanks,
Mamta

Mime
View raw message