db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mamta Satoor" <msat...@gmail.com>
Subject Re: Hard upgrade vs soft upgrade : Using 10.3 database against main codeline without upgrade=true flag
Date Wed, 29 Aug 2007 18:52:03 GMT
It appears the issue is that Derby engine code (main codeline) is still at
10.3 software version for the data dictionary
DataDictionaryImpl.boot method line 472
softwareVersion = new DD_Version(this, DataDictionary.DD_VERSION_DERBY_10_3

And that is why the soft upgrade code never kicked in because main codeline
does not think there is any upgrade allowed.

So,the solution is that the Derby main codeline needs to be changed to
reflect that it is not 10.3 data dictionary version.


On 8/29/07, Mamta Satoor <msatoor@gmail.com> wrote:
> 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

View raw message