~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/buf/buf0lru.c

Merge Revision revid:svn-v4:16c675df-0fcb-4bc9-8058-dcc011a37293:branches/zip:6860 from MySQL InnoDB

Original revid:svn-v4:16c675df-0fcb-4bc9-8058-dcc011a37293:branches/zip:6860

Original Authors: jyang
Original commit message:
branches/zip: This is patch from Inaam that uses red-black tree
to speed up insertions into the flush_list and thus the recovery
process. The patch has been tested by Nokia.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1531
1531
                        if (b->state == BUF_BLOCK_ZIP_PAGE) {
1532
1532
                                buf_LRU_insert_zip_clean(b);
1533
1533
                        } else {
1534
 
                                buf_page_t* prev;
1535
 
 
1536
 
                                ut_ad(b->in_flush_list);
1537
 
                                ut_d(bpage->in_flush_list = FALSE);
1538
 
 
1539
 
                                prev = UT_LIST_GET_PREV(list, b);
1540
 
                                UT_LIST_REMOVE(list, buf_pool->flush_list, b);
1541
 
 
1542
 
                                if (prev) {
1543
 
                                        ut_ad(prev->in_flush_list);
1544
 
                                        UT_LIST_INSERT_AFTER(
1545
 
                                                list,
1546
 
                                                buf_pool->flush_list,
1547
 
                                                prev, b);
1548
 
                                } else {
1549
 
                                        UT_LIST_ADD_FIRST(
1550
 
                                                list,
1551
 
                                                buf_pool->flush_list,
1552
 
                                                b);
1553
 
                                }
 
1534
                                /* Relocate on buf_pool->flush_list. */
 
1535
                                buf_flush_relocate_on_flush_list(bpage, b);
1554
1536
                        }
1555
1537
 
1556
1538
                        bpage->zip.data = NULL;