summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2018-01-04 16:21:18 +0200
committerMonty <monty@mariadb.org>2018-01-04 16:24:09 +0200
commit5e0b13d1734942d860416ed1b51f7dd75760e020 (patch)
treec4af4ad467c87748e7aaba032902ef7d4f49eb9c /sql
parentc584a496d7000def48b8aad1f065c07f147998a3 (diff)
downloadmariadb-git-5e0b13d1734942d860416ed1b51f7dd75760e020.tar.gz
Fixed wrong arguments to printf and related functions
Other things, mainly to get create_mysqld_error_find_printf_error tool to work: - Added protection to not include mysqld_error.h twice - Include "unireg.h" instead of "mysqld_error.h" in server - Added protection if ER_XX messages are already defined - Removed wrong calls to my_error(ER_OUTOFMEMORY) as my_malloc() and my_alloc will do this automatically - Added missing %s to ER_DUP_QUERY_NAME - Removed old and wrong calls to my_strerror() when using MY_ERROR_ON_RENAME (wrong merge) - Fixed deadlock error message from Galera. Before the extra information given to ER_LOCK_DEADLOCK was missing because ER_LOCK_DEADLOCK doesn't provide any extra information. I kept #ifdef mysqld_error_find_printf_error_used in sql_acl.h to make it easy to do this kind of check again in the future
Diffstat (limited to 'sql')
-rw-r--r--sql/field.cc6
-rw-r--r--sql/log_event.cc9
-rw-r--r--sql/mdl.cc2
-rw-r--r--sql/opt_range.cc6
-rw-r--r--sql/rpl_gtid.cc6
-rw-r--r--sql/share/errmsg-utf8.txt2
-rw-r--r--sql/slave.cc2
-rw-r--r--sql/sql_acl.cc9
-rw-r--r--sql/sql_acl.h4
-rw-r--r--sql/sql_connect.cc2
-rw-r--r--sql/sql_digest.cc2
-rw-r--r--sql/sql_parse.cc9
-rw-r--r--sql/sql_partition_admin.cc24
-rw-r--r--sql/sql_prepare.cc4
-rw-r--r--sql/sql_repl.cc10
-rw-r--r--sql/sql_show.cc2
-rw-r--r--sql/sql_table.cc7
-rw-r--r--sql/sql_yacc.yy2
-rw-r--r--sql/sys_vars.cc6
-rw-r--r--sql/wsrep_mysqld.cc4
-rw-r--r--sql/wsrep_var.cc2
21 files changed, 53 insertions, 67 deletions
diff --git a/sql/field.cc b/sql/field.cc
index b4353e33df6..61045cdacc0 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -9948,7 +9948,7 @@ bool Column_definition::check(THD *thd)
if (decimals >= NOT_FIXED_DEC)
{
my_error(ER_TOO_BIG_SCALE, MYF(0), static_cast<ulonglong>(decimals),
- field_name, static_cast<ulong>(NOT_FIXED_DEC - 1));
+ field_name, static_cast<uint>(NOT_FIXED_DEC - 1));
DBUG_RETURN(TRUE);
}
my_decimal_trim(&length, &decimals);
@@ -10006,7 +10006,7 @@ bool Column_definition::check(THD *thd)
if (decimals != NOT_FIXED_DEC && decimals >= FLOATING_POINT_DECIMALS)
{
my_error(ER_TOO_BIG_SCALE, MYF(0), static_cast<ulonglong>(decimals),
- field_name, static_cast<ulong>(FLOATING_POINT_DECIMALS-1));
+ field_name, static_cast<uint>(FLOATING_POINT_DECIMALS-1));
DBUG_RETURN(TRUE);
}
break;
@@ -10026,7 +10026,7 @@ bool Column_definition::check(THD *thd)
if (decimals != NOT_FIXED_DEC && decimals >= FLOATING_POINT_DECIMALS)
{
my_error(ER_TOO_BIG_SCALE, MYF(0), static_cast<ulonglong>(decimals),
- field_name, static_cast<ulong>(FLOATING_POINT_DECIMALS-1));
+ field_name, static_cast<uint>(FLOATING_POINT_DECIMALS-1));
DBUG_RETURN(TRUE);
}
break;
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 2a9e6493c5e..bd6d325b3ef 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -18,7 +18,6 @@
#include <my_global.h>
#include "sql_priv.h"
-#include "mysqld_error.h"
#ifndef MYSQL_CLIENT
#include "unireg.h"
@@ -44,6 +43,8 @@
#include <strfunc.h>
#include "compat56.h"
#include "wsrep_mysqld.h"
+#else
+#include "mysqld_error.h"
#endif /* MYSQL_CLIENT */
#include <my_bitmap.h>
@@ -1914,9 +1915,9 @@ err:
#endif
if (event.length() >= OLD_HEADER_LEN)
sql_print_error("Error in Log_event::read_log_event(): '%s',"
- " data_len: %lu, event_type: %d", error,
- uint4korr(&event[EVENT_LEN_OFFSET]),
- (uchar)event[EVENT_TYPE_OFFSET]);
+ " data_len: %lu, event_type: %u", error,
+ (ulong) uint4korr(&event[EVENT_LEN_OFFSET]),
+ (uint) (uchar)event[EVENT_TYPE_OFFSET]);
else
sql_print_error("Error in Log_event::read_log_event(): '%s'", error);
/*
diff --git a/sql/mdl.cc b/sql/mdl.cc
index 25809c3d9cc..f5c5d06328d 100644
--- a/sql/mdl.cc
+++ b/sql/mdl.cc
@@ -19,7 +19,7 @@
#include "sql_array.h"
#include "rpl_rli.h"
#include <lf.h>
-#include <mysqld_error.h>
+#include "unireg.h"
#include <mysql/plugin.h>
#include <mysql/service_thd_wait.h>
#include <mysql/psi/mysql_stage.h>
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index 560e24e33c5..cc5746925a2 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -10241,8 +10241,8 @@ void SEL_ARG::test_use_count(SEL_ARG *root)
ulong count=count_key_part_usage(root,pos->next_key_part);
if (count > pos->next_key_part->use_count)
{
- sql_print_information("Use_count: Wrong count for key at %p, %lu "
- "should be %lu", (long unsigned int)pos,
+ sql_print_information("Use_count: Wrong count for key at %p: %lu "
+ "should be %lu", pos,
pos->next_key_part->use_count, count);
return;
}
@@ -10251,7 +10251,7 @@ void SEL_ARG::test_use_count(SEL_ARG *root)
}
if (e_count != elements)
sql_print_warning("Wrong use count: %u (should be %u) for tree at %p",
- e_count, elements, (long unsigned int) this);
+ e_count, elements, this);
}
#endif
diff --git a/sql/rpl_gtid.cc b/sql/rpl_gtid.cc
index b24bcaf0879..2a0ac9a465f 100644
--- a/sql/rpl_gtid.cc
+++ b/sql/rpl_gtid.cc
@@ -1927,10 +1927,7 @@ slave_connection_state::load(char *slave_request, size_t len)
for (;;)
{
if (!(rec= (uchar *)my_malloc(sizeof(entry), MYF(MY_WME))))
- {
- my_error(ER_OUTOFMEMORY, MYF(0), sizeof(*gtid));
return 1;
- }
gtid= &((entry *)rec)->gtid;
if (gtid_parser_helper(&p, end, gtid))
{
@@ -2547,10 +2544,7 @@ gtid_waiting::get_entry(uint32 domain_id)
return e;
if (!(e= (hash_element *)my_malloc(sizeof(*e), MYF(MY_WME))))
- {
- my_error(ER_OUTOFMEMORY, MYF(0), sizeof(*e));
return NULL;
- }
if (init_queue(&e->queue, 8, offsetof(queue_element, wait_seq_no), 0,
cmp_queue_elem, NULL, 1+offsetof(queue_element, queue_idx), 1))
diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt
index dfb3bf970d5..ade9d53cdb7 100644
--- a/sql/share/errmsg-utf8.txt
+++ b/sql/share/errmsg-utf8.txt
@@ -7570,7 +7570,7 @@ ER_WITH_COL_WRONG_LIST
ER_TOO_MANY_DEFINITIONS_IN_WITH_CLAUSE
eng "Too many WITH elements in WITH clause"
ER_DUP_QUERY_NAME
- eng "Duplicate query name in WITH clause"
+ eng "Duplicate query name in WITH clause '%s'"
ER_RECURSIVE_WITHOUT_ANCHORS
eng "No anchors for recursive WITH element '%s'"
ER_UNACCEPTABLE_MUTUAL_RECURSION
diff --git a/sql/slave.cc b/sql/slave.cc
index 19905841a2c..9c6e8ebc200 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -41,7 +41,7 @@
#include <sql_common.h>
#include <errmsg.h>
#include <ssl_compat.h>
-#include <mysqld_error.h>
+#include "unireg.h"
#include <mysys_err.h>
#include "rpl_handler.h"
#include <signal.h>
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 34c28e95e89..1a2c7fc302f 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -1651,7 +1651,7 @@ static bool fix_lex_user(THD *thd, LEX_USER *user)
if (user->pwhash.length && user->pwhash.length != check_length)
{
- my_error(ER_PASSWD_LENGTH, MYF(0), check_length);
+ my_error(ER_PASSWD_LENGTH, MYF(0), (int) check_length);
return true;
}
@@ -2610,7 +2610,7 @@ static int check_user_can_set_role(const char *user, const char *host,
acl_user= find_user_wild(host, user, ip);
if (acl_user == NULL)
{
- my_error(ER_INVALID_CURRENT_USER, MYF(0), rolename);
+ my_error(ER_INVALID_CURRENT_USER, MYF(0));
result= -1;
}
else if (access)
@@ -8557,10 +8557,7 @@ bool mysql_show_create_user(THD *thd, LEX_USER *lex_user)
strxmov(buff, "CREATE USER for ", username, "@", hostname, NullS);
Item_string *field = new (thd->mem_root) Item_string_ascii(thd, "", 0);
if (!field)
- {
- my_error(ER_OUTOFMEMORY, MYF(0));
- DBUG_RETURN(true);
- }
+ DBUG_RETURN(true); // Error given my my_alloc()
field->name= buff;
field->max_length= sizeof(buff);
diff --git a/sql/sql_acl.h b/sql/sql_acl.h
index 8d233fd3d0a..aeda2696894 100644
--- a/sql/sql_acl.h
+++ b/sql/sql_acl.h
@@ -190,8 +190,12 @@ extern LEX_STRING current_user_and_current_role;
static inline int access_denied_error_code(int passwd_used)
{
+#ifdef mysqld_error_find_printf_error_used
+ return 0;
+#else
return passwd_used == 2 ? ER_ACCESS_DENIED_NO_PASSWORD_ERROR
: ER_ACCESS_DENIED_ERROR;
+#endif
}
diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc
index ea4a3b47e5b..b4131614adb 100644
--- a/sql/sql_connect.cc
+++ b/sql/sql_connect.cc
@@ -1089,7 +1089,7 @@ bool login_connection(THD *thd)
/* Updates global user connection stats. */
if (increment_connection_count(thd, TRUE))
{
- my_error(ER_OUTOFMEMORY, MYF(0), 2*sizeof(USER_STATS));
+ my_error(ER_OUTOFMEMORY, MYF(0), (int) (2*sizeof(USER_STATS)));
error= 1;
goto exit;
}
diff --git a/sql/sql_digest.cc b/sql/sql_digest.cc
index 6605d0af0a9..b7ee3c4ffea 100644
--- a/sql/sql_digest.cc
+++ b/sql/sql_digest.cc
@@ -20,7 +20,7 @@
#include "my_global.h"
#include "my_md5.h"
-#include "mysqld_error.h"
+#include "unireg.h"
#include "sql_string.h"
#include "sql_class.h"
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 391972ea89a..f00c74b155c 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -1562,7 +1562,8 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
if (thd->wsrep_conflict_state == ABORTED &&
command != COM_STMT_CLOSE && command != COM_QUIT)
{
- my_error(ER_LOCK_DEADLOCK, MYF(0), "wsrep aborted transaction");
+ my_message(ER_LOCK_DEADLOCK, "Deadlock: wsrep aborted transaction",
+ MYF(0));
WSREP_DEBUG("Deadlock error for: %s", thd->query());
mysql_mutex_unlock(&thd->LOCK_wsrep_thd);
thd->reset_killed();
@@ -2285,7 +2286,8 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
if (server_command_flags[subcommand] & CF_NO_COM_MULTI)
{
- my_error(ER_BAD_COMMAND_IN_MULTI, MYF(0), command_name[subcommand]);
+ my_error(ER_BAD_COMMAND_IN_MULTI, MYF(0),
+ command_name[subcommand].str);
goto com_multi_end;
}
@@ -7760,7 +7762,8 @@ static void wsrep_mysql_parse(THD *thd, char *rawbuf, uint length,
(longlong) thd->thread_id, is_autocommit,
thd->wsrep_retry_counter,
thd->variables.wsrep_retry_autocommit, thd->query());
- my_error(ER_LOCK_DEADLOCK, MYF(0), "wsrep aborted transaction");
+ my_message(ER_LOCK_DEADLOCK, "Deadlock: wsrep aborted transaction",
+ MYF(0));
thd->reset_killed();
thd->wsrep_conflict_state= NO_CONFLICT;
if (thd->wsrep_conflict_state != REPLAYING)
diff --git a/sql/sql_partition_admin.cc b/sql/sql_partition_admin.cc
index 41555306da7..1f9ee32ba73 100644
--- a/sql/sql_partition_admin.cc
+++ b/sql/sql_partition_admin.cc
@@ -378,17 +378,13 @@ static bool exchange_name_with_ddl_log(THD *thd,
*/
/* call rename table from table to tmp-name */
DBUG_EXECUTE_IF("exchange_partition_fail_3",
- my_error(ER_ERROR_ON_RENAME, MYF(0),
- name, tmp_name, 0, "n/a");
+ my_error(ER_ERROR_ON_RENAME, MYF(0), name, tmp_name, 0);
error_set= TRUE;
goto err_rename;);
DBUG_EXECUTE_IF("exchange_partition_abort_3", DBUG_SUICIDE(););
if (file->ha_rename_table(name, tmp_name))
{
- char errbuf[MYSYS_STRERROR_SIZE];
- my_strerror(errbuf, sizeof(errbuf), my_errno);
- my_error(ER_ERROR_ON_RENAME, MYF(0), name, tmp_name,
- my_errno, errbuf);
+ my_error(ER_ERROR_ON_RENAME, MYF(0), name, tmp_name, my_errno);
error_set= TRUE;
goto err_rename;
}
@@ -399,17 +395,13 @@ static bool exchange_name_with_ddl_log(THD *thd,
/* call rename table from partition to table */
DBUG_EXECUTE_IF("exchange_partition_fail_5",
- my_error(ER_ERROR_ON_RENAME, MYF(0),
- from_name, name, 0, "n/a");
+ my_error(ER_ERROR_ON_RENAME, MYF(0), from_name, name, 0);
error_set= TRUE;
goto err_rename;);
DBUG_EXECUTE_IF("exchange_partition_abort_5", DBUG_SUICIDE(););
if (file->ha_rename_table(from_name, name))
{
- char errbuf[MYSYS_STRERROR_SIZE];
- my_strerror(errbuf, sizeof(errbuf), my_errno);
- my_error(ER_ERROR_ON_RENAME, MYF(0), from_name, name,
- my_errno, errbuf);
+ my_error(ER_ERROR_ON_RENAME, MYF(0), from_name, name, my_errno);
error_set= TRUE;
goto err_rename;
}
@@ -420,17 +412,13 @@ static bool exchange_name_with_ddl_log(THD *thd,
/* call rename table from tmp-nam to partition */
DBUG_EXECUTE_IF("exchange_partition_fail_7",
- my_error(ER_ERROR_ON_RENAME, MYF(0),
- tmp_name, from_name, 0, "n/a");
+ my_error(ER_ERROR_ON_RENAME, MYF(0), tmp_name, from_name, 0);
error_set= TRUE;
goto err_rename;);
DBUG_EXECUTE_IF("exchange_partition_abort_7", DBUG_SUICIDE(););
if (file->ha_rename_table(tmp_name, from_name))
{
- char errbuf[MYSYS_STRERROR_SIZE];
- my_strerror(errbuf, sizeof(errbuf), my_errno);
- my_error(ER_ERROR_ON_RENAME, MYF(0), tmp_name, from_name,
- my_errno, errbuf);
+ my_error(ER_ERROR_ON_RENAME, MYF(0), tmp_name, from_name, my_errno);
error_set= TRUE;
goto err_rename;
}
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index ae6f0e8f63d..be78a76152e 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -2287,10 +2287,8 @@ static int mysql_test_handler_read(Prepared_statement *stmt,
if (!stmt->is_sql_prepare())
{
if (!lex->result && !(lex->result= new (stmt->mem_root) select_send(thd)))
- {
- my_error(ER_OUTOFMEMORY, MYF(0), sizeof(select_send));
DBUG_RETURN(1);
- }
+
if (send_prep_stmt(stmt, ha_table->fields.elements) ||
lex->result->send_result_set_metadata(ha_table->fields, Protocol::SEND_EOF) ||
thd->protocol->flush())
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index 071d33cc3b9..78034badf8c 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -865,7 +865,6 @@ get_binlog_list(MEM_ROOT *memroot)
!(e->name= strmake_root(memroot, fname, length)))
{
mysql_bin_log.unlock_index();
- my_error(ER_OUTOFMEMORY, MYF(0), length + 1 + sizeof(*e));
DBUG_RETURN(NULL);
}
e->next= current_list;
@@ -2979,7 +2978,7 @@ int start_slave(THD* thd , Master_info* mi, bool net_report)
{
/* connection was deleted while we waited for lock_slave_threads */
mi->unlock_slave_threads();
- my_error(WARN_NO_MASTER_INFO, mi->connection_name.length,
+ my_error(WARN_NO_MASTER_INFO, MYF(0), (int) mi->connection_name.length,
mi->connection_name.str);
DBUG_RETURN(-1);
}
@@ -3237,7 +3236,7 @@ int reset_slave(THD *thd, Master_info* mi)
{
/* connection was deleted while we waited for lock_slave_threads */
mi->unlock_slave_threads();
- my_error(WARN_NO_MASTER_INFO, mi->connection_name.length,
+ my_error(WARN_NO_MASTER_INFO, MYF(0), (int) mi->connection_name.length,
mi->connection_name.str);
DBUG_RETURN(-1);
}
@@ -3380,7 +3379,8 @@ static bool get_string_parameter(char *to, const char *from, size_t length,
uint from_numchars= cs->cset->numchars(cs, from, from + from_length);
if (from_numchars > length / cs->mbmaxlen)
{
- my_error(ER_WRONG_STRING_LENGTH, MYF(0), from, name, length / cs->mbmaxlen);
+ my_error(ER_WRONG_STRING_LENGTH, MYF(0), from, name,
+ (int) (length / cs->mbmaxlen));
return 1;
}
memcpy(to, from, from_length+1);
@@ -3449,7 +3449,7 @@ bool change_master(THD* thd, Master_info* mi, bool *master_info_added)
{
/* connection was deleted while we waited for lock_slave_threads */
mi->unlock_slave_threads();
- my_error(WARN_NO_MASTER_INFO, mi->connection_name.length,
+ my_error(WARN_NO_MASTER_INFO, MYF(0), (int) mi->connection_name.length,
mi->connection_name.str);
DBUG_RETURN(TRUE);
}
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index f63d4a2d4f4..03107aa4574 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -2949,7 +2949,7 @@ int fill_show_explain(THD *thd, TABLE_LIST *table, COND *cond)
}
else
{
- my_error(ER_NO_SUCH_THREAD, MYF(0), thread_id);
+ my_error(ER_NO_SUCH_THREAD, MYF(0), (ulong) thread_id);
DBUG_RETURN(1);
}
}
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index ea06beeb560..9d1cfa1f1ad 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -4999,7 +4999,8 @@ int mysql_create_table_no_lock(THD *thd,
// Check if we hit FN_REFLEN bytes along with file extension.
if (length+reg_ext_length > FN_REFLEN)
{
- my_error(ER_IDENT_CAUSES_TOO_LONG_PATH, MYF(0), sizeof(path)-1, path);
+ my_error(ER_IDENT_CAUSES_TOO_LONG_PATH, MYF(0), (int) sizeof(path)-1,
+ path);
return true;
}
}
@@ -5263,7 +5264,7 @@ mysql_rename_table(handlerton *base, const char *old_db,
// Check if we hit FN_REFLEN bytes along with file extension.
if (length+reg_ext_length > FN_REFLEN)
{
- my_error(ER_IDENT_CAUSES_TOO_LONG_PATH, MYF(0), sizeof(to)-1, to);
+ my_error(ER_IDENT_CAUSES_TOO_LONG_PATH, MYF(0), (int) sizeof(to)-1, to);
DBUG_RETURN(TRUE);
}
@@ -10348,7 +10349,7 @@ bool check_engine(THD *thd, const char *db_name,
if (no_substitution)
{
const char *engine_name= ha_resolve_storage_engine_name(req_engine);
- my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), engine_name, engine_name);
+ my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), engine_name);
DBUG_RETURN(TRUE);
}
*new_engine= enf_engine;
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 3c324a34ee9..1fcc568af09 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -2335,7 +2335,7 @@ master_def:
if ($3 > MASTER_DELAY_MAX)
{
my_error(ER_MASTER_DELAY_VALUE_OUT_OF_RANGE, MYF(0),
- $3, MASTER_DELAY_MAX);
+ (uint) $3, (uint) MASTER_DELAY_MAX);
}
else
Lex->mi.sql_delay = $3;
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index d53276d7c24..ea95899b004 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -1959,7 +1959,7 @@ Sys_var_slave_parallel_mode::global_update(THD *thd, set_var *var)
if (mi->rli.slave_running)
{
my_error(ER_SLAVE_MUST_STOP, MYF(0),
- mi->connection_name.length, mi->connection_name.str);
+ (int) mi->connection_name.length, mi->connection_name.str);
res= true;
}
else
@@ -4461,7 +4461,7 @@ bool Sys_var_rpl_filter::global_update(THD *thd, set_var *var)
if (mi->rli.slave_running)
{
my_error(ER_SLAVE_MUST_STOP, MYF(0),
- mi->connection_name.length,
+ (int) mi->connection_name.length,
mi->connection_name.str);
result= true;
}
@@ -4664,7 +4664,7 @@ static bool update_slave_skip_counter(sys_var *self, THD *thd, Master_info *mi)
{
if (mi->rli.slave_running)
{
- my_error(ER_SLAVE_MUST_STOP, MYF(0), mi->connection_name.length,
+ my_error(ER_SLAVE_MUST_STOP, MYF(0), (int) mi->connection_name.length,
mi->connection_name.str);
return true;
}
diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc
index 76c753cf0b4..173e955e44b 100644
--- a/sql/wsrep_mysqld.cc
+++ b/sql/wsrep_mysqld.cc
@@ -1553,8 +1553,8 @@ static int wsrep_TOI_begin(THD *thd, char *db_, char *table_,
ret,
(thd->db ? thd->db : "(null)"),
(thd->query()) ? thd->query() : "void");
- my_error(ER_LOCK_DEADLOCK, MYF(0), "WSREP replication failed. Check "
- "your wsrep connection state and retry the query.");
+ my_message(ER_LOCK_DEADLOCK, "WSREP replication failed. Check "
+ "your wsrep connection state and retry the query.", MYF(0));
wsrep_keys_free(&key_arr);
rc= -1;
}
diff --git a/sql/wsrep_var.cc b/sql/wsrep_var.cc
index 3c90f03a5fb..a6122a7b1bc 100644
--- a/sql/wsrep_var.cc
+++ b/sql/wsrep_var.cc
@@ -348,7 +348,7 @@ bool wsrep_provider_update (sys_var *self, THD* thd, enum_var_type type)
if (wsrep_init())
{
- my_error(ER_CANT_OPEN_LIBRARY, MYF(0), tmp);
+ my_error(ER_CANT_OPEN_LIBRARY, MYF(0), tmp, my_error, "wsrep_init failed");
rcode = true;
}
free(tmp);