From: Adriano d. S. F. <adr...@gm...> - 2009-11-14 20:34:54
|
Vlad Khorsun wrote: >> Ann W. Harrison wrote: >>> Here's the problem I see, and it may exist already. >>> >>> Create a table, which creates format 1 for that table. >>> Store a bunch of records. >>> >>> Add a NOT NULL field with a default value of 'ABC', >>> which creates format 2 for the table. The new format >>> includes the default value. >>> >>> Now if you read records for that table, the new field's >>> value is 'ABC'. >>> >> That's ok. >> >>> Now alter the table, changing the default value to '123', >>> creating a new format 3 which includes the new default >>> for that field. >>> >>> Read the same records again and the value is probably going >>> to be '123'. >>> >> If the record format is 2, it should return 'ABC'. If the record is updated and written in the >> format 3, 'ABC' should be written to the field so it doesn't catch the format 3 value when >> reading it. > > What if record still stored in format 1 ? > Records at format 1 (which does not have the field added in 2) should use the default value stored in format 2. So 'ABC' should be written when updating to format 3 too. Adriano |