summaryrefslogtreecommitdiff
path: root/storage/xtradb/srv/srv0start.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/xtradb/srv/srv0start.cc')
-rw-r--r--storage/xtradb/srv/srv0start.cc32
1 files changed, 22 insertions, 10 deletions
diff --git a/storage/xtradb/srv/srv0start.cc b/storage/xtradb/srv/srv0start.cc
index e01537e8f73..bcd4bfbf495 100644
--- a/storage/xtradb/srv/srv0start.cc
+++ b/storage/xtradb/srv/srv0start.cc
@@ -705,7 +705,8 @@ create_log_files(
logfilename, SRV_LOG_SPACE_FIRST_ID,
fsp_flags_set_page_size(0, UNIV_PAGE_SIZE),
FIL_LOG,
- NULL /* no encryption yet */);
+ NULL /* no encryption yet */,
+ true /* this is create */);
ut_a(fil_validate());
logfile0 = fil_node_create(
@@ -727,7 +728,7 @@ create_log_files(
#ifdef UNIV_LOG_ARCHIVE
/* Create the file space object for archived logs. */
fil_space_create("arch_log_space", SRV_LOG_SPACE_FIRST_ID + 1,
- 0, FIL_LOG, NULL /* no encryption yet */);
+ 0, FIL_LOG, NULL /* no encryption yet */, true /* create */);
#endif
log_group_init(0, srv_n_log_files,
srv_log_file_size * UNIV_PAGE_SIZE,
@@ -853,7 +854,7 @@ open_or_create_data_files(
ulint space;
ulint rounded_size_pages;
char name[10000];
- fil_space_crypt_t* crypt_data;
+ fil_space_crypt_t* crypt_data=NULL;
if (srv_n_data_files >= 1000) {
@@ -1184,18 +1185,20 @@ check_first_page:
}
*sum_of_new_sizes += srv_data_file_sizes[i];
-
- crypt_data = fil_space_create_crypt_data(FIL_SPACE_ENCRYPTION_DEFAULT, FIL_DEFAULT_ENCRYPTION_KEY);
}
ret = os_file_close(files[i]);
ut_a(ret);
if (i == 0) {
+ if (!crypt_data) {
+ crypt_data = fil_space_create_crypt_data(FIL_SPACE_ENCRYPTION_DEFAULT, FIL_DEFAULT_ENCRYPTION_KEY);
+ }
+
flags = fsp_flags_set_page_size(0, UNIV_PAGE_SIZE);
+
fil_space_create(name, 0, flags, FIL_TABLESPACE,
- crypt_data);
- crypt_data = NULL;
+ crypt_data, (*create_new_db) == true);
}
ut_a(fil_validate());
@@ -1342,7 +1345,8 @@ srv_undo_tablespace_open(
/* Set the compressed page size to 0 (non-compressed) */
flags = fsp_flags_set_page_size(0, UNIV_PAGE_SIZE);
fil_space_create(name, space, flags, FIL_TABLESPACE,
- NULL /* no encryption */);
+ NULL /* no encryption */,
+ true /* create */);
ut_a(fil_validate());
@@ -2340,7 +2344,8 @@ innobase_start_or_create_for_mysql(void)
SRV_LOG_SPACE_FIRST_ID,
fsp_flags_set_page_size(0, UNIV_PAGE_SIZE),
FIL_LOG,
- NULL /* no encryption yet */);
+ NULL /* no encryption yet */,
+ true /* create */);
ut_a(fil_validate());
@@ -2362,7 +2367,8 @@ innobase_start_or_create_for_mysql(void)
/* Create the file space object for archived logs. Under
MySQL, no archiving ever done. */
fil_space_create("arch_log_space", SRV_LOG_SPACE_FIRST_ID + 1,
- 0, FIL_LOG, NULL /* no encryption yet */);
+ 0, FIL_LOG, NULL /* no encryption yet */,
+ true /* create */);
#endif /* UNIV_LOG_ARCHIVE */
log_group_init(0, i, srv_log_file_size * UNIV_PAGE_SIZE,
SRV_LOG_SPACE_FIRST_ID,
@@ -2772,6 +2778,12 @@ files_checked:
}
}
+ /* Create the SYS_ZIP_DICT system table */
+ err = dict_create_or_check_sys_zip_dict();
+ if (err != DB_SUCCESS) {
+ return(err);
+ }
+
srv_is_being_started = FALSE;
ut_a(trx_purge_state() == PURGE_STATE_INIT);