diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index d566652f5f8..187be32735e 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -1367,7 +1367,7 @@ bool print_admin_msg(THD* thd, uint len, protocol->store(msgbuf, msg_length, system_charset_info); if (protocol->write()) { - sql_print_error("Failed on my_net_write, writing to stderr instead: %s\n", + sql_print_error("Failed on my_net_write, writing to stderr instead: %s", msgbuf); goto err; } @@ -9778,7 +9778,7 @@ void ha_partition::print_error(int error, myf errflag) append_row_to_str(str); /* Log this error, so the DBA can notice it and fix it! */ - sql_print_error("Table '%-192s' corrupted: row in wrong partition: %s\n" + sql_print_error("Table '%-192s' corrupted: row in wrong partition: %s" "Please REPAIR the table!", table->s->table_name.str, str.c_ptr_safe()); diff --git a/sql/handle_connections_win.cc b/sql/handle_connections_win.cc index b37b4dedad1..6724a2a1f30 100644 --- a/sql/handle_connections_win.cc +++ b/sql/handle_connections_win.cc @@ -353,7 +353,7 @@ struct Pipe_Listener : public Listener if (pipe_handle == INVALID_HANDLE_VALUE) { sql_perror("Create named pipe failed"); - sql_print_error("Aborting\n"); + sql_print_error("Aborting"); exit(1); } first_instance= false; @@ -552,4 +552,4 @@ void handle_connections_win() listener->cancel(); } Pipe_Listener::cleanup(); -} \ No newline at end of file +} diff --git a/sql/log.cc b/sql/log.cc index 68e34513d40..3857bb55340 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -6088,7 +6088,7 @@ MYSQL_BIN_LOG::write_state_to_file() goto end; err: - sql_print_error("Error writing binlog state to file '%s'.\n", buf); + sql_print_error("Error writing binlog state to file '%s'.", buf); if (log_inited) end_io_cache(&cache); end: @@ -6148,7 +6148,7 @@ MYSQL_BIN_LOG::read_state_from_file() goto end; err: - sql_print_error("Error reading binlog GTID state from file '%s'.\n", buf); + sql_print_error("Error reading binlog GTID state from file '%s'.", buf); end: if (log_inited) end_io_cache(&cache); @@ -7272,7 +7272,7 @@ MYSQL_BIN_LOG::write_binlog_checkpoint_event_already_locked(const char *name_arg ability to do crash recovery - crash recovery will just have to scan a bit more of the binlog than strictly necessary. */ - sql_print_error("Failed to write binlog checkpoint event to binary log\n"); + sql_print_error("Failed to write binlog checkpoint event to binary log"); } offset= my_b_tell(&log_file); diff --git a/sql/mysqld.cc b/sql/mysqld.cc index a338805795d..1bfb32ba0d5 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1305,10 +1305,10 @@ void Buffered_log::print() switch(m_level) { case ERROR_LEVEL: - sql_print_error("Buffered error: %s\n", m_message.c_ptr_safe()); + sql_print_error("Buffered error: %s", m_message.c_ptr_safe()); break; case WARNING_LEVEL: - sql_print_warning("Buffered warning: %s\n", m_message.c_ptr_safe()); + sql_print_warning("Buffered warning: %s", m_message.c_ptr_safe()); break; case INFORMATION_LEVEL: /* @@ -2032,7 +2032,7 @@ extern "C" void unireg_abort(int exit_code) if (opt_help) usage(); if (exit_code) - sql_print_error("Aborting\n"); + sql_print_error("Aborting"); /* Don't write more notes to the log to not hide error message */ disable_log_notes= 1; @@ -8645,7 +8645,7 @@ mysqld_get_one_option(int optid, const struct my_option *opt, char *argument) if (!(p= strstr(argument, "->"))) { - sql_print_error("Bad syntax in replicate-rewrite-db - missing '->'!\n"); + sql_print_error("Bad syntax in replicate-rewrite-db - missing '->'!"); return 1; } val= p--; @@ -8653,7 +8653,7 @@ mysqld_get_one_option(int optid, const struct my_option *opt, char *argument) *p-- = 0; if (p == argument) { - sql_print_error("Bad syntax in replicate-rewrite-db - empty FROM db!\n"); + sql_print_error("Bad syntax in replicate-rewrite-db - empty FROM db!"); return 1; } *val= 0; @@ -8662,7 +8662,7 @@ mysqld_get_one_option(int optid, const struct my_option *opt, char *argument) val++; if (!*val) { - sql_print_error("Bad syntax in replicate-rewrite-db - empty TO db!\n"); + sql_print_error("Bad syntax in replicate-rewrite-db - empty TO db!"); return 1; } @@ -8691,7 +8691,7 @@ mysqld_get_one_option(int optid, const struct my_option *opt, char *argument) { if (cur_rpl_filter->add_do_table(argument)) { - sql_print_error("Could not add do table rule '%s'!\n", argument); + sql_print_error("Could not add do table rule '%s'!", argument); return 1; } break; @@ -8700,7 +8700,7 @@ mysqld_get_one_option(int optid, const struct my_option *opt, char *argument) { if (cur_rpl_filter->add_wild_do_table(argument)) { - sql_print_error("Could not add do table rule '%s'!\n", argument); + sql_print_error("Could not add do table rule '%s'!", argument); return 1; } break; @@ -8709,7 +8709,7 @@ mysqld_get_one_option(int optid, const struct my_option *opt, char *argument) { if (cur_rpl_filter->add_wild_ignore_table(argument)) { - sql_print_error("Could not add ignore table rule '%s'!\n", argument); + sql_print_error("Could not add ignore table rule '%s'!", argument); return 1; } break; @@ -8718,7 +8718,7 @@ mysqld_get_one_option(int optid, const struct my_option *opt, char *argument) { if (cur_rpl_filter->add_ignore_table(argument)) { - sql_print_error("Could not add ignore table rule '%s'!\n", argument); + sql_print_error("Could not add ignore table rule '%s'!", argument); return 1; } break; @@ -9075,7 +9075,7 @@ static int get_options(int *argc_ptr, char ***argv_ptr) if (ft_boolean_check_syntax_string((uchar*) ft_boolean_syntax)) { - sql_print_error("Invalid ft-boolean-syntax string: %s\n", + sql_print_error("Invalid ft-boolean-syntax string: %s", ft_boolean_syntax); return 1; } diff --git a/sql/threadpool_generic.cc b/sql/threadpool_generic.cc index a306822b1f1..641d01645ba 100644 --- a/sql/threadpool_generic.cc +++ b/sql/threadpool_generic.cc @@ -1694,7 +1694,7 @@ int TP_pool_generic::set_pool_size(uint size) success= (group->pollfd != INVALID_HANDLE_VALUE); if(!success) { - sql_print_error("io_poll_create() failed, errno=%d\n", errno); + sql_print_error("io_poll_create() failed, errno=%d", errno); } } mysql_mutex_unlock(&group->mutex);