summaryrefslogtreecommitdiff
path: root/storage/xtradb/dict/dict0load.c
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2010-09-03 19:42:54 +0200
committerunknown <knielsen@knielsen-hq.org>2010-09-03 19:42:54 +0200
commitc21a7a6bb2bed5f159dfba64e7a5220a5ee78cab (patch)
treeaab22730a36718adb824289458f98b86006f5c32 /storage/xtradb/dict/dict0load.c
parent401c69e49babc293da30f833c18673f5f071eca3 (diff)
parent9ec2d5b6e510b9a3ad2fd54c37eb302c0121f9e3 (diff)
downloadmariadb-git-c21a7a6bb2bed5f159dfba64e7a5220a5ee78cab.tar.gz
Merge XtraDB from Percona server 5.1.49-12 into MariaDB.
Diffstat (limited to 'storage/xtradb/dict/dict0load.c')
-rw-r--r--storage/xtradb/dict/dict0load.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/storage/xtradb/dict/dict0load.c b/storage/xtradb/dict/dict0load.c
index 528c3786254..0d8292cc2bf 100644
--- a/storage/xtradb/dict/dict0load.c
+++ b/storage/xtradb/dict/dict0load.c
@@ -223,7 +223,7 @@ loop:
is no index */
if (srv_stats_auto_update && dict_table_get_first_index(table)) {
- dict_update_statistics_low(table, TRUE);
+ dict_update_statistics_low(table, TRUE, FALSE);
}
dict_table_print_low(table);
@@ -317,7 +317,7 @@ dict_check_tablespaces_and_store_max_id(
dict_index_t* sys_index;
btr_pcur_t pcur;
const rec_t* rec;
- ulint max_space_id = 0;
+ ulint max_space_id;
mtr_t mtr;
mutex_enter(&(dict_sys->mutex));
@@ -328,6 +328,11 @@ dict_check_tablespaces_and_store_max_id(
sys_index = UT_LIST_GET_FIRST(sys_tables->indexes);
ut_a(!dict_table_is_comp(sys_tables));
+ max_space_id = mtr_read_ulint(dict_hdr_get(&mtr)
+ + DICT_HDR_MAX_SPACE_ID,
+ MLOG_4BYTES, &mtr);
+ fil_set_max_space_id_if_bigger(max_space_id);
+
btr_pcur_open_at_index_side(TRUE, sys_index, BTR_SEARCH_LEAF, &pcur,
TRUE, &mtr);
loop:
@@ -974,6 +979,7 @@ err_exit:
/* Try to open the tablespace */
if (!fil_open_single_table_tablespace(
TRUE, space,
+ flags == DICT_TF_COMPACT ? 0 :
flags & ~(~0 << DICT_TF_BITS), name)) {
/* We failed to find a sensible
tablespace file */