Implement INFORMATION_SCHEMA.INNODB_CHANGED_PAGES table

Registered by Vlad Lesin

The task is to implement INFORMATION_SCHEMA.INNODB_CHANGED_PAGES table which must contain a list of pages marked as "modified" by log tracking thread.

The table must contain the following columns:
space_id - space id of modified page,
page_id - id of modified page,
start_lsn, end_lsn - LSN interval of page changes, the specified page has been changed at least once between these two LSNs

When data from the table is requested, the code which fills I_S table sequentially reads data from bitmap files with 4k blocks, checks the crc of each block and if block is valid iterates through bits from bitmap and fills rows if I_S.

Notice that approach can require a lot of memory because the whole I_S table is created is memory before ouput and there is no way to limit it with SQL statements because they are applied to already formed table(except "WHERE"). Suppose we have 10TB database(~600M pages) and 50% of changed pages(~300M pages). So we have to create table of 300M rows in memory before output. The data in each row occupies 4*8 = 32 bytes. Plus service information (suppose the same size). So to output that table we need to use (rough) 300M*64 ~ 20GB of memory.

The size of memory for representation of the data can be limited with "WHERE" as condition pushdown is supported for I_S.

Also innodb_max_changed_pages plugin variable is used to limit count of rows the table can contain. This variable was renamed from innodb_changed_pages_limit as the latter name is a prefix of innodb_changed_pages causing MySQL command line option mishandling (bug 1105726).

Blueprint information

Status:
Complete
Approver:
Laurynas Biveinis
Priority:
High
Drafter:
Vlad Lesin
Direction:
Approved
Assignee:
Vlad Lesin
Definition:
Approved
Series goal:
Accepted for 5.1
Implementation:
Implemented
Milestone target:
milestone icon 5.1.65-14.0
Started by
Stewart Smith
Completed by
Stewart Smith

Sprints

Whiteboard

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.