3 messages in com.mysql.lists.internalsRe: Does THE INDEX PAGE In page0page....
FromSent OnAttachments
Gu Lei(Tech)Oct 8, 2007 6:55 pm 
Marko MäkeläOct 8, 2007 11:15 pm 
Gu Lei(Tech)Oct 8, 2007 11:30 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Does THE INDEX PAGE In page0page.c mean secondary indexActions...
From:Marko Mäkelä (mark@oracle.com)
Date:Oct 8, 2007 11:15:33 pm
List:com.mysql.lists.internals

On Tue, Oct 09, 2007 at 09:55:54AM +0800, Gu Lei(Tech) wrote:

Hello everyone

In page0page.c there is description about THE INDEX PAGE.

Does THE INDEX PAGE mean secondary index or cluster index ?

It means any B-tree node in InnoDB. That includes secondary indexes, clustered indexes, and the insert buffer B-tree.

As far as page0page.c is concerned, there is no difference between clustered index records and secondary index records. The format of clustered index records on a B-tree leaf page is as follows:

<primary key columns>, DB_TRX_ID, DB_ROLL_PTR, <other columns>

The format of secondary index records on a B-tree leaf page is as follows:

<secondary key columns>, <primary key columns>

On a non-leaf page of the index B-tree, the format is like this:

<primary key columns>, <node ptr>

or

<secondary key columns>, <node ptr>

where <node ptr> is a 32-bit integer that points to a B-tree page one level deeper (that is, another non-leaf page, or a leaf page).

When there is no primary key, InnoDB generates a 6-byte sequence number, DB_ROW_ID. When the primary key includes column prefixes, the full columns are included in <other columns>.

Thanks.

You're welcome,