summaryrefslogtreecommitdiff
path: root/sql/unireg.cc
diff options
context:
space:
mode:
authorGuilhem Bichot <guilhem@mysql.com>2009-04-01 11:34:52 +0200
committerGuilhem Bichot <guilhem@mysql.com>2009-04-01 11:34:52 +0200
commitc71aae73f6f864c97cf17b3e872346666b871c3f (patch)
tree4895816aee1a0fcef08daa0f68bf1b1fe9aa2b5a /sql/unireg.cc
parent3c59ba32ab9cca29e01bd8dd2130af83ead8bde0 (diff)
parent7ca1ebd83a1a7d291593be7a94f5a37298dfc863 (diff)
downloadmariadb-git-c71aae73f6f864c97cf17b3e872346666b871c3f.tar.gz
merge of 5.1-main into 5.1-maria. MyISAM changes are propagated to Maria except
those of davi.arnaut@sun.com-20090219210935-9vilvcisyyieffxl (TODO).
Diffstat (limited to 'sql/unireg.cc')
-rw-r--r--sql/unireg.cc17
1 files changed, 8 insertions, 9 deletions
diff --git a/sql/unireg.cc b/sql/unireg.cc
index eedac2fd582..954f0bc3c7b 100644
--- a/sql/unireg.cc
+++ b/sql/unireg.cc
@@ -228,16 +228,16 @@ bool mysql_create_frm(THD *thd, const char *file_name,
create_info->comment.length, 60);
if (tmp_len < create_info->comment.length)
{
- (void) my_snprintf(buff, sizeof(buff), "Too long comment for table '%s'",
- table);
if ((thd->variables.sql_mode &
(MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES)))
{
- my_message(ER_UNKNOWN_ERROR, buff, MYF(0));
+ my_error(ER_TOO_LONG_TABLE_COMMENT, MYF(0), table, tmp_len);
goto err;
}
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
- ER_UNKNOWN_ERROR, ER(ER_UNKNOWN_ERROR), buff);
+ ER_TOO_LONG_TABLE_COMMENT,
+ ER(ER_TOO_LONG_TABLE_COMMENT),
+ table, tmp_len);
create_info->comment.length= tmp_len;
}
@@ -612,17 +612,16 @@ static bool pack_header(uchar *forminfo, enum legacy_db_type table_type,
255);
if (tmp_len < field->comment.length)
{
- char buff[128];
- (void) my_snprintf(buff,sizeof(buff), "Too long comment for field '%s'",
- field->field_name);
if ((current_thd->variables.sql_mode &
(MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES)))
{
- my_message(ER_UNKNOWN_ERROR, buff, MYF(0));
+ my_error(ER_TOO_LONG_FIELD_COMMENT, MYF(0), field->field_name, tmp_len);
DBUG_RETURN(1);
}
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
- ER_UNKNOWN_ERROR, ER(ER_UNKNOWN_ERROR), buff);
+ ER_TOO_LONG_FIELD_COMMENT,
+ ER(ER_TOO_LONG_FIELD_COMMENT),
+ field->field_name, tmp_len);
field->comment.length= tmp_len;
}