summaryrefslogtreecommitdiff
path: root/extra/mariabackup/xtrabackup.cc
diff options
context:
space:
mode:
Diffstat (limited to 'extra/mariabackup/xtrabackup.cc')
-rw-r--r--extra/mariabackup/xtrabackup.cc44
1 files changed, 10 insertions, 34 deletions
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc
index c53c9037bda..bb066daaba6 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>
#include <thr_timer.h>
int sys_var_init();
@@ -1960,7 +1961,7 @@ static bool innodb_init_param()
return false;
error:
- msg("mariabackup: innodb_init_param(): Error occured.\n");
+ msg("mariabackup: innodb_init_param(): Error occurred.\n");
return true;
}
@@ -2747,7 +2748,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);
@@ -5842,41 +5845,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
@@ -6151,6 +6125,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) {