Skip to content

Commit

Permalink
remove dead code: fil_create_directory_for_tablename()
Browse files Browse the repository at this point in the history
  • Loading branch information
kevgs committed Jul 14, 2020
1 parent df1846a commit e3a6916
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 38 deletions.
31 changes: 0 additions & 31 deletions storage/innobase/fil/fil0fil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1920,37 +1920,6 @@ fil_space_acquire_for_io(ulint id)
return(space);
}

/********************************************************//**
Creates the database directory for a table if it does not exist yet. */
void
fil_create_directory_for_tablename(
/*===============================*/
const char* name) /*!< in: name in the standard
'databasename/tablename' format */
{
const char* namend;
char* path;
ulint len;

len = strlen(fil_path_to_mysql_datadir);
namend = strchr(name, '/');
ut_a(namend);
path = static_cast<char*>(
ut_malloc_nokey(len + ulint(namend - name) + 2));

memcpy(path, fil_path_to_mysql_datadir, len);
path[len] = '/';
memcpy(path + len + 1, name, ulint(namend - name));
path[len + ulint(namend - name) + 1] = 0;

os_normalize_path(path);

bool success = os_file_create_directory(path, false);
ut_a(success);

ut_free(path);
}

/** Write a log record about an operation on a tablespace file.
@param[in] type MLOG_FILE_NAME or MLOG_FILE_DELETE
or MLOG_FILE_CREATE2 or MLOG_FILE_RENAME2
Expand Down
7 changes: 0 additions & 7 deletions storage/innobase/include/fil0fil.h
Original file line number Diff line number Diff line change
Expand Up @@ -1177,13 +1177,6 @@ fil_space_t*
fil_space_keyrotate_next(fil_space_t* prev_space, bool remove)
MY_ATTRIBUTE((warn_unused_result));

/********************************************************//**
Creates the database directory for a table if it does not exist yet. */
void
fil_create_directory_for_tablename(
/*===============================*/
const char* name); /*!< in: name in the standard
'databasename/tablename' format */
/** Replay a file rename operation if possible.
@param[in] space_id tablespace identifier
@param[in] first_page_no first page number in the file
Expand Down

0 comments on commit e3a6916

Please sign in to comment.