summaryrefslogtreecommitdiff
path: root/storage/innobase/dict/dict0load.c
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@oracle.com>2010-06-21 13:32:39 +0300
committerMarko Mäkelä <marko.makela@oracle.com>2010-06-21 13:32:39 +0300
commite475440f1b2e8cee42b8594b4f957c0cc96bb118 (patch)
tree585d085b7e4f9db058d1b109ef3813f28fb44ed0 /storage/innobase/dict/dict0load.c
parente4b19dd475348504a9fda38193f03e8b28cd8145 (diff)
downloadmariadb-git-e475440f1b2e8cee42b8594b4f957c0cc96bb118.tar.gz
Merge Bug #54658 fix from mysql-5.1-innodb:
------------------------------------------------------------ revno: 3515 revision-id: marko.makela@oracle.com-20100621094008-o9fa153s3f09merw parent: vasil.dimov@oracle.com-20100618085155-xnm469cbhedqea96 committer: Marko Mäkelä <marko.makela@oracle.com> branch nick: 5.1-innodb timestamp: Mon 2010-06-21 12:40:08 +0300 message: Bug #54658: InnoDB: Warning: allocated tablespace %lu, old maximum was 0 dict_check_tablespaces_and_store_max_id(): Initialize max_space_id and fil_system->max_assigned_id from DICT_HDR_MAX_SPACE_ID. fil_space_create(): Suppress the warning unless !recv_recovery_on (do not complain while applying the redo log).
Diffstat (limited to 'storage/innobase/dict/dict0load.c')
-rw-r--r--storage/innobase/dict/dict0load.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/storage/innobase/dict/dict0load.c b/storage/innobase/dict/dict0load.c
index 6bf2c1d9d81..949c10264d9 100644
--- a/storage/innobase/dict/dict0load.c
+++ b/storage/innobase/dict/dict0load.c
@@ -644,7 +644,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));
@@ -655,6 +655,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: