Mamta Satoor wrote:

> Hi,
>  
> I am working on writing the upgrade code for metadata.properties changes
> because of optimizer overrides syntax change. Also, I am trying to see
> if I can use org.apache.derbyTesting.upgradeTests.phaseTester (checked
> in by Dan couple months back) to test this particular upgrade scenario.
>  
> The changes for hard upgrade is not so bad because in
> DD_version.doFullUpgrade(), I can drop the stored prepared statements
> (using the method  dropJDBCMetadataSPSes) and then recreate them.
>  
> I am still struggling with soft upgrade, though. In soft upgrade mode,
> the sysstatements table will get metadata queries using old optimizer
> override syntax which is not recognized by 10.2 but because we are in
> soft upgrade mode, I can't update the sysstatements table to use the new
> syntax. So, somehow, I need to use the queries with the new syntax but
> w/o updating the system table so the pre-10.2 database can be used by
> pre-10.2 derby release. I decided to tackle this issue by avoiding going
> to sysstatements table for few of these DatabaseMetaData calls(which use
> the optimizer overrides in their sql) and instead, just read the sql
> from metadata.properties and execute the sql directly.

Assuming you can fix the "internal SQL" problem, a more generic solution
would be to always use the new sql from metadata.properties when in
soft-upgrade mode. That would help out future developers by removing
soft-upgrade as an issue for all metadata.

Dan.

Reply via email to