mariadb/row
marko 60bbfd6d0b branches/innodb+: Clean up the buffering of purges. Instead of
traversing the index B-tree twice (first in BTR_WATCH_LEAF mode and
then in BTR_DELETE mode), let BTR_DELETE take care of checking that
the record can be purged, and either buffering or performing the
purge.

row_purge_poss_sec(): New function, to check if it is possible to
purge a secondary index record.  Refactored from
row_purge_remove_sec_if_poss_low().

row_purge_remove_sec_if_poss_nonbuffered(): Rename to
row_purge_remove_sec_if_poss_tree().  Remove the parameter mode
(always use BTR_MODIFY_TREE).  Use row_purge_poss_sec().

row_purge_remove_sec_if_poss_low(): Rename to
row_purge_remove_sec_if_poss_leaf().  Remove the parameter mode
(always use BTR_MODIFY_LEAF). Let row_search_index_entry() do all the
hard work.

btr_cur_t: Add purge_node, which will be needed by
btr_cur_search_to_nth_level() for BTR_DELETE.  Replace the flag value
BTR_CUR_ABORTED with BTR_CUR_DELETE_REF and BTR_CUR_DELETE_FAILED.

enum row_search_result, row_search_index_entry(): Replace
ROW_NOT_IN_POOL with ROW_NOT_DELETED_REF and ROW_NOT_DELETED.

btr_cur_search_to_nth_level(): Remove BTR_WATCH_LEAF.  As a side
effect, the adaptive hash index can be used in purge as well.  If
BTR_DELETE cannot be buffered, attempt btr_cur_optimistic_delete().
Either way, check row_purge_poss_sec().  Move the code to set
cursor->ibuf_count to get rid of another if (height == 0)
check. Eliminate the label loop_end.  Do not call ibuf_should_try()
twice.

ibuf_should_try(): Now that the successful calls to this function will
be halved, halve the magic constant that ibuf_flush_count will be
compared to, accordingly.

The changes regarding ibuf_should_try() were merged from branches/zip
r3515.

rb://60 approved by Heikki over IM
2008-12-12 12:59:48 +00:00
..
row0ext.c branches/innodb+: Merge revisions 2774:2799 from branches/zip: 2008-10-15 12:09:17 +00:00
row0ins.c branches/zip: Introduce UNIV_INTERN, a linkage specifier for InnoDB-global 2008-02-06 14:17:36 +00:00
row0merge.c branches/innodb+: Merge revisions 3180:3312 from branches/zip: 2008-11-28 14:58:51 +00:00
row0mysql.c branches/innodb+: Merge revisions 3312:3459 from branches/zip: 2008-12-09 11:09:06 +00:00
row0purge.c branches/innodb+: Clean up the buffering of purges. Instead of 2008-12-12 12:59:48 +00:00
row0row.c branches/innodb+: Clean up the buffering of purges. Instead of 2008-12-12 12:59:48 +00:00
row0sel.c branches/innodb+: Merge revisions 2774:2799 from branches/zip: 2008-10-15 12:09:17 +00:00
row0uins.c branches/innodb+: Clean up the buffering of purges. Instead of 2008-12-12 12:59:48 +00:00
row0umod.c branches/innodb+: Clean up the buffering of purges. Instead of 2008-12-12 12:59:48 +00:00
row0undo.c branches/zip: Introduce UNIV_INTERN, a linkage specifier for InnoDB-global 2008-02-06 14:17:36 +00:00
row0upd.c branches/innodb+: Clean up the buffering of purges. Instead of 2008-12-12 12:59:48 +00:00
row0vers.c branches/innodb+: Merge revisions 2986:3152 from branches/zip: 2008-11-20 11:53:53 +00:00