branches/zip: Clean up the insert buffer subsystem.
Originally, there were provisions in InnoDB for multiple insert buffer B-trees, apparently one for each tablespace. When Heikki implemented innodb_file_per_table (multiple InnoDB tablespaces) in MySQL 4.1, he made the insert buffer live only in the system tablespace (space 0) but left the provisions in the code. When Osku Salerma implemented delete buffering, he also cleaned up the insert buffer subsystem so that only one insert buffer B-tree exists. This patch applies the clean-up to the InnoDB Plugin. Having a separate patch of the insert buffer clean-up should help us better compare the essential changes of the InnoDB Plugin and InnoDB+ and to track down bugs that are specific to InnoDB+. IBUF_SPACE_ID: New constant, defined as 0. ibuf_data_t: Remove. ibuf_t: Add the applicable fields from ibuf_data_t. There is only one insert buffer tree from now on. ibuf_page_low(), ibuf_page(): Merge to a single function ibuf_page(). fil_space_t: Remove ibuf_data. fil_space_get_ibuf_data(): Remove. There is only one ibuf_data, for space IBUF_SPACE_ID. fil_ibuf_init_at_db_start(): Remove. ibuf_init_at_db_start(): Fuse with ibuf_data_init_for_space(). ibuf_validate_low(): Remove. There is only one ibuf tree. ibuf_free_excess_pages(), ibuf_header_page_get(), ibuf_free_excess_pages(): Remove the parameter space, which was always 0. ibuf_tree_root_get(): Remove the parameters space and data. There is only one ibuf tree, for space IBUF_SPACE_ID. ibuf_data_sizes_update(): Rename to ibuf_size_update(), and remove the parameter data. There is only one ibuf data struct. ibuf_build_entry_pre_4_1_x(): New function, refactored from ibuf_build_entry_from_ibuf_rec(). ibuf_data_enough_free_for_insert(), ibuf_data_too_much_free(): Remove the parameter data. There is only one insert buffer tree. ibuf_add_free_page(), ibuf_remove_free_page(): Remove the parameters space and data. There is only one insert buffer tree. ibuf_get_merge_page_nos(): Add parenthesis, to reduce diffs to branches/innodb+. ibuf_contract_ext(): Do not pick an insert buffer tree at random. There is only one. ibuf_print(): Print the single insert buffer tree. rb://19 approved by Heikki on IM
Showing
This diff is collapsed.
Please register or sign in to comment