diff options
author | unknown <knielsen@knielsen-hq.org> | 2009-08-03 22:09:53 +0200 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2009-08-03 22:09:53 +0200 |
commit | cb6a28aaf9acbaca39ff1ebc983f2b1058a4f585 (patch) | |
tree | 6736fb670438aa39f253531bb35dc425cae2a993 /storage/xtradb/include/dict0dict.ic | |
parent | e84748406cac825127279a16482756539267ec17 (diff) | |
parent | 237485ccd692cb3df5bac1ac74a00487f42bf93d (diff) | |
download | mariadb-git-cb6a28aaf9acbaca39ff1ebc983f2b1058a4f585.tar.gz |
Merge XtraDB 6 into MariaDB.
Diffstat (limited to 'storage/xtradb/include/dict0dict.ic')
-rw-r--r-- | storage/xtradb/include/dict0dict.ic | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/storage/xtradb/include/dict0dict.ic b/storage/xtradb/include/dict0dict.ic index 628d207b329..687e5f9fb13 100644 --- a/storage/xtradb/include/dict0dict.ic +++ b/storage/xtradb/include/dict0dict.ic @@ -723,6 +723,13 @@ dict_table_check_if_in_cache_low( HASH_SEARCH(name_hash, dict_sys->table_hash, table_fold, dict_table_t*, table, ut_ad(table->cached), !strcmp(table->name, table_name)); + + /* make young in table_LRU */ + if (table) { + UT_LIST_REMOVE(table_LRU, dict_sys->table_LRU, table); + UT_LIST_ADD_FIRST(table_LRU, dict_sys->table_LRU, table); + } + return(table); } @@ -776,6 +783,12 @@ dict_table_get_on_id_low( table = dict_load_table_on_id(table_id); } + /* make young in table_LRU */ + if (table) { + UT_LIST_REMOVE(table_LRU, dict_sys->table_LRU, table); + UT_LIST_ADD_FIRST(table_LRU, dict_sys->table_LRU, table); + } + ut_ad(!table || table->cached); /* TODO: should get the type information from MySQL */ |