-
Mikael Ronström authored
UNDO log for disk data can get problem in synchronising the extent pages in the presence of drop table followed by create table where the new table gets the same table id as the old one. There is no way to see if the table is the same as the one described in the extent header or in the page header. There is also no room in the page header for extent pages and UNDO logs for checksums. Also no room for page version the page have. To alleviate we add also the create table schema version identifier (the 24 bits which is added to when table is created) to the page header and to the extent headers. With this we can ensure that we ignore pages that no longer belongs to any table and similarly we can ignore extents no longer owned by any table. The same applies to the UNDO_CREATE and UNDO_DROP and the UNDO LCP UNDO log record. We could read an old UNDO_DROP and thereby ignore extents for the new table. We need to add create table version to all of those 3 UNDO log records and also to ignore those when there is no table connected to the triplet (table_id, frag_id, create_schema_version). This change is not possible to do backwards compatible. So it will only apply to new tablespaces and new UNDO log file groups. The already existing will retain the old format and only the data pages will be marked with the new create_table_version. When a new tablespace or UNDO log file group is created it is not possible to downgrade to the old version again since that will not be able to read the new page formats. Since tables found during UNDO log execution isn't sure to be around in restart we need a getInstanceKey function that is allowed to fail. We ensure that writes to pages conform to the correct format even when the format read was according to a newer format. We ensure that extent pages, data pages and UNDO log pages has set the page header words correctly both at create and at load extent pages (to handle pages not properly initialised by older versions. For testing purposes it is possible to configure to use old disk data format (only works when compiled with ERROR_INSERT set). We have added one test case in autotest that uses this new format. Also some more config files for autotest added.
Mikael Ronström authoredUNDO log for disk data can get problem in synchronising the extent pages in the presence of drop table followed by create table where the new table gets the same table id as the old one. There is no way to see if the table is the same as the one described in the extent header or in the page header. There is also no room in the page header for extent pages and UNDO logs for checksums. Also no room for page version the page have. To alleviate we add also the create table schema version identifier (the 24 bits which is added to when table is created) to the page header and to the extent headers. With this we can ensure that we ignore pages that no longer belongs to any table and similarly we can ignore extents no longer owned by any table. The same applies to the UNDO_CREATE and UNDO_DROP and the UNDO LCP UNDO log record. We could read an old UNDO_DROP and thereby ignore extents for the new table. We need to add create table version to all of those 3 UNDO log records and also to ignore those when there is no table connected to the triplet (table_id, frag_id, create_schema_version). This change is not possible to do backwards compatible. So it will only apply to new tablespaces and new UNDO log file groups. The already existing will retain the old format and only the data pages will be marked with the new create_table_version. When a new tablespace or UNDO log file group is created it is not possible to downgrade to the old version again since that will not be able to read the new page formats. Since tables found during UNDO log execution isn't sure to be around in restart we need a getInstanceKey function that is allowed to fail. We ensure that writes to pages conform to the correct format even when the format read was according to a newer format. We ensure that extent pages, data pages and UNDO log pages has set the page header words correctly both at create and at load extent pages (to handle pages not properly initialised by older versions. For testing purposes it is possible to configure to use old disk data format (only works when compiled with ERROR_INSERT set). We have added one test case in autotest that uses this new format. Also some more config files for autotest added.
Loading