Commit 35ca78a0 authored by unknown's avatar unknown

Bug#30854 (Tables name show as binary in slave err msg on vm-win2003-64-b)

The root cause of this defect is that a call to my_error() is using a
'LEX_STRING' parameter instead of a 'char*'

This patch fixes the failing calls to my_error(), as well as similar calls
found during investigation.

This is a compiling bug (see the instrumentation in the bug report), no test cases provided.


sql/sql_base.cc:
  Fix broken calls to "..." (va_args) functions.
sql/sql_table.cc:
  Fix broken calls to "..." (va_args) functions.
parent 9aa43170
......@@ -7393,7 +7393,7 @@ open_new_frm(THD *thd, TABLE_SHARE *share, const char *alias,
else
{
/* only VIEWs are supported now */
my_error(ER_FRM_UNKNOWN_TYPE, MYF(0), share->path, parser->type()->str);
my_error(ER_FRM_UNKNOWN_TYPE, MYF(0), share->path.str, parser->type()->str);
goto err;
}
DBUG_RETURN(0);
......
......@@ -5200,7 +5200,8 @@ bool alter_table_manage_keys(TABLE *table, int indexes_were_disabled,
if (error == HA_ERR_WRONG_COMMAND)
{
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
ER_ILLEGAL_HA, ER(ER_ILLEGAL_HA), table->s->table_name);
ER_ILLEGAL_HA, ER(ER_ILLEGAL_HA),
table->s->table_name.str);
error= 0;
} else if (error)
table->file->print_error(error, MYF(0));
......@@ -5392,7 +5393,7 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
{
if (def->change && ! def->field)
{
my_error(ER_BAD_FIELD_ERROR, MYF(0), def->change, table->s->table_name);
my_error(ER_BAD_FIELD_ERROR, MYF(0), def->change, table->s->table_name.str);
goto err;
}
/*
......@@ -5427,7 +5428,7 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
}
if (!find)
{
my_error(ER_BAD_FIELD_ERROR, MYF(0), def->after, table->s->table_name);
my_error(ER_BAD_FIELD_ERROR, MYF(0), def->after, table->s->table_name.str);
goto err;
}
find_it.after(def); // Put element after this
......@@ -5437,7 +5438,7 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
if (alter_info->alter_list.elements)
{
my_error(ER_BAD_FIELD_ERROR, MYF(0),
alter_info->alter_list.head()->name, table->s->table_name);
alter_info->alter_list.head()->name, table->s->table_name.str);
goto err;
}
if (!new_create_list.elements)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment