summaryrefslogtreecommitdiff
path: root/storage/innobase/srv/srv0start.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/srv/srv0start.cc')
-rw-r--r--storage/innobase/srv/srv0start.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc
index f545b482220..cf936893e1b 100644
--- a/storage/innobase/srv/srv0start.cc
+++ b/storage/innobase/srv/srv0start.cc
@@ -241,6 +241,10 @@ static dberr_t create_log_file(bool create_new_db, lsn_t lsn,
return DB_READ_ONLY;
}
+ if (!log_set_capacity(srv_log_file_size_requested)) {
+ return(DB_ERROR);
+ }
+
/* Crashing after deleting the first file should be
recoverable. The buffer pool was clean, and we can simply
create log file from the scratch. */
@@ -293,9 +297,6 @@ static dberr_t create_log_file(bool create_new_db, lsn_t lsn,
renamed. */
log_sys.log.create();
- if (!log_set_capacity(srv_log_file_size_requested)) {
- return DB_ERROR;
- }
log_sys.log.open_file(logfile0);
if (!fil_system.sys_space->open(create_new_db)) {
@@ -1312,6 +1313,12 @@ dberr_t srv_start(bool create_new_db)
err = create_log_file(true, flushed_lsn, logfile0);
if (err != DB_SUCCESS) {
+ for (Tablespace::const_iterator
+ i = srv_sys_space.begin();
+ i != srv_sys_space.end(); i++) {
+ os_file_delete(innodb_data_file_key,
+ i->filepath());
+ }
return(srv_init_abort(err));
}
} else {