1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

fix some quoting in error messages

add_identifier change comes from 5.7, everything else is a follow-up
This commit is contained in:
Sergei Golubchik
2016-09-14 15:23:59 +02:00
parent ea3262dc71
commit c8b3244703
15 changed files with 141 additions and 146 deletions

View File

@ -122,7 +122,7 @@ static char* add_identifier(THD* thd, char *to_p, const char * end_p,
conv_name_end= conv_string + res;
}
quote = thd ? get_quote_char_for_identifier(thd, conv_name, res - 1) : '"';
quote = thd ? get_quote_char_for_identifier(thd, conv_name, res - 1) : '`';
if (quote != EOF && (end_p - to_p > 2))
{
@ -8178,11 +8178,14 @@ static bool fk_prepare_copy_alter_table(THD *thd, TABLE *table,
DBUG_RETURN(true);
case FK_COLUMN_DROPPED:
{
char buff[NAME_LEN*2+2];
strxnmov(buff, sizeof(buff)-1, f_key->foreign_db->str, ".",
f_key->foreign_table->str, NullS);
StringBuffer<NAME_LEN*2+2> buff(system_charset_info);
LEX_STRING *db= f_key->foreign_db, *tbl= f_key->foreign_table;
append_identifier(thd, &buff, db->str, db->length);
buff.append('.');
append_identifier(thd, &buff, tbl->str,tbl->length);
my_error(ER_FK_COLUMN_CANNOT_DROP_CHILD, MYF(0), bad_column_name,
f_key->foreign_id->str, buff);
f_key->foreign_id->str, buff.c_ptr());
DBUG_RETURN(true);
}
default: