Hello.
It would be useful if you could explain your planned changes in how generated column information will be stored on disk.
Purpose of changing was adding information whether autoincrement was ALWAYS or DEFAULT.
I decide to store it to COLUMNDEFAULT of SYSCOLUMNS table ,
regarding that column as definitive information of default value of column including autoincrement generation.
This decide results to next 2 modification.
modification-1:
Interface of DefaultInfo was modified. New propety of autoIncrementAlways was enabled to be retrieved from DefaultInfo.
Accordingly, external format of DefaultInfoImpl was modified.
modification-2:
Under influence of modification-1, DefaultInfo of column is considered to be exist if the column is autoincremented.
Originally DefaultInfo seems not to exist unless the column of table was created with defaultOption in defaultClause of the column.
http://incubator.apache.org/derby/javadoc/language/sqlgrammar.html#prod70
After my changing ,
DefaultInfo exists not only in above case
but also in the case column of table was created with generatedColumnOption in defaultCaluse of the column.
In brief, DefaultInfo always exists if the column of table was created with any defaultClause.
modification-1 results changing in database.
And modification-2 results the changing of nullOrNot of DefaultInfo in the program .
In soft upgrade mode, we need to avoid modification-1 ,then we need to avoid modification-2 in soft upgrade mode too.
To avoid modification-2 , changing behavior according to softupgrade mode or not is unavoidable.
Why I decided this approach was that I didn't want to add additional column to SYSCOLUMNS table.
I thought adding attribute to DefaultIinfo have less impact than addint new column to SYSCOLUMNS table.
And more, considering that autoincrement generated value is one kind of default value ,
I thought it is better to let DefaultInfo to have information about autoincrement.
Now, I came to thought changing DefaultInfo have more impact than adding column to SYSCOLUMNS table ....
//I wishes that DefaultInfo existed in either case of autoinrement and default !!!
Thinking the autoincrement is one kind of default, I think approach of adding attributes of autoincrement to DefaultInfo is not bad.
However , thinking impact of that modification, I think I MUST be at a loss correctly and find the answer for that.
If you have any opnion, please give me ... It will help me to be at a loss correctly...
Best regards.
/*
Tomohito Nakayama
[EMAIL PROTECTED]
[EMAIL PROTECTED] Naka
http://www5.ocn.ne.jp/~tomohito/TopPage.html*/
----- Original Message ----- From: "Daniel John Debrunner" <[EMAIL PROTECTED]>
To: "Derby Development" <[email protected]>
Sent: Wednesday, April 27, 2005 4:25 AM
Subject: Re: Question about softupgrade mode ..
TomohitoNakayama wrote:Hello
I have question about softupgrade mode... Is it allowed for implementation in parts such as SQL layer of engine to make conditional processing according to version in order to realize softupgrade mode ?
Typically the soft-upgrade check is made to disallow new features, e.g. at compile time a check would be made to disallow the BY DEFAULT option of the GENERATED syntax, unless the database had been upgraded to 10.1. See the checkVersion() call in CreateAliasNode.java
It is possible to also make the check and change the behaviour, I assume you mean storing the generated column information for the ALWAYS option in a different way in 10.1 and beyond, compared to 10.0. If you choose that direction then you may need to have hard-upgrade code that modifies the existing on-disk generated column information.
I'm working on DERBY-167 and, rule of nullOrNot about DefaultInfo and attiriubutes of DefaultInfo would be changed in this issue. Because updating those information on database affects working of previous version, conditional processing to work correctty on previous database would be unavoidable to realize softupgrade mode...
It would be useful if you could explain your planned changes in how generated column information will be stored on disk.
Dan.
-- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.10.3 - Release Date: 2005/04/25
-- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.10.3 - Release Date: 2005/04/25
