diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-12-12 14:41:51 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-12-12 14:41:51 +0200 |
commit | 0a20e5ab77f8a6532b41ea2518626397059ccf42 (patch) | |
tree | 1ef90ec718bc16d80ca65eb89537f697e1482f09 /extra/mariabackup | |
parent | e0f9540bcc6ab1618b6fd475f02e019401c4c295 (diff) | |
parent | beec9c0e19284a0e50d3629f4cb2486007b0333b (diff) | |
download | mariadb-git-0a20e5ab77f8a6532b41ea2518626397059ccf42.tar.gz |
Merge 10.2 into 10.3
Diffstat (limited to 'extra/mariabackup')
-rw-r--r-- | extra/mariabackup/xtrabackup.cc | 42 |
1 files changed, 9 insertions, 33 deletions
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index 0af0e8eae7b..0c2ec0bed18 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -102,6 +102,7 @@ Street, Fifth Floor, Boston, MA 02110-1335 USA #include <srv0srv.h> #include <crc_glue.h> #include <log.h> +#include <derror.h> int sys_var_init(); @@ -2754,7 +2755,7 @@ static bool xtrabackup_copy_logfile(bool last = false) log_mutex_exit(); if (!start_lsn) { - msg(recv_sys->found_corrupt_log + die(recv_sys->found_corrupt_log ? "xtrabackup_copy_logfile() failed: corrupt log." : "xtrabackup_copy_logfile() failed."); return true; @@ -4226,6 +4227,8 @@ fail_before_log_copying_thread_start: if (xtrabackup_copy_logfile()) goto fail_before_log_copying_thread_start; + DBUG_MARIABACKUP_EVENT("before_innodb_log_copy_thread_started",0); + log_copying_stop = os_event_create(0); os_thread_create(log_copying_thread, NULL, &log_copying_thread_id); @@ -5851,41 +5854,12 @@ extern void init_signals(void); #include <sql_locale.h> -/* Messages . Avoid loading errmsg.sys file */ + void setup_error_messages() { - static const char *my_msgs[ERRORS_PER_RANGE]; - static const char **all_msgs[] = { my_msgs, my_msgs, my_msgs, my_msgs }; my_default_lc_messages = &my_locale_en_US; - my_default_lc_messages->errmsgs->errmsgs = all_msgs; - - /* Populate the necessary error messages */ - struct { - int id; - const char *fmt; - } - xb_msgs[] = - { - { ER_DATABASE_NAME,"Database" }, - { ER_TABLE_NAME,"Table"}, - { ER_PARTITION_NAME, "Partition" }, - { ER_SUBPARTITION_NAME, "Subpartition" }, - { ER_TEMPORARY_NAME, "Temporary"}, - { ER_RENAMED_NAME, "Renamed"}, - { ER_CANT_FIND_DL_ENTRY, "Can't find symbol '%-.128s' in library"}, - { ER_CANT_OPEN_LIBRARY, "Can't open shared library '%-.192s' (errno: %d, %-.128s)" }, - { ER_OUTOFMEMORY, "Out of memory; restart server and try again (needed %d bytes)" }, - { ER_CANT_OPEN_LIBRARY, "Can't open shared library '%-.192s' (errno: %d, %-.128s)" }, - { ER_UDF_NO_PATHS, "No paths allowed for shared library" }, - { ER_CANT_INITIALIZE_UDF,"Can't initialize function '%-.192s'; %-.80s"}, - { ER_PLUGIN_IS_NOT_LOADED,"Plugin '%-.192s' is not loaded" } - }; - - for (int i = 0; i < (int)array_elements(all_msgs); i++) - all_msgs[0][i] = "Unknown error"; - - for (int i = 0; i < (int)array_elements(xb_msgs); i++) - all_msgs[0][xb_msgs[i].id - ER_ERROR_FIRST] = xb_msgs[i].fmt; + if (init_errmessage()) + die("could not initialize error messages"); } void @@ -6157,6 +6131,8 @@ int main(int argc, char **argv) (void) pthread_key_delete(THR_THD); logger.cleanup_base(); + cleanup_errmsgs(); + free_error_messages(); mysql_mutex_destroy(&LOCK_error_log); if (status == EXIT_SUCCESS) { |