diff options
author | unknown <tsmith@quadxeon.mysql.com> | 2006-11-09 05:01:19 +0100 |
---|---|---|
committer | unknown <tsmith@quadxeon.mysql.com> | 2006-11-09 05:01:19 +0100 |
commit | 0ea6669e0498101dac8dac338100919f2768b96b (patch) | |
tree | 06753a2c6ffe49b9cc4d39f6179dc6510faf46a0 /storage/innobase/dict | |
parent | ecfb2a75540bcf8133707b4879e6860730d73af2 (diff) | |
download | mariadb-git-0ea6669e0498101dac8dac338100919f2768b96b.tar.gz |
Applied innodb-5.1-ss1004
Fixes:
- Bug #15815: Very poor performance with multiple queries running concurrently
- Bug #22868: 'Thread thrashing' with > 50 concurrent conns under an upd-intensive workloadw
- Bug #24089: Race condition in fil_flush_file_spaces()
storage/innobase/btr/btr0btr.c:
Applied innodb-5.1-ss1004
Revision r934:
btr_lift_page_up(): Set new page levels in all ancestor pages, not just
in the father page.
btr0btr.h: Add a BTR_MAX_LEVELS define.
storage/innobase/buf/buf0buf.c:
Applied innodb-5.1-ss1004
Revision r999:
Reduce buffer pool mutex contention under >= 4 big concurrent
CPU-bound SELECT queries. (Bug #22868)
Fix: replace the mutex by one mutex protecting the 'flush list'
(and the free list) and several mutexes protecting portions of the
buffer pool, where we keep several indivudual LRU lists of pages.
This patch is from Sunny Bains and Heikki Tuuri.
storage/innobase/buf/buf0flu.c:
Applied innodb-5.1-ss1004
Revision r999:
Reduce buffer pool mutex contention under >= 4 big concurrent
CPU-bound SELECT queries. (Bug #22868)
Fix: replace the mutex by one mutex protecting the 'flush list'
(and the free list) and several mutexes protecting portions of the
buffer pool, where we keep several indivudual LRU lists of pages.
This patch is from Sunny Bains and Heikki Tuuri.
storage/innobase/buf/buf0lru.c:
Applied innodb-5.1-ss1004
Revision r999:
Reduce buffer pool mutex contention under >= 4 big concurrent
CPU-bound SELECT queries. (Bug #22868)
Fix: replace the mutex by one mutex protecting the 'flush list'
(and the free list) and several mutexes protecting portions of the
buffer pool, where we keep several indivudual LRU lists of pages.
This patch is from Sunny Bains and Heikki Tuuri.
Revision r1004:
UT_LIST_REMOVE(): Invalidate the node pointers #ifdef UNIV_DEBUG.
buf_LRU_invalidate_tablespace(): Invoke UT_LIST_GET_PREV(LRU, block)
before UT_LIST_REMOVE(LRU, buf_pool->LRU, block).
storage/innobase/dict/dict0crea.c:
Applied innodb-5.1-ss1004
Revision r973:
Do not break the latching order in TRUNCATE TABLE.
dict_truncate_index_tree(): Replace parameter rec_t* rec with
btr_pcur_t* pcur. Reposition pcur before calling btr_create().
sync_thread_add_level(): Remove the relaxation of the assertion added in r968.
storage/innobase/fil/fil0fil.c:
Applied innodb-5.1-ss1004
Revision r1002:
fil_flush_file_spaces(): Copy the system->unflushed_spaces list to an
array while holding the mutex. This removes the crash-triggering
race condition that was introduced when fixing Bug 15653. (Bug #24089)
storage/innobase/include/btr0btr.h:
Applied innodb-5.1-ss1004
Revision r934:
btr_lift_page_up(): Set new page levels in all ancestor pages, not just
in the father page.
btr0btr.h: Add a BTR_MAX_LEVELS define.
storage/innobase/include/buf0buf.h:
Applied innodb-5.1-ss1004
Revision r999:
Reduce buffer pool mutex contention under >= 4 big concurrent
CPU-bound SELECT queries. (Bug #22868)
Fix: replace the mutex by one mutex protecting the 'flush list'
(and the free list) and several mutexes protecting portions of the
buffer pool, where we keep several indivudual LRU lists of pages.
This patch is from Sunny Bains and Heikki Tuuri.
storage/innobase/include/buf0buf.ic:
Applied innodb-5.1-ss1004
Revision r999:
Reduce buffer pool mutex contention under >= 4 big concurrent
CPU-bound SELECT queries. (Bug #22868)
Fix: replace the mutex by one mutex protecting the 'flush list'
(and the free list) and several mutexes protecting portions of the
buffer pool, where we keep several indivudual LRU lists of pages.
This patch is from Sunny Bains and Heikki Tuuri.
storage/innobase/include/dict0crea.h:
Applied innodb-5.1-ss1004
Revision r973:
Do not break the latching order in TRUNCATE TABLE.
dict_truncate_index_tree(): Replace parameter rec_t* rec with
btr_pcur_t* pcur. Reposition pcur before calling btr_create().
sync_thread_add_level(): Remove the relaxation of the assertion added in r968.
storage/innobase/include/ut0lst.h:
Applied innodb-5.1-ss1004
Revision r1004:
UT_LIST_REMOVE(): Invalidate the node pointers #ifdef UNIV_DEBUG.
buf_LRU_invalidate_tablespace(): Invoke UT_LIST_GET_PREV(LRU, block)
before UT_LIST_REMOVE(LRU, buf_pool->LRU, block).
storage/innobase/row/row0mysql.c:
Applied innodb-5.1-ss1004
Revision r973:
Do not break the latching order in TRUNCATE TABLE.
dict_truncate_index_tree(): Replace parameter rec_t* rec with
btr_pcur_t* pcur. Reposition pcur before calling btr_create().
sync_thread_add_level(): Remove the relaxation of the assertion added in r968.
Diffstat (limited to 'storage/innobase/dict')
-rw-r--r-- | storage/innobase/dict/dict0crea.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/storage/innobase/dict/dict0crea.c b/storage/innobase/dict/dict0crea.c index 75422b929b1..33e328d1e0b 100644 --- a/storage/innobase/dict/dict0crea.c +++ b/storage/innobase/dict/dict0crea.c @@ -700,8 +700,10 @@ dict_truncate_index_tree( /* out: new root page number, or FIL_NULL on failure */ dict_table_t* table, /* in: the table the index belongs to */ - rec_t* rec, /* in: record in the clustered index of - SYS_INDEXES table */ + btr_pcur_t* pcur, /* in/out: persistent cursor pointing to + record in the clustered index of + SYS_INDEXES table. The cursor may be + repositioned in this call. */ mtr_t* mtr) /* in: mtr having the latch on the record page. The mtr may be committed and restarted in this call. */ @@ -710,6 +712,7 @@ dict_truncate_index_tree( ulint space; ulint type; dulint index_id; + rec_t* rec; byte* ptr; ulint len; ulint comp; @@ -720,6 +723,7 @@ dict_truncate_index_tree( #endif /* UNIV_SYNC_DEBUG */ ut_a(!dict_table_is_comp(dict_sys->sys_indexes)); + rec = btr_pcur_get_rec(pcur); ptr = rec_get_nth_field_old(rec, DICT_SYS_INDEXES_PAGE_NO_FIELD, &len); ut_ad(len == 4); @@ -785,10 +789,11 @@ dict_truncate_index_tree( /* We will need to commit the mini-transaction in order to avoid deadlocks in the btr_create() call, because otherwise we would be freeing and allocating pages in the same mini-transaction. */ + btr_pcur_store_position(pcur, mtr); mtr_commit(mtr); - /* mtr_commit() will invalidate rec. */ - rec = NULL; + mtr_start(mtr); + btr_pcur_restore_position(BTR_MODIFY_LEAF, pcur, mtr); /* Find the index corresponding to this SYS_INDEXES record. */ for (index = UT_LIST_GET_FIRST(table->indexes); |