Description:
The comment for fil_op_log_parse_or_replay() says:
"TODO: If remote tablespaces are used,
ibbackup will only create tables in the default directory since MLOG_FILE_CREATE
and MLOG_FILE_CREATE2 only know the tablename, not the path."
What actually happens when fil_create_new_single_table_tablespace() is called from fil_op_log_parse_or_replay() for a remote tablespace is that dir_path is always NULL:
const char* path = NULL;
/* Create the database directory for name, if it does
not exist yet */
fil_create_directory_for_tablename(name);
if (fil_create_new_single_table_tablespace(
space_id, name, path, flags,
DICT_TF2_USE_TABLESPACE,
FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) {
ut_error;
}
but it is not expected to be NULL when has_data_dir is true:
} else if (has_data_dir) {
ut_ad(dir_path);
path = os_file_make_remote_pathname(dir_path, tablename, "ibd");
As a result, os_file_make_remote_pathname() crashes on the NULL argument to strrchr().
I don't have a test case, because InnoDB does not replay MLOG_FILE_CREATE2 on recovery, but it affects XtraBackup, see https://bugs.launchpad.net/percona-xtrabackup/+bug/1291299. MEB should also be affected.
How to repeat:
Examine the relevant code.