diff options
Diffstat (limited to 'extra')
-rw-r--r-- | extra/comp_err.c | 23 | ||||
-rw-r--r-- | extra/mariabackup/xtrabackup.cc | 16 | ||||
-rw-r--r-- | extra/my_print_defaults.c | 2 |
3 files changed, 17 insertions, 24 deletions
diff --git a/extra/comp_err.c b/extra/comp_err.c index 40562aeae5d..455f0d3c0d9 100644 --- a/extra/comp_err.c +++ b/extra/comp_err.c @@ -37,7 +37,7 @@ #define ERRORS_PER_RANGE 1000 #define MAX_SECTIONS 4 #define HEADER_LENGTH 32 /* Length of header in errmsg.sys */ -#define ERRMSG_VERSION 4 /* Version number of errmsg.sys */ +#define ERRMSG_VERSION 5 /* Version number of errmsg.sys */ #define DEFAULT_CHARSET_DIR "../sql/share/charsets" #define ER_PREFIX "ER_" #define ER_PREFIX2 "MARIA_ER_" @@ -85,7 +85,6 @@ struct languages { char *lang_long_name; /* full name of the language */ char *lang_short_name; /* abbreviation of the lang. */ - char *charset; /* Character set name */ struct languages *next_lang; /* Pointer to next language */ }; @@ -329,7 +328,7 @@ static int create_sys_files(struct languages *lang_head, uint error_count) { FILE *to; - uint csnum= 0, i, row_nr; + uint i, row_nr; ulong length; uchar head[HEADER_LENGTH]; char outfile[FN_REFLEN], *outfile_end; @@ -345,16 +344,6 @@ static int create_sys_files(struct languages *lang_head, */ for (tmp_lang= lang_head; tmp_lang; tmp_lang= tmp_lang->next_lang) { - - /* setting charset name */ - if (!(csnum= get_charset_number(tmp_lang->charset, MY_CS_PRIMARY, - MYF(MY_UTF8_IS_UTF8MB3)))) - { - fprintf(stderr, "Unknown charset '%s' in '%s'\n", tmp_lang->charset, - TXTFILE); - DBUG_RETURN(1); - } - outfile_end= strxmov(outfile, DATADIRECTORY, tmp_lang->lang_long_name, NullS); if (!my_stat(outfile, &stat_info,MYF(0))) @@ -410,7 +399,6 @@ static int create_sys_files(struct languages *lang_head, int2store(head + 10, max_error); /* Max error */ int2store(head + 12, row_nr); int2store(head + 14, section_count); - head[30]= csnum; my_fseek(to, 0l, MY_SEEK_SET, MYF(0)); if (my_fwrite(to, (uchar*) head, HEADER_LENGTH, MYF(MY_WME | MY_FNABP)) || @@ -450,7 +438,6 @@ static void clean_up(struct languages *lang_head, struct errors *error_head) next_language= tmp_lang->next_lang; my_free(tmp_lang->lang_short_name); my_free(tmp_lang->lang_long_name); - my_free(tmp_lang->charset); my_free(tmp_lang); } @@ -1113,12 +1100,6 @@ static struct languages *parse_charset_string(char *str) DBUG_RETURN(0); /* OOM: Fatal error */ DBUG_PRINT("info", ("short_name: %s", new_lang->lang_short_name)); - /* getting the charset name */ - str= skip_delimiters(str); - if (!(new_lang->charset= get_word(&str))) - DBUG_RETURN(0); /* Fatal error */ - DBUG_PRINT("info", ("charset: %s", new_lang->charset)); - /* skipping space, tab or "," */ str= skip_delimiters(str); } diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index 055e8ab85ec..05168d35a21 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -2271,8 +2271,14 @@ static bool innodb_init() /* Check if the data files exist or not. */ dberr_t err= srv_sys_space.check_file_spec(&create_new_db, 5U << 20); + if (create_new_db) + { + msg("mariadb-backup: InnoDB files do not exist"); + return true; + } + if (err == DB_SUCCESS) - err= srv_start(create_new_db); + err= srv_start(false); if (err != DB_SUCCESS) { @@ -2283,6 +2289,7 @@ static bool innodb_init() ut_ad(srv_force_recovery <= SRV_FORCE_IGNORE_CORRUPT); ut_ad(recv_no_log_write); buf_flush_sync(); + recv_sys.debug_free(); DBUG_ASSERT(!buf_pool.any_io_pending()); log_sys.close_file(); @@ -3464,7 +3471,9 @@ static void xb_load_single_table_tablespace(const char *dirname, if (err == DB_SUCCESS && file->space_id() != SRV_TMP_SPACE_ID) { space = fil_space_t::create( file->space_id(), file->flags(), - FIL_TYPE_TABLESPACE, NULL/* TODO: crypt_data */); + FIL_TYPE_TABLESPACE, nullptr/* TODO: crypt_data */, + FIL_ENCRYPTION_DEFAULT, + file->handle() != OS_FILE_CLOSED); ut_a(space != NULL); fil_node_t* node= space->add( @@ -5184,7 +5193,8 @@ exit: ut_ad(fil_space_t::physical_size(flags) == info.page_size); if (fil_space_t::create(info.space_id, flags, - FIL_TYPE_TABLESPACE, 0)) { + FIL_TYPE_TABLESPACE, 0, FIL_ENCRYPTION_DEFAULT, + true)) { *success = xb_space_create_file(real_name, info.space_id, flags, &file); } else { diff --git a/extra/my_print_defaults.c b/extra/my_print_defaults.c index 6aa60aa8ce8..6fc9f3f4d9b 100644 --- a/extra/my_print_defaults.c +++ b/extra/my_print_defaults.c @@ -51,6 +51,8 @@ static struct my_option my_long_options[] = #endif {"mysqld", 0, "Read the same set of groups that the mysqld binary does.", &opt_mysqld, &opt_mysqld, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"mariadbd", 0, "Read the same set of groups that the mariadbd binary does.", + &opt_mysqld, &opt_mysqld, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"no-defaults", 'n', "Return an empty string (useful for scripts).", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"help", '?', "Display this help message and exit.", |