Skip to content
Permalink
Browse files
MDEV-12266: fsp_flags_try_adjust(): Remove a lookup
fsp_header_init(): Take fil_space_t* as a parameter.
  • Loading branch information
dr-m committed Mar 29, 2018
1 parent 2ac8b1a commit c577192
Show file tree
Hide file tree
Showing 10 changed files with 168 additions and 200 deletions.
@@ -10,7 +10,7 @@
# buggy 10.1 files (by manually converting the flags in the files).

--disable_query_log
call mtr.add_suppression("InnoDB: adjusting FSP_SPACE_FLAGS of tablespace");
call mtr.add_suppression("InnoDB: adjusting FSP_SPACE_FLAGS of file ");
FLUSH TABLES;
--enable_query_log
let INNODB_PAGE_SIZE=`select @@innodb_page_size`;
@@ -14,7 +14,7 @@ call mtr.add_suppression("InnoDB: Ignoring tablespace for `test`.`td` because it
call mtr.add_suppression("InnoDB: Operating system error number .* in a file operation");
call mtr.add_suppression("InnoDB: The error means the system cannot find the path specified");
call mtr.add_suppression("InnoDB: If you are installing InnoDB, remember that you must create directories yourself");
call mtr.add_suppression("InnoDB: adjusting FSP_SPACE_FLAGS of tablespace");
call mtr.add_suppression("InnoDB: adjusting FSP_SPACE_FLAGS of file ");
FLUSH TABLES;
--enable_query_log

@@ -402,21 +402,23 @@ dict_build_table_def_step(
- page 3 will contain the root of the clustered index of
the table we create here. */

dberr_t err = fil_ibd_create(
dberr_t err;
fil_space_t* space = fil_ibd_create(
space_id, table->name.m_name, filepath, fsp_flags,
FIL_IBD_FILE_INITIAL_SIZE,
node->mode, node->key_id);
node->mode, node->key_id, &err);

ut_free(filepath);

if (err != DB_SUCCESS) {
return(err);
if (!space) {
ut_ad(err != DB_SUCCESS);
return err;
}

mtr_t mtr;
mtr.start();
mtr.set_named_space(table->space);
fsp_header_init(table->space, FIL_IBD_FILE_INITIAL_SIZE, &mtr);
mtr.set_named_space(space);
fsp_header_init(space, FIL_IBD_FILE_INITIAL_SIZE, &mtr);
mtr.commit();
} else {
ut_ad(dict_tf_get_rec_format(table->flags)

0 comments on commit c577192

Please sign in to comment.