Subject | Re[2]: [Firebird-Architect] Re[2]: [Firebird-devel] HEAD branch and ODS changes |
---|---|
Author | Nickolay Samofatov |
Post date | 2003-07-30T15:08:09Z |
Hello, Ann,
open for all V.2 features and ODS changes by Dmitry Emanov.
Pending commits are waiting for rollback of some of Blas' changes.
---------------------------------------------------------------
static void find_clump_space(
SLONG page_num,
WIN * window,
PAG * ppage,
USHORT type,
SSHORT len, UCHAR * entry, USHORT must_write)
{
/***********************************************
*
* f i n d _ c l u m p _ s p a c e
*
***********************************************
*
* Functional description
* Find space for the new clump.
* Add the entry at the end of clumplet list.
* Allocate a new page if required.
*
**************************************/
..... look if we have space of existing header pages ......
new_page = (PAG) DPM_allocate(tdbb, &new_window);
if (must_write)
CCH_MARK_MUST_WRITE(tdbb, &new_window);
else
CCH_MARK(tdbb, &new_window);
if (page_num == HEADER_PAGE) {
new_header = (HDR) new_page;
new_header->hdr_header.pag_type = pag_header;
new_header->hdr_end = HDR_SIZE;
new_header->hdr_page_size = dbb->dbb_page_size;
new_header->hdr_data[0] = HDR_end;
next_page = new_window.win_page;
end_addr = &new_header->hdr_end;
p = new_header->hdr_data;
}
..... put data to newly allocated header page ......
}
---------------------------------------------------------------
This function is used each time new entry is getting to be added
to header page clumplets.
> I'm concerned about making an ODS change in a minor version becauseV.1.6 is temporary version number, probably. This branch is declared
> backing up and restoring databases is a significant hassle. In the
> past, minor ODS changes were somtimes handled automatically - the engine
> would upgrade the database when it was openned. That was a disaster in
> several cases. There are a number of changes we could/should make to
> the ODS, including long object names, index keys and other index
> changes, variable length encoding of the runtime compression length ...
open for all V.2 features and ODS changes by Dmitry Emanov.
Pending commits are waiting for rollback of some of Blas' changes.
> One small point. The header page can not overflow. There's noThis is wrong at least for current codebase. Look:
> provision for a second header page in a single database file. Yes, in a
> multi-file database, there's one header page per file, but the first
> header page is independent of the secondary ones. That's (part of) the
> reason why the name of the third file is in the header of the second,
> the fourth in the header of the third, usw.
---------------------------------------------------------------
static void find_clump_space(
SLONG page_num,
WIN * window,
PAG * ppage,
USHORT type,
SSHORT len, UCHAR * entry, USHORT must_write)
{
/***********************************************
*
* f i n d _ c l u m p _ s p a c e
*
***********************************************
*
* Functional description
* Find space for the new clump.
* Add the entry at the end of clumplet list.
* Allocate a new page if required.
*
**************************************/
..... look if we have space of existing header pages ......
new_page = (PAG) DPM_allocate(tdbb, &new_window);
if (must_write)
CCH_MARK_MUST_WRITE(tdbb, &new_window);
else
CCH_MARK(tdbb, &new_window);
if (page_num == HEADER_PAGE) {
new_header = (HDR) new_page;
new_header->hdr_header.pag_type = pag_header;
new_header->hdr_end = HDR_SIZE;
new_header->hdr_page_size = dbb->dbb_page_size;
new_header->hdr_data[0] = HDR_end;
next_page = new_window.win_page;
end_addr = &new_header->hdr_end;
p = new_header->hdr_data;
}
..... put data to newly allocated header page ......
}
---------------------------------------------------------------
This function is used each time new entry is getting to be added
to header page clumplets.
> AnnNickolay Samofatov